From caf4bf77bc568070636f6c2e2d4c90235e98e919 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 2 Jun 2014 15:48:24 +0200 Subject: [PATCH 1/3] [FIX] product: check if context is none in _set_standard_price before check context keys --- addons/product/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/product/product.py b/addons/product/product.py index 2369db49d43..a7a6b1ae1cb 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -458,6 +458,8 @@ class product_template(osv.osv): def _set_standard_price(self, cr, uid, product_tmpl_id, value, context=None): ''' Store the standard price change in order to be able to retrieve the cost of a product template for a given date''' + if context is None: + context = {} price_history_obj = self.pool['product.price.history'] user_company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id company_id = context.get('force_company', user_company) From da6f02027a65244405b69b595dbdb6467e0aaabc Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 3 Jun 2014 11:13:50 +0200 Subject: [PATCH 2/3] [FIX] product: set required at false for product template field when creating a product product. --- addons/product/product_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 9b5770a565d..ddecdea996b 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -270,7 +270,7 @@ - + From 91cb75babdd46284f08a191fe86774d8c8e674e0 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 3 Jun 2014 11:15:17 +0200 Subject: [PATCH 3/3] [FIX] product: remove wrong field on product.template. TODO: move packaging field form product.product to product.template --- addons/product/product.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index a7a6b1ae1cb..79c74a6a9cc 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -535,9 +535,6 @@ class product_template(osv.osv): "resized as a 64x64px image, with aspect ratio preserved. "\ "Use this field anywhere a small image is required."), - 'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', - help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."), - 'seller_ids': fields.one2many('product.supplierinfo', 'product_tmpl_id', 'Supplier'), 'seller_delay': fields.related('seller_ids','delay', type='integer', string='Supplier Lead Time', help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),