Daily updates from Odoo
Tuesday, December 6, 2022
2 changes
Code cleanup and technical improvements
This change simplifies how standard menu actions such as archive, export, delete, and duplicate are customized in Odoo views. It reduces complexity for future customizations and makes related behavior easier to maintain across affected modules.
Original PR description
There are several customizations of the list and form view that consist in modifying the behavior of a static menu action (archive, unarchive, export, delete, duplicate). We have seen that this one is very complex. So we decided to simplify it. Solution: Add the getStaticActionMenuItems API point. This allows us to easily modify the behaviour of static actions. We also took advantage of this commit to simplify the ActionMenu api. We have removed the other actions because it was not clear enough. They are directly added in the action category. TaskID: 3089039
The expected payment date update logic was reorganized so it sits with the accounting line it actually changes, rather than with the partner record. This should make the code easier to maintain without changing the user-facing payment workflow.
Original PR description
The function to change an expected pay date was on the res.partner model but it modifies an account move line. The function was moved to the account move line model since it makes more sense for it to be there.