mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[ADD] base_exception_user,sale_exception_user,stock_exception: allow certain users to ignore exceptions, add exceptions on delivery orders
This commit is contained in:
16
sale_exception_user/wizard/sale_exception_confirm.py
Normal file
16
sale_exception_user/wizard/sale_exception_confirm.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class SaleExceptionConfirm(models.TransientModel):
|
||||
_inherit = 'sale.exception.confirm'
|
||||
|
||||
def action_confirm(self):
|
||||
res = super().action_confirm()
|
||||
if self.ignore:
|
||||
self.related_model_id.action_confirm()
|
||||
return res
|
||||
|
||||
def _action_ignore(self):
|
||||
self.related_model_id.ignore_exception = True
|
||||
self.related_model_id.action_confirm()
|
||||
return super()._action_ignore()
|
||||
Reference in New Issue
Block a user