Monday, January 17, 2022
1 change · master
Code cleanup and technical improvements
This update reorganizes and simplifies the core sales order code to make future improvements easier and safer. It also fixes a few small issues, such as clearer translated warnings and preventing unintended customer changes on sales order lines.
Original PR description
To ease future tasks related to `sale`, this PR cleans up the core code of sale, `sale_order.py` & `sale_order_line.py`:
* Follow guidelines for code organisation (defaults, fields, computes, constraints, onchanges, crud, ...)
* Follow guidelines for methods naming conventions (`_onchange`, `_compute`, ...)
* Make code more readable by splitting up overly long lines
* Remove/simplify useless code
* Related / computed fields are readonly by default
* Stored computed fields are compute_sudo by default
* Fix some little issues found during code review
See dedicated [FIX] commits
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr