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 a2091a6 commit 9407ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pos_disable_pricelist_selection/models/pos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PosConfig(models.Model):
@api.depends("hide_pricelist_button")
def onchange_hide_pricelist_button(self):
self.update(
{"selectable_pricelist_ids": [6, 0, self.allowed_pricelist_ids.ids]}
{"selectable_pricelist_ids": [(6, 0, self.allowed_pricelist_ids.ids)]}
)

@api.depends(
Expand All @@ -34,7 +34,7 @@ def _compute_pricelist_id_domain(self):
rec.pricelist_id_domain = [("id", "in", rec.allowed_pricelist_ids.ids)]
else:
if not rec.selectable_pricelist_ids:
rec.selectable_pricelist_ids = [6, 0, rec.allowed_pricelist_ids.ids]
rec.selectable_pricelist_ids = [(6, 0, rec.allowed_pricelist_ids.ids)]
rec.pricelist_id_domain = [
("id", "in", rec.selectable_pricelist_ids.ids)
]

0 comments on commit 9407ed7

Please sign in to comment.