feat: Add mrp.production.backorder and mrp.consumption.warning models to bypass user restrictions for their respective actions.
This commit is contained in:
parent
381bf9b354
commit
c283e1990c
@ -3,6 +3,8 @@ from . import restricted_models
|
||||
from . import sale_order
|
||||
from . import mrp_production
|
||||
from . import stock_picking
|
||||
from . import mrp_consumption_warning
|
||||
from . import mrp_production_backorder
|
||||
from . import approval_request
|
||||
from . import procurement_group
|
||||
from . import stock_move
|
||||
|
||||
10
models/mrp_consumption_warning.py
Normal file
10
models/mrp_consumption_warning.py
Normal file
@ -0,0 +1,10 @@
|
||||
from odoo import models
|
||||
|
||||
class MrpConsumptionWarning(models.TransientModel):
|
||||
_inherit = 'mrp.consumption.warning'
|
||||
|
||||
def action_confirm(self):
|
||||
return super(MrpConsumptionWarning, self.with_context(bypass_user_restriction=True)).action_confirm()
|
||||
|
||||
def action_set_qty(self):
|
||||
return super(MrpConsumptionWarning, self.with_context(bypass_user_restriction=True)).action_set_qty()
|
||||
10
models/mrp_production_backorder.py
Normal file
10
models/mrp_production_backorder.py
Normal file
@ -0,0 +1,10 @@
|
||||
from odoo import models
|
||||
|
||||
class MrpProductionBackorder(models.TransientModel):
|
||||
_inherit = 'mrp.production.backorder'
|
||||
|
||||
def action_backorder(self):
|
||||
return super(MrpProductionBackorder, self.with_context(bypass_user_restriction=True)).action_backorder()
|
||||
|
||||
def action_close_mo(self):
|
||||
return super(MrpProductionBackorder, self.with_context(bypass_user_restriction=True)).action_close_mo()
|
||||
Loading…
Reference in New Issue
Block a user