[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)
This commit is contained in:
Martin Trigaux
2016-06-28 13:23:41 +02:00
parent 5d9e4b7858
commit 3e15b86428
-5
View File
@@ -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,
})