Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
20
sale_exception/wizard/sale_exception_confirm.py
Executable file
20
sale_exception/wizard/sale_exception_confirm.py
Executable file
@@ -0,0 +1,20 @@
|
||||
# Copyright 2011 Akretion, Sodexis
|
||||
# Copyright 2018 Akretion
|
||||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class SaleExceptionConfirm(models.TransientModel):
|
||||
_name = "sale.exception.confirm"
|
||||
_inherit = ["exception.rule.confirm"]
|
||||
_description = "Sale exception confirm wizard"
|
||||
|
||||
related_model_id = fields.Many2one("sale.order", "Sale")
|
||||
|
||||
def action_confirm(self):
|
||||
self.ensure_one()
|
||||
if self.ignore:
|
||||
self.related_model_id.action_ignore_exceptions()
|
||||
self.related_model_id.action_confirm()
|
||||
return super().action_confirm()
|
||||
Reference in New Issue
Block a user