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.
From a browse_record (and not from the pool with name_get function), how to know it default name ?
for example :
sale_order_line.product_id._default_name (it don't works)
You can call any object method directly from a
browse_record instance, no need to reach the pool. Method parameters
context will be passed automatically. To get the display name for your example:
Note that name_get returns a list of pairs:
If you really need to have the value as a field! you can create a function field that uses
name_get() to get the value.
The default name of a model can be specified by
- field specified in
If you want to have a generic way to always get the default name of an object you have to use
name_get function. The
browse_record does not provide a field like
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: 3/26/13, 1:04 PM|
|Seen: 4790 times|
|Last updated: 3/16/15, 8:10 AM|