There's moreā€¦

Be careful with dependency handling. Consider an instance where you want to have the sale, sale_stock, and sale_specific add-ons installed, with sale_specific depending on sale_stock, and sale_stock depending on sale. To install all three, you only need to install sale_specific, as it will recursively install the sale_stock and sale dependencies. To update all three, you need to update sale, as this will recursively update the reverse dependencies, sale_stock and sale_specific.

Another tricky part with managing dependencies is when you add a dependency to an add-on that already has a version installed. Let's understand this by continuing with the previous example. Imagine that you add a dependency on stock_dropshipping in sale_specific. Updating the sale_specific add-on will not automatically install the new dependency, and neither will requesting the installation of sale_specific. In this situation, you can get very nasty error messages because the Python code of the add-on is not successfully loaded, but the data of the add-on and the models tables in the database are present. To solve this, you need to stop the instance and manually install the new dependency.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset