mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-27 07:32:02 +02:00
19.0 vanilla
This commit is contained in:
parent
accf5918df
commit
6e65e8c877
688 changed files with 225434 additions and 199401 deletions
|
|
@ -0,0 +1,15 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
_inherit = 'mrp.production'
|
||||
|
||||
def button_unbuild(self):
|
||||
if self.subcontractor_id:
|
||||
raise UserError(_(
|
||||
"You can't unbuild a subcontracted Manufacturing Order.",
|
||||
))
|
||||
return super().button_unbuild()
|
||||
Loading…
Add table
Add a link
Reference in a new issue