summaryrefslogtreecommitdiff
path: root/addons/lunch/models
diff options
context:
space:
mode:
authorRichard Mathot <rim@odoo.com>2017-04-20 09:16:03 +0200
committerRichard Mathot <rim@odoo.com>2017-04-20 09:16:03 +0200
commit8f199e4f2004ae81ae1563dd90e4d23ced826d9c (patch)
tree2337bbcf76e5df7a3d668f1880d555d04a7c81e4 /addons/lunch/models
parent841af2acb392045b97e0b7e0c56d2fd9ce88515c (diff)
[FIX] lunch: avoid unassigned variable
Since 54245deebda56a24f7a2b266cc93f72670f77eef, when you clicked twice on the button "Confirm" on a slow connection, you could get an error as values is not always defined. This commit fixes the bad indentation level :)
Diffstat (limited to 'addons/lunch/models')
-rw-r--r--addons/lunch/models/lunch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/lunch/models/lunch.py b/addons/lunch/models/lunch.py
index b7407ce0386..23a8ad9ab18 100644
--- a/addons/lunch/models/lunch.py
+++ b/addons/lunch/models/lunch.py
@@ -203,8 +203,8 @@ class LunchOrderLine(models.Model):
'state': 'order',
'date': self.date,
}
- self.env['lunch.cashmove'].create(values)
- self.state = 'confirmed'
+ self.env['lunch.cashmove'].create(values)
+ self.state = 'confirmed'
else:
raise AccessError(_("Only your lunch manager sets the orders as received."))