Saturday, March 14, 2020
1 change · master
Miscellaneous changes
The `__closer` attribute is filled with the origin of a call to `cr.close()`. That information is reused in the `check` decotator that ensure the user is not using a closed cursor. In case he is using a closed cursor, an error is raised with that optional origin in case of `--log-sql`. The attribute is a dundler so it is only accessible within its class, as the decorator has been moved outside of the class by 058cf208a8e7 it is not directly accessible thus `__getattr__` is called as a f
Original PR description
The `__closer` attribute is filled with the origin of a call to `cr.close()`. That information is reused in the `check` decotator that ensure the user is not using a closed cursor. In case he is using a closed cursor, an error is raised with that optional origin in case of `--log-sql`. The attribute is a dundler so it is only accessible within its class, as the decorator has been moved outside of the class by 058cf208a8e7 it is not directly accessible thus `__getattr__` is called as a fallback. The `__getattr__` itself is protected by the `check` decorator thus they call each other in a infinite recursion. As the related dundler is no more used internally, it has been decided to remove it entirely. Task: 2199895 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47589