From bbd78731829ec9cdae0b1d2500c157bd0e75ad19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 16 Apr 2013 15:34:13 +0200 Subject: [PATCH] Fix process for cache management of browse record When related records are created, the local cache of the browse record is not clear so at the second loop in process the local cache is already filled with empty one2many (like moves). issue3111 review755002 --- sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sale.py b/sale.py index f5e83f8e64..3d1700aa08 100644 --- a/sale.py +++ b/sale.py @@ -911,7 +911,8 @@ class Sale(Workflow, ModelSQL, ModelView): @Workflow.transition('processing') def process(self, ids): done = [] - for sale in self.browse(ids): + for sale_id in ids: + sale = self.browse(sale_id) if sale.state in ('done', 'cancel'): continue self.create_invoice(sale, 'out_invoice')