[FIX] point_of_sale: recompute for current session only
The previous trigger would recompute all sessions of a config when modifying the cash_control flag on the config. It was not possible to enable cash_control if a previous session wasn't in cash control mode. Recompute only when changing the config.
This commit is contained in:
@@ -112,7 +112,7 @@ class PosSession(models.Model):
|
||||
action['domain'] = [('id', 'in', pickings.ids)]
|
||||
return action
|
||||
|
||||
@api.depends('config_id.cash_control')
|
||||
@api.depends('config_id', 'statement_ids')
|
||||
def _compute_cash_all(self):
|
||||
for session in self:
|
||||
session.cash_journal_id = session.cash_register_id = session.cash_control = False
|
||||
|
||||
Reference in New Issue
Block a user