[REF] *sale*: clean inheritance/setup of sale report
* remove unused delay column (there was no field using the value server
side)
* remove unused joins in the FROM part of the table definition (join on
pricelists)
* fix broken inheritance API
pos_sale inheritance adds a null value for fields not available added in
sub modules (website, invoice_status, ...). But this was only working
because the default value of the fields parameter of the _query method
was overridden to a dict in all overrides, filling the record while
climbing the inheritance chain.
This was clearly too magic, using information provided higher in the
inheritance chain, assuming you were calling the super before generating
the pos part of the query.
This commit cleans the methods and API of the model, providing clean
hooks and reducing the mess of values given in overrides of _query.
closes odoo/odoo#85125
Related: odoo/enterprise#24626
Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
Showing
- addons/pos_sale/report/sale_report.py 47 additions, 49 deletionsaddons/pos_sale/report/sale_report.py
- addons/sale/report/sale_report.py 80 additions, 68 deletionsaddons/sale/report/sale_report.py
- addons/sale_margin/report/sale_report.py 4 additions, 3 deletionsaddons/sale_margin/report/sale_report.py
- addons/sale_stock/report/sale_report.py 10 additions, 4 deletionsaddons/sale_stock/report/sale_report.py
- addons/website_sale/report/sale_report.py 10 additions, 4 deletionsaddons/website_sale/report/sale_report.py
Loading