diff options
| author | RomainLibert <rli@odoo.com> | 2019-05-22 14:44:35 +0000 |
|---|---|---|
| committer | RomainLibert <rli@odoo.com> | 2019-05-22 14:48:34 +0000 |
| commit | f01ec63249b46620e6a52066ca985646b28aef18 (patch) | |
| tree | aa543f10475c5c2e8cfcde6f83c5ab9720c48068 /addons | |
| parent | 89de96410a1463bbafaa27f4c5bef0122ed747c1 (diff) | |
[FIX] lunch: write on order before checking wallet
lunch.cashmove.report only take into account orders that are ordered or
confirmed.
That means that in action_order we have to set the state to ordered
before checking the wallet content.
This will then raise the error and rollback the value
closes odoo/odoo#33583
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/lunch/models/lunch_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/lunch/models/lunch_order.py b/addons/lunch/models/lunch_order.py index 8ad99e9f940..67d5dc182e9 100644 --- a/addons/lunch/models/lunch_order.py +++ b/addons/lunch/models/lunch_order.py @@ -73,8 +73,8 @@ class LunchOrder(models.Model): 'To add some money to your wallet, please contact your lunch manager.')) def action_order(self): - self._check_wallet() self.write({'state': 'ordered'}) + self._check_wallet() def action_confirm(self): self.write({'state': 'confirmed'}) |
