Odoo Help
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.
How to define on change method [Closed]
I have 2 fields , code district and sub-district name . I want when the code is selected then the name of the subdistrict appear (output) .please help me with code
@susi
If you are saying that you have stored the value of "subdistrict" and based on the value of "code_district" then in Odoo you can write the following on_change method
@api.onchange("code_district")
def onchange_distict(self):
<<your code to fetch the sub district based on code_district>>
<<you can get the value of code_district as self.code_district>>
<<then>>
self.sub_district = <<fetched value>>
hope this helps !!
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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 12/20/14, 8:21 AM |
Seen: 896 times |
Last updated: 1/21/16, 11:18 PM |