diff --git a/sale_confirm_wizard/__init__.py b/sale_confirm_wizard/__init__.py index 3b4c3ed..7971819 100644 --- a/sale_confirm_wizard/__init__.py +++ b/sale_confirm_wizard/__init__.py @@ -1,3 +1,4 @@ # -*- coding: utf-8 -*- +from . import sale from . import wizard diff --git a/sale_confirm_wizard/sale.py b/sale_confirm_wizard/sale.py new file mode 100644 index 0000000..8eacbfe --- /dev/null +++ b/sale_confirm_wizard/sale.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + def sale_confirm_wizard_button(self): + """This method is designed to be inherited. + For example, inherit it if you don't want to start the wizard in + some scenarios""" + action = self.env.ref( + 'sale_confirm_wizard.sale_confirm_action').read()[0] + return action diff --git a/sale_confirm_wizard/sale_view.xml b/sale_confirm_wizard/sale_view.xml index 7aa163f..28e36d9 100644 --- a/sale_confirm_wizard/sale_view.xml +++ b/sale_confirm_wizard/sale_view.xml @@ -12,12 +12,10 @@