From f04e44c681fd55a7d1e65ea550bd149a2a64f66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 29 Aug 2014 16:21:21 +0200 Subject: [PATCH] The cancellation of move should not compute cost price because such move can not be done (prevented by _deny_modify_done_cancel). issue4107 review11421002 --- move.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/move.py b/move.py index f2019cbee8..a86ae91da5 100644 --- a/move.py +++ b/move.py @@ -632,22 +632,7 @@ class Move(Workflow, ModelSQL, ModelView): @ModelView.button @Workflow.transition('cancel') def cancel(cls, moves): - pool = Pool() - Date = pool.get('ir.date') - - today = Date.today() - for move in moves: - move.effective_date = today - if (move.from_location.type in ('supplier', 'production') - and move.to_location.type == 'storage' - and move.product.cost_price_method == 'average'): - move._update_product_cost_price('out') - elif (move.to_location.type == 'supplier' - and move.from_location.type == 'storage' - and move.product.cost_price_method == 'average'): - move._update_product_cost_price('in') - move.effective_date = None - move.save() + pass @classmethod def create(cls, vlist):