thank you for the review! I know that osv.except_osv is deprecated, but this is what account_period.find() raises, so that is what I have to catch.
I actually prefer the test for context is None, otherwise I am reconstructing an empty dictionary even if the passed context is already an empty dictionary.
If date is False, account_period.find() returns the period of the current date, so I can't refactor according to your suggestion.
Hi Pedro,
thank you for the review! I know that osv.except_osv is deprecated, but this is what account_ period. find() raises, so that is what I have to catch.
I actually prefer the test for context is None, otherwise I am reconstructing an empty dictionary even if the passed context is already an empty dictionary.
If date is False, account_ period. find() returns the period of the current date, so I can't refactor according to your suggestion.