Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

def product_id_change method returns ean_val =[] pls need help.........

By
Odoo
on 5/22/14, 3:33 AM 569 views

   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

0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 5/22/14, 3:41 AM

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

0

Odoo

--Odoo --
1328
| 5 2 5
kerala, India
--Odoo --

Working as a Odoo Functional and Technical Expert

Odoo
On 5/22/14, 9:07 PM

Hi Jagdish,
Thx its working

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/22/14, 3:33 AM
Seen: 569 times
Last updated: 3/16/15, 8:10 AM