From 837be69785ee24b8a7b0230ff6bc7e70cba5f5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 13 Sep 2016 13:52:15 +0200 Subject: [PATCH] [FIX] sale_timesheet: do not erase existing account on analytic line when updating it --- addons/sale_timesheet/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_timesheet/models/account.py b/addons/sale_timesheet/models/account.py index 9b8177a594c..23aa1bcb6c5 100644 --- a/addons/sale_timesheet/models/account.py +++ b/addons/sale_timesheet/models/account.py @@ -40,7 +40,7 @@ class AccountAnalyticLine(models.Model): return { 'amount': -unit_amount * cost, 'product_uom_id': uom.id, - 'account_id': emp.account_id.id, + 'account_id': values.get('account_id') or self.account_id.id or emp.account_id.id, } return {}