[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:
Martin Trigaux
2017-05-19 14:32:56 +02:00
parent 53b5c48bc6
commit 0280354045
+1 -1
View File
@@ -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