Offered modules update - to which version?

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

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.

Thank you very much - quick as lightning… :slightly_smiling_face:
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

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.

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

1 Like

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?

You must run the command for all of them like pip install --upgrade “trytond_sale==5.6.*” "trytond_purchase==5.6.*" …
pip is not the stronger package manager, you can not group packages under a single alias for example.

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’

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.

2 Likes

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

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.

1 Like

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