Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
2588 Weergaven

   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
Annuleer
Beste antwoord

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
Annuleer
Auteur Beste antwoord

Hi Jagdish,
Thx its working

Avatar
Annuleer