From cc6f7c2bca9a87a2dfe20cb167709cbdebd39bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 21 Jan 2010 21:04:54 +0100 Subject: [PATCH] Writing move on sale line require to bypass rules --- sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sale.py b/sale.py index 2d254975aa..95beedc7ff 100644 --- a/sale.py +++ b/sale.py @@ -890,9 +890,9 @@ class Sale(ModelWorkflow, ModelSQL, ModelView): vals = moves[line_id] vals['shipment_out'] = shipment_id move_id = move_obj.create(cursor, 0, vals, context=ctx) - sale_line_obj.write(cursor, user, line_id, { + sale_line_obj.write(cursor, 0, line_id, { 'moves': [('add', move_id)], - }, context=context) + }, context=ctx) shipment_obj.workflow_trigger_validate(cursor, 0, shipment_id, 'waiting', context=ctx) return shipment_id