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.
For example, i would like to combine into one values from form to create a one string (don't ask why i just need it. My knowledge won't let me :)
I know how to do it in other languages but not Python. Maybe framework allow to do it but i don't know how so please can anyone help me with ?
To merge the fields in one you can use compute on field. for example.
_inherit = 'res.partner' # extending partner model
return self.title or '' + self.name or '' # will return Partner Title + Partner Name(Mr. Openies)
merged_string = fields.Char(compute='merge_string') # adding one field which merges string
Note: Compute field will get computed when the record is getting saved.
you can also refer the odoo new api doc: http://odoo-new-api-guide-line.readthedocs.org/en/latest/fields.html#computed-fields
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/31/15, 4:35 AM|
|Seen: 700 times|
|Last updated: 4/5/15, 8:33 PM|