Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sehrishnaz/1f82a15406c3cc8670515b7c9e256e0b to your computer and use it in GitHub Desktop.
Save sehrishnaz/1f82a15406c3cc8670515b7c9e256e0b to your computer and use it in GitHub Desktop.
Override Built-in Modules Button Method in Odoo
class account_voucher(models.Model):
_name = 'account.voucher'
def button_proforma_voucher(self, cr, uid, ids, context=None):
self.signal_workflow(cr, uid, ids, 'proforma_voucher')
return {'type': 'ir.actions.act_window_close'}
@sehrishnaz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment