Help

2

How can I edit the requirements.txt on Odoo.sh?

Avatar
Jean Donaires

Hello Odoodz. (Oh-dudes)

Documentation says "In order to use an external library on Odoo users can modify the requirements.txt" like its shown on https://github.com/odoo/odoo/blob/11.0/requirements.txt (but on your own installation, obviously).

I need to use Zeep library on python. So what I need to do is to edit requirements.txt on my Odoo.sh GitHub repository and then add Zeep==x.x.x for the zeep library version I want to use. 

How can i do it? I've tried using the Odoo.sh shell with nano command, but could not save changes.

Also, I can't seem to find it anywhere on a local Community installation.
Thanks in advance,

Best regards,

Jean.

Avatar
Discard
1 Answer
4
Best Answer

Hi Jean,

You can't do this on Odoo.sh itself. You need to do it directly on the Github repository from which you create the Odoo.sh builds. If you commit the changes there (either through the Github website or command line) you'll be able to load the package when Odoo.sh creates a build.

Regards,
Yenthe


EDIT: Please review the documentation at Odoo.sh v11 Documentation

The section Your First Module discusses the use of requirements.txt

2 Comments
Avatar
Discard
Avatar
Jean Donaires
-

Thanks for the reply @Yenthe.

But could you help me out understanding it a little bit better? On Odoo.sh, every time i create a new branch it just comes empty on GitHub. Even the master (according to the dashboard Odoo.sh gives you). I understand all my branches are just copies of the Odoo.sh enterprise github repository, but without the option to edit it's core code directly (since it is hidden somehow). Then how can I edit the requirements.txt files if it's not on any of the branches I create on Odoo.sh? Should I just create a new branch and then create a 'requirements.txt' file with the libraries I want the server to install? Also, the Odoo documentation says the server will install the new libraries automatically, but how can I make sure it is installed? Do I have to follow a part of the documentation I'm missing? Or is it installed automatically once I do a commit? Any answer would be really helpful. Thanks in advance.

Best regads.

Jean.

Hi Jean,

Yes, you'll need to manually add a requirements.txt file inside every branch where you want to use the packages for. There is no way to do it from the Odoo.sh frontend (up untill now atleast).

Once you commit the requirements.txt file with your dependencies they will be automatically installed from that commit (build) on for all the upcoming builds. If you really want to double check and verify them you can look in the "pip.log" file and/or open the terminal to check from there.