-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][IMP] partner_multi_company: prevent inconsistencies between user and partner #670
[16.0][IMP] partner_multi_company: prevent inconsistencies between user and partner #670
Conversation
Hi @legalsylvain, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty
cc @pedrobaeza |
# pylint: disable=W8150 | ||
from odoo.addons.partner_multi_company import hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do it here correctly:
# pylint: disable=W8150 | |
from odoo.addons.partner_multi_company import hooks | |
from ...hooks import fix_user_partner_companies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @pedrobaeza ,
I attempted to use the following import statement: from ...hooks import fix_user_partner_companies
, but I encountered the following error:
ImportError: attempted relative import with no known parent package
.
I reviewed other modules that utilize functions from hooks in their migration scripts, and they all employ absolute imports, disabling pylint. Perhaps you have encountered this error before and have found a solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, don't worry. Let's go this way. Maybe the migration manager is not doing imports 100% Python compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge nobump
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 3a9f50b. Thanks a lot for contributing to OCA. ❤️ |
fwport #667