From b81d0d043635fc8457f6caae68e373964bc51e10 Mon Sep 17 00:00:00 2001 From: DJ Patel Date: Thu, 10 Apr 2014 11:00:41 +0530 Subject: [PATCH] [FIX] stock_landed_costs : Fixed the onchange method on product. bzr revid: mdi@tinyerp.com-20140410053041-227rgrwi9uzyc16w --- addons/stock_landed_costs/stock_landed_costs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock_landed_costs/stock_landed_costs.py b/addons/stock_landed_costs/stock_landed_costs.py index 81d8c799ab0..43cdb72fada 100644 --- a/addons/stock_landed_costs/stock_landed_costs.py +++ b/addons/stock_landed_costs/stock_landed_costs.py @@ -137,10 +137,10 @@ class stock_landed_cost_lines(osv.osv): _name = 'stock.landed.cost.lines' _description = 'Stock Landed Cost Lines' - def onchange_product_id(self, cr, uid, ids, product_id=False, quantity=0.0, uom_id=False, price_unit=0.0, account_id=False, context=None): + def onchange_product_id(self, cr, uid, ids, product_id=False, price_unit=0.0, account_id=False, context=None): result = {} if not product_id: - return {'value': {'quantity': 0.0, 'uom_id': False, 'price_unit': 0.0}} + return {'value': {'quantity': 0.0, 'price_unit': 0.0}} product = self.pool.get('product.product').browse(cr, uid, product_id, context=context) result['name'] = product.name @@ -153,7 +153,7 @@ class stock_landed_cost_lines(osv.osv): 'cost_id': fields.many2one('stock.landed.cost', 'Landed Cost', required=True, ondelete='cascade'), 'product_id': fields.many2one('product.product', 'Product', required=True), 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')), - 'split_method': fields.selection(product.SPLIT_METHOD, string='Split Method'), + 'split_method': fields.selection(product.SPLIT_METHOD, string='Split Method', required=True), 'account_id': fields.many2one('account.account', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]), }