def product_id_change(self, cr, uid, ids, product,uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
#ean_val=self.pool.get('product.product').browse(cr,uid,ids)
ean_val=self.pool.get('product.product').read(cr,uid,ids,['ean13'],context=context)
print "###############################eanval",ean_val --returns[]
print "###############################eanval##########",ean_val
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
Hi,
Try this code will help you
def product_id_change(self, cr, uid, ids, product,uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
ean_val_data=self.pool.get('product.product').browse(cr,uid,product)
prnit "ean_val_data",ean_val_data.ean13
ean_val=self.pool.get('product.product').read(cr,uid,product,['ean13'],context=context)
print "###############################eanval",ean_val --returns[]
print "###############################eanval##########",ean_val
Hi Jagdish,
Thx its working