Hello ,
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?
need help.
thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello ,
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?
need help.
thanks.
Hello Prince,
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
class your_class_name(models.Model)
_name = 'model.model' #your model name
#here is your method defination which you have called from xml file.
@api.multi
def your_method_name(self)
#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
Regards,
Anil.
関連投稿 | 返信 | ビュー | 活動 | |
---|---|---|---|---|
|
3
12月 22
|
5301 | ||
|
0
9月 15
|
5623 | ||
|
0
3月 25
|
822 | ||
|
0
1月 25
|
2944 | ||
|
1
8月 23
|
13994 |