Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hai Friends ,
First I thank everyone who give good guideline for newbie in OpenERP . I have question regards predefined fields - _rec_name in OpenERP .
- Its not clear for me , _rec_name predefined fields in OpenERP . Friends can you please explain with sample module .It more useful for clear understanding .
Thanks & Regards OMPRAKASH.A
_name is used to define object like
account.invoice, sale.order, purchase.order, res.users.
When you have name field in your columns, you don't need to define field in
_rec_name. OpenERP takes name field by default.
You have seen name in any form when you select
many2one field. For example in Sale Order when you select Customer, you can see Customer's Name in that
many2one field. Now if you want to show Customer's Phone Number in
many2one field, you have to define
phone field in
_rec_name like this:
_rec_name = 'phone'
If your columns don't have any name field then you have to define any field in
There are other reasons which Prakash described in his answer.
I have another doubt here.I want to know the way to find which field is applied in _rec_name in the particular model.
I have taken that model id from ir.model table and also I could find all the fields list created in that model through ir.model.fields table.But I could not find which field is used in _rec_name
Could you please help me?
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/17/13, 9:07 AM|
|Seen: 11438 times|
|Last updated: 1/20/17, 12:31 PM|