-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
[FIX][report_xls] Protect import. #64
[FIX][report_xls] Protect import. #64
Conversation
Even after merging 2bf93a1, import still breaks when trying to use module's stuff at class definition time when module is not imported. I move xsl types to a failure-safe scope.
_logger = logging.getLogger(__name__) | ||
|
||
xls_types_default = { |
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.
This is not needed to be moved
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.
Its purpose is to have a default in xls_types. You need to declare it before for that.
I prefer that you mock the types this way instead: https://github.com/OCA/account-financial-tools/blob/8.0/account_move_batch_validate/account.py#L38 |
Types are a dict, while in that module |
OK, as this is only for avoiding problems if the module is not used, then 👍 |
👍 |
Wow this merge button is new and intriguing! Ok so per the rules it's a 5 day wait if two thumbs, but is that 5 days from the initial thumb or 5 days from the second? |
|
Even after merging 2bf93a1, import still breaks when trying to use module's stuff at class definition time when module is not imported.
I move xsl types to a failure-safe scope.
I checked that no other modules use these variables.
@Tecnativa