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.
I don't understand why my default values that I set in models I inherits from somewhere elses doesn't work. In other words, default="DEFAULT TEXT" doesn't work in entities I will eventually inherits from.
Why isn't working... and what would be the alternative? I tried setting only the the default property on the destination model, but odoo complains this is not valid. Any other idea?
Regarding:what would be the alternative
Override the default_get Like:
#Now update the res here.
In ODOO Admin can also set the default value of fields from Setting->Technical->Actions->User defined Defaults .
For example for setting default account_id in account.invoice :
Go to Setting->Technical->Actions->User defined Defaults.
Create a record for your model.
Inside name place your filed name(account_id).
Inside model place your model name(account.invoice).
inside Default value place the default value (id_number)
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/9/16, 5:35 PM|
|Seen: 1526 times|
|Last updated: 5/10/16, 2:16 AM|