Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
2586 Zobrazení

   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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Autor Nejlepší odpověď

Hi Jagdish,
Thx its working

Avatar
Zrušit