Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] product,sale,point_of_sale: fix
sales
page visibility
Before this commit, the `Sales` page is always visible in product form view when `point_of_sale` and/or `sale` modules are installed even if the product cannot be sold. The reason is because the initial condition contained in `attrs="{'invisible': ...}"` for that page has been completely removed since the recent changes to remove `attrs` attribute and allow having python condition inside `invisible`, `readonly` and `required` attributes (instead of having only True or False as value for those attributes). This commit reviews the visibility condition for that page to completely hide that page in product module as it is currently the case but it also adds the condition we had in attrs. That is, in product module, the invisible attribute for that page will be equal to `1 or not sale_ok` (and so always invisible thanks to `1 or ...`) and when `sales` or `point_of_sale` modules will be installed then `1 or ` will be removed to just keep `not sale_ok` inside `invisible` attribute. task-3506730 closes odoo#135840 Signed-off-by: Xavier Bol (xbo) <[email protected]>
- Loading branch information