# Activate all modules at once?

**URL:** https://discuss.tryton.org/t/activate-all-modules-at-once/6781
**Category:** User
**Created:** [December 14, 2023, 7:52pm UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781 "2023-12-14T19:52:47Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [December 14, 2023, 7:52pm UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/1 "2023-12-14T19:52:47Z")

</div>

When installing a greater number of Trytons with a greater number of modules, it’s a little time-consuming to double-click every single module in every single instance. So I’d like

- either batch prepare all modules for activation in the GUI, or better
- activate all modules from the command line with a `trytond-admin` command

I found [this thread](https://discuss.tryton.org/t/activate-module-from-command-line/4053), but it seems not to apply to my question; a

`trytond-admin -c trytond.conf -d mydatabase --activate-dependencies --all`

seems not to work.

Cheers,  
Wolf

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [December 14, 2023, 10:01pm UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/2 "2023-12-14T22:01:20Z")

</div>

When you do

```bash
trytond-admin --help

```

you will get a list of possible options to be used with the command. In that list you will discover that `--all` updates all activated modules so this won’t work for you. The `--activate-dependencies` must be used when installing a module with the `-u` and that module depends on other modules not installed already. For example when you have an empty database and want to install the `sale` module you have to use the `--activate-dependencies` because otherwise the install will fail because of missing dependencies.

> [@herrdeh](#):
>
> either batch prepare all modules for activation in the GUI

`<SHIFT>` or `<CTRL>` select the different modules you want to install, click on the `propeller` and select `Mark for activation`.

> [@herrdeh](#):
>
> activate all modules from the command line with a `trytond-admin` command

You can use the `-u` option with a list of modules. For example

```auto
trytond-admin -c trytond.conf -d mydatabase --activate-dependencies -u stock_lot sale sale_opportunity

```

The list can also be generated if you want.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [December 15, 2023, 4:24am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/3 "2023-12-15T04:24:53Z")

</div>

> [@edbo](#):
>
> The list can also be generated if you want.

Hi @edbo, could you please elaborate on why I might want to generate the module list and what would generate it?

---

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [December 15, 2023, 8:24am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/4 "2023-12-15T08:24:49Z")

</div>

Thank you for your - as always - profound statement.

But did I get it right: Apart from generating a list of deactivated modules there is no possibility to batch activate modules with a simple command or simple action in the GUI ? -

Manually selecting each of 30 modules is not an option for professional work.

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [December 15, 2023, 9:41am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/5 "2023-12-15T09:41:13Z")

</div>

> [@dalers](#):
>
> > [@edbo](#):
> >
> > The list can also be generated if you want.
> 
> Hi @edbo, could you please elaborate on why I might want to generate the module list and what would generate it?

You can create a script that walks through your modules directory or takes the modules from the database.

> [@herrdeh](#):
>
> no possibility to batch activate modules with a simple command or simple action in the GUI

You can `<SHIFT>` or `<CTRL>` select the different modules you want to install, then click on the `propeller` and select `Mark for activation`. This will mark the selected modules to be installed / upgraded. After that you can use the `propeller` again to execute the actual install / upgrade of the modules.

> [@herrdeh](#):
>
> Manually selecting each of 30 modules is not an option for professional work.

Using the mentioned method, it’s about 6 clicks and 1 press.

1. Click the first module to be installed
2. Press `<SHIFT>`
3. Click the last module to be installed
4. Click propeller to mark them to be installed
5. Click `Mark for activation`
6. Click propeller again
7. Click `Perform pending activation / upgrade`

I think a pretty good performance improvement 😆

---

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [December 15, 2023, 10:05am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/6 "2023-12-15T10:05:52Z")

</div>

> [@edbo](#):
>
> Using the mentioned method, it’s about 6 clicks and 1 press.
> 
> 1. Click the first module to be installed
> 2. Press `<SHIFT>`
> 3. Click the last module to be installed
> 4. Click propeller to mark them to be installed
> 5. Click `Mark for activation`
> 6. Click propeller again
> 7. Click `Perform pending activation / upgrade`
> 
> I think a pretty good performance improvement 😆

Indeed, and thank you very much.  
But AFAICS, this works in GTK client only. Luckily I noticed that right before falling into final despair and scream around and destroy my furniture. (;

Nevertheless, a “activate-at-trytond-admin-command” feature would be nice.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [December 15, 2023, 10:26am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/7 "2023-12-15T10:26:09Z")

</div>

`<SHIFT>+Click` to extend selection works on the web client.  
But also there is the select all checkbox for the web client and `<CTRL>+a` for desktop client.  
But to be able to launch button actions, all the records must have been loaded (and not lazy loaded).

---

<div class="post-metadata">

### Author: ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)
#### Post date: [December 15, 2023, 11:21am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/8 "2023-12-15T11:21:09Z")

</div>

> [@herrdeh](#):
>
> installing a greater number of Trytons with a greater number of modules

> [@herrdeh](#):
>
> a “activate-at-trytond-admin-command” feature would be nice

If Tryton was closed source, how much would you pay for adding this feature? There is always the question: “Is it worth the effort?”. Personally I don’t think so because it kind of already exists:

```auto
trytond-admin -c trytond.conf -d mydatabase --activate-dependencies -u <your-list-of-modules>

```

The only thing you have to do is to create your list of modules. Put the command in a script together with some logic to build a list of modules and you are good to go.

Below an example to fetch the list of standard modules of Tryton, pip install them and after that, update that database.

```auto
#!/bin/bash

modules="https://downloads-cdn.tryton.org/7.0/modules.txt"
mods=""
for i in $(curl -sS $modules); do
    pip install --upgrade trytond-$i==7.0.*
    mods=$mods" $i"
done

trytond-admin -c trytond.conf -d mydatabase -m
trytond-admin -c trytond.conf -d mydatabase --activate-dependencies -u $mods

```

You can of course disable the pip install, but you get the idea.

---

<div class="post-metadata">

### Author: ![cheche](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cheche/32/2488_2.png) [@cheche](https://discuss.tryton.org/u/cheche)
#### Post date: [December 16, 2023, 9:46am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/9 "2023-12-16T09:46:21Z")

</div>

Maybe a Proteus script is a better tool for this job:

> **[Tryton Scripting Client — Library to access Tryton server as a client](https://docs.tryton.org/latest/client-library/)**

---

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [December 16, 2023, 12:47pm UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/10 "2023-12-16T12:47:35Z")

</div>

> [@ced](#):
>
> `<SHIFT>+Click` to extend selection works on the web client.

Thank you for this clarification. But it works only with clicking the list items, not with the checkboxes.

> [@edbo](#):
>
> If Tryton was closed source, how much would you pay for adding this feature?

I would pay 20€. And maybe some other fellows as well. But maybe not. I dont know.

Generally speaking: I think it’s a major shortcoming in FOSS, that there are not mechanisms to collect money and fund developers - and this way find out which features really are important. Not being a strong market believer, nevertheless willingness to pay may a good indicator for importance.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [December 18, 2023, 2:44pm UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/11 "2023-12-18T14:44:34Z")

</div>

2 posts were merged into an existing topic: [Sponsoring features](https://discuss.tryton.org/t/sponsoring-features/6207/10)

---

<div class="post-metadata">

### Author: ![dotbit](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dotbit/32/2093_2.png) [@dotbit](https://discuss.tryton.org/u/dotbit)
#### Post date: [December 17, 2023, 9:12am UTC](https://discuss.tryton.org/t/activate-all-modules-at-once/6781/12 "2023-12-17T09:12:56Z")

</div>

> [@herrdeh](#):
>
> Thank you for this clarification. But it works only with clicking the list items, not with the checkboxes.

On the checkboxes you just need to click, without the control.  
The checkboxes act like normal web checkboxes.  
When the checkbox is checked, then the line is selected.

If you click on the line (not the checkbox), then you need to Control+Click
