Closed sbidoul closed 7 years ago
@etherealite it simply means that wherever you read odoo.addons
or odoo/addons
in the setuptools-odoo documentation you need to replace it by odoo_addons
if using Odoo 8 or 9.
I'm not sure how to express that in another way. Do you have any suggestion?
How about this:
Please note that if you are packaging for Odoo versions 8 or 9, you will need to make some small changes to your module's file structure and its accompanying namespace references. In this case, the top most directory in an Odoo 10 path, odoo
, will be renamed to odoo_addons
, such that the path odoo/addons/<addon_name>/__manifest__.py
becomes odoo_addons/<addon_name>/__manifest__.py
. Calling code outside the module will require the use of an alternate namespace reference that reflects the differences in the directory layout. Any reference to a Odoo 10 style namespace, such as odoo.addon
, will need to be replaced by odoo_addon
. This includes import statements and the setuptools name_space
keyword argument.
@etherealite thanks for the suggestion.
Note that the part about imports is incorrect: you do not need to change anything to your code when using addons packaged this way. so import odoo.addons....
(or import openerp.addons....
) works in all cases.
@etherealite here is a version that is more explicit.
Aww yes! This is perfect, now I see the many of my assumptions about the meaning of the original instructions were completely wrong.
I'd say that this was a good litmus test and it passed with flying colors. Much better than my long winded and incorrect explanation.
Are you going to merge?
Thanks for your valuable input.
@sbidoul Glad to be of service.
Would you mind if I contacted you directly at your email address? I've got a question that isn't appropriate for GitHub.
Sure, feel free to ask.
Coverage remained the same at 92.329% when pulling 26e8dd2b896c881dd96255a1a2937e9db5ba97dd on improve-readme-sbi into bcb1a28516fec8e0d20bd752398a68d8af4e9f5c on master.