Odoo Help


How can I add a field in sale.order.line

on 4/11/13, 1:52 AM 2,942 views

I write a field in product.py:

        'english_name':fields.char('English Name', size=128, select=True),

and I want to add this field in the sale.order.line. If I should write a realted ? I try to write like this in sale.py:

'product_eng_id': fields.related('english_name','product_eng_id', type = "many2one", relation = "product.product" , string = 'english name',store=False),

But it also show the "name" instead of "english_name"..I don't know what's wrong,maybe the relation is not product.product?..My fields.related have some problems?


Omal Bastin

--Omal Bastin--

| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 4/11/13, 7:23 AM

i think you have added the field 'english_name' in the model 'product.product' and want to add related field in 'sale.order.line'

In the 'sale.order.line' model add

'product_eng_name':fields.related('product_id', 'english_name', type='char', size=64,string='Product English Name'),

Thanks so much~~It can work now

on 4/12/13, 3:55 AM

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 4/11/13, 2:37 AM

Try this:

'product_eng_name': fields.related('product_eng_id', 'english_name', type='char', string='Product English Name'),

Thanks so much~~

on 4/12/13, 3:56 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/11/13, 1:52 AM
Seen: 2942 times
Last updated: 2/12/18, 5:38 AM