From 3e15b86428ac2cf3eca7d0a915e9a6647a92db19 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 3 Jun 2016 16:19:07 +0200 Subject: [PATCH] [FIX] point_of_sale: do not insert related fields on one2many fields ref, journal_id and date on account.move.line are all related fields on the account.move. Setting a value here is then useless and triggers write on the account.move after the creation of the account.move.line (inverse values in write) --- addons/point_of_sale/point_of_sale.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index de213986d9b..29bee71a778 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1271,15 +1271,10 @@ class pos_order(osv.osv): def insert_data(data_type, values): # if have_to_group_by: - sale_journal_id = order.sale_journal.id - # 'quantity': line.qty, # 'product_id': line.product_id.id, values.update({ - 'ref': order.name, 'partner_id': order.partner_id and self.pool.get("res.partner")._find_accounting_partner(order.partner_id).id or False, - 'journal_id' : sale_journal_id, - 'date' : fields.date.context_today(self, cr, uid, context=context), 'move_id' : move_id, })