I need to override the action_button_confirm method from the sales.order model, but i can't make the inheritance work. It seems that this code is never called during execution.
I'ḿ using odoo 8.0. The module is installed and depends on sale module.
# -*- coding: utf-8 -*-
from openerp import models, fields, api
import logging
_logger =logging.getLogger(__name__)
class sales_warning(models.Model):
_inherit = "sale.order"
@api.multi
def action_button_confirm(self):
_logger.info("begin overwritten action_button_confirm()")
res = super(sales_warning, self).action_button_confirm()
return res
Are you import this file in __init__.py folder
Yes. I found out the problem was the indentation. This left my procedure outside the class.