From 15b1645b405f36b906eb37c4e05a1efe7ceb4513 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Tue, 30 Apr 2013 08:37:33 +0200 Subject: [PATCH] Use Active Record syntax to store cost price review840002 --- product.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/product.py b/product.py index cb43842ba0..18ee6a8473 100644 --- a/product.py +++ b/product.py @@ -334,8 +334,6 @@ class UpdateCostPrice(Wizard): return 'update_price' def transition_update_price(self): - Product = Pool().get('product.product') - Product.write([self.ask_price.product], { - 'cost_price': self.ask_price.cost_price, - }) + self.ask_price.product.cost_price = self.ask_price.cost_price + self.ask_price.product.save() return 'end'