my field
My view
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
my field
My view
It's a two steps manipulation, you create the button in the view as you did for refurse,confirm and validate, then you create a function with the same name as the button's name. here's the simplest way to do it:
@api.multi
def action_draft(self):
self.write({'state': 'draft'})
<button name="action_draft" string="return to draft" states="confirm,validate" type="object"groups="hr.group_hr_user,hr.group_hr_manager"/>
ok, I see . Thank you very much
Hello
add new button "Reset to Draft" with type object. and call the method which set the State to "Draft".
for more information you can see into Sale order or Accounting Invoice part.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up