[FIX] sale/res_config get_object raise by default
bzr revid: al@openerp.com-20140126194921-ef6uqsgqqmbar0du
This commit is contained in:
parent
864295fa1e
commit
fe59f115c0
|
@ -120,7 +120,7 @@ Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
|
|||
user = self.pool.get('res.users').browse(cr, uid, uid, context)
|
||||
res['time_unit'] = user.company_id.project_time_mode_id.id
|
||||
else:
|
||||
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant')
|
||||
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant', check=False)
|
||||
if product.exists():
|
||||
res['time_unit'] = product.uom_id.id
|
||||
return res
|
||||
|
@ -138,7 +138,7 @@ Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
|
|||
wizard = self.browse(cr, uid, ids)[0]
|
||||
|
||||
if wizard.time_unit:
|
||||
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant')
|
||||
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant', check=False)
|
||||
if product.exists():
|
||||
product.write({'uom_id': wizard.time_unit.id, 'uom_po_id': wizard.time_unit.id})
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue