05aab3552c7a81693747d5056623ef8dae5ddf54
A domain with a negated thruty leaf raises an exception here https://github.com/odoo/odoo/blob/835197e48fbbee1c8ac35d52287537fa6f0bdd36/odoo/osv/expression.py#L614 due to https://github.com/odoo/odoo/blob/835197e48fbbee1c8ac35d52287537fa6f0bdd36/odoo/osv/expression.py#L670 and the fact that `FALSE_LEAF != (1, "!=", 1)` and `TRUE_LEAF != (0, "!=", 1)` Current wrong behaviour: ``` >>> distribute_not(['!', TRUE_LEAF]) [(1, '!=', 1)] >>> is_leaf((1, '!=', 1)) False ``` This issue was noticed when adapting domains for fields that have been removed during migration. Example (extract of) traceback: ``` Traceback (most recent call last): File "/home/odoo/src/odoo/13.0/odoo/http.py", line 624, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) ... File "/home/odoo/src/odoo/13.0/odoo/osv/expression.py", line 677, in __init__ self.parse() File "/home/odoo/src/odoo/13.0/odoo/osv/expression.py", line 814, in parse self.stack = [ExtendedLeaf(leaf, self.root_model) for leaf in self.expression] File "/home/odoo/src/odoo/13.0/odoo/osv/expression.py", line 814, in <listcomp> self.stack = [ExtendedLeaf(leaf, self.root_model) for leaf in self.expression] File "/home/odoo/src/odoo/13.0/odoo/osv/expression.py", line 562, in __init__ self.check_leaf(internal) File "/home/odoo/src/odoo/13.0/odoo/osv/expression.py", line 618, in check_leaf raise ValueError("Invalid leaf %s" % str(self.leaf)) ValueError: Invalid leaf (0, '!=', 1) ``` closes odoo/odoo#68665 X-original-commit: e20c23658d15a135e5f35b0e8dec6e3202cecaab Signed-off-by: Christophe Simonis <chs@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%