Daily updates from Odoo
Monday, January 20, 2020
3 changes
Code cleanup and technical improvements
This update mainly cleans and reorganizes stock inventory code by removing unused pieces and aligning it with Odoo coding guidelines, which should make future maintenance safer and faster. It also makes the Post Inventory button visible to manufacturing users outside debug mode, improving day-to-day access for production workflows.
Original PR description
[REF] stock: move line: some guidelines - move all the constrains at the same place, make sure they are private - move all the onchanges at the same place, make sure they are private - move `_get_similar_move_lines` helper at the bottom of the file with the other helpers [REF] stock: clean imports Clean imports of the main stock module: - Remove unsued import - Follow odoo guidelines - Sort them [REM] stock: remove dead-code Remove dead code of the main stock module: - Unused actions - Unused private methods - Unused helper methods test
This update removes duplicate website-side error handling because the shared crash manager now handles those issues consistently. It reduces unnecessary code and helps keep frontend error reporting simpler and easier to maintain.
The website editor now ignores visibility dependencies that do not exist for the current snippet, instead of hiding the option. This makes shared editor options easier to reuse across different snippets while still allowing special behavior for specific snippets.
Original PR description
Left panel widgets can define the widgets they depend on to be visible. Up to now, if such a dependency was defined but that the related widget was not found, the dependency was considered as not met. Now, it acts as if that particular dependency was not defined at all. This is useful for controlling the visibility of a generic option in the case of a specific snippet without having to duplicate and restrict that generic option. E.g. There is a generic "color" option on all snippets. For my snippet "hello" I only want that generic "color" option to be visible if my "world" option is enabled. I then add `data-dependencies="world"` on the generic "color" option. In the case, any other snippet than "hello" is used, since the "world" option does not exist there, the "color" option acts as if it had no dependency.