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 call method on button using v8 codding standard?
Here i have state selection field on my model, i have button when i click on that button than state should be change via button .
What i need to do?
Here you go!
**In xml file**
<button name="your_method_name" string="Button label" type="object" class="oe_hightlight"/>
** In py file**
from openerp import models,fields,api
_name = 'model.model' #your model name
#here is your method defination which you have called from xml file.
#body of your method
#here in this method you can direct access any field value for current record using self
return True #return True/False or as per your requrement.
Hope This will Help
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: 1/3/15, 1:17 PM|
|Seen: 2603 times|
|Last updated: 3/16/15, 8:10 AM|