Skip to content

Commit

Permalink
[IMP] pos_disable_pricelist_selection: selectable pricelists
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Dec 15, 2023
1 parent a6f6a7b commit 1169e77
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pos_disable_pricelist_selection/models/pos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ def _compute_pricelist_id_domain(self):
("id", "in", rec.selectable_pricelist_ids.ids)
]

@api.onchange("available_pricelist_ids")
def onchange_selectable_pricelist_ids(self):
self.update(
{"selectable_pricelist_ids": [(6, 0, self.allowed_pricelist_ids.ids)]}
)

@api.depends("available_pricelist_ids")
def _compute_selectable_pricelist_ids(self):
for rec in self:
Expand Down

0 comments on commit 1169e77

Please sign in to comment.