# Offered modules update - to which version?

**URL:** https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709
**Category:** User
**Created:** [January 20, 2021, 11:23am UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709 "2021-01-20T11:23:41Z")
**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: [January 20, 2021, 11:23am UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/1 "2021-01-20T11:23:41Z")

</div>

Hello friends,  
I was about to activate the woocommerce module in my productive system - and was offered to update all of my active modules. AFAIK, this update will just do 5.6.x(actual) to 5.6.y(latest). Is that correct? - Just to be safe…

Cheers,  
Wolf

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 20, 2021, 11:39am UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/2 "2021-01-20T11:39:12Z")

</div>

Hi Wolf,

The update process will not fetch new module code but will update the modules on the database to sync the code with the database structure records.

This is a safe operation and can be done wihtout any problem.

---

<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: [January 20, 2021, 11:47am UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/3 "2021-01-20T11:47:20Z")

</div>

Thank you very much - quick as lightning… 🙂  
And worked.

In additon:  
How would I achieve an update as mentioned above:  
5.6.x(actual) to 5.6.y(latest-available)?  
I’m in PIP VirtEnv

Cheers,  
Wolf

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 20, 2021, 12:35pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/4 "2021-01-20T12:35:42Z")

</div>

> [@herrdeh](#):
>
> 5.6.x(actual) to 5.6.y(latest-available)?  
> I’m in PIP VirtEnv

You should upgrade the version of the modules using pip and restart the server.  
But take care because _pip install --upgrade \<module\_name\>_ will install the newer 5.8 series. So you should restrict the version with:

`pip install --upgrade "trytond_sale <5.7"`

To tell pip to install the latest version available of the 5.6 series.

---

<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: [January 20, 2021, 12:38pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/5 "2021-01-20T12:38:26Z")

</div>

> [@pokoli](#):
>
> pip install --upgrade “trytond\_sale \<5.7”

It is cleaner to use `pip install --upgrade "trytond_sale == 5.6.*"` because it ensures to always use the right series.

---

<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: [January 20, 2021, 1:07pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/6 "2021-01-20T13:07:47Z")

</div>

> [@ced](#):
>
> pip install --upgrade “trytond\_sale == 5.6.\*”

Thank you - this works nicely for the module in question. But how would I update the whole tryton installation - all modules to the latest 5.6.x available?

---

<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: [January 20, 2021, 1:15pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/7 "2021-01-20T13:15:51Z")

</div>

You must run the command for all of them like `pip install --upgrade “trytond_sale==5.6.*” "trytond_purchase==5.6.*" …`  
[pip](https://pip.pypa.io/) is not the stronger package manager, you can not group packages under a single alias for example.

---

<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: [January 20, 2021, 1:37pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/8 "2021-01-20T13:37:05Z")

</div>

What I always do is a

1. `pip freeze > update_tryton.txt`
2. edit the `update_tryton.txt` and remove all the packages except the ones with `trytond`
3. change manually the 5.6.X to 5.6.\* if you want to stay with the same version. Otherwise replace the 5.6.X with 5.8.\*

After that I can use that file with `pip install --upgrade -r update_tryton.txt` so it magically updates the Tryton server. Yes it take some time to do point 3, but you basically have to do that once because the second time you can use ‘search-and-replace’

---

<div class="post-metadata">

### Author: ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)
#### Post date: [January 20, 2021, 2:32pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/9 "2021-01-20T14:32:15Z")

</div>

> [@edbo](#):
>
> Yes it take some time to do point 3

So why not combine points 1,2 and 3 then:

```
pip freeze \
    | grep '^trytond' \
    | sed -e 's/==[0-9]\+\.[0-9]\+\..*/==5.6.*/' \
    >update_tryton.txt

```

Note: You can change the `==5.6.*` part on line 3 to match the version number you want to use.

---

<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: [January 21, 2021, 10:02pm UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/10 "2021-01-21T22:02:37Z")

</div>

Works nicely! Thank you all.  
When I’ll have some time, I’ll try to wrap all of that into “worst-script-ever” - so you all can see my coding disabilities… Would it make sense to pack such a script (highly improved) into a module?

Cheers,  
Wolf

---

<div class="post-metadata">

### Author: ![SISalp](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/sisalp/32/200_2.png) [@SISalp](https://discuss.tryton.org/u/SISalp)
#### Post date: [January 23, 2021, 10:55am UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/11 "2021-01-23T10:55:29Z")

</div>

> [@herrdeh](#):
>
> Would it make sense to pack such a script (highly improved) into a module?

Why packing administrative tasks into a module ?  
I maintained a script for 12 years now and, by experience, the more it does, the less it is efficient for people running in a different context.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [February 22, 2021, 10:55am UTC](https://discuss.tryton.org/t/offered-modules-update-to-which-version/3709/12 "2021-02-22T10:55:35Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
