From 8f199e4f2004ae81ae1563dd90e4d23ced826d9c Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Thu, 20 Apr 2017 09:16:03 +0200 Subject: [PATCH] [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 :) --- addons/lunch/models/lunch.py | 4 ++-- 1 file 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."))