mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
19 lines
573 B
Python
19 lines
573 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from openerp import api, models
|
|
|
|
|
|
class StockMove(models.Model):
|
|
_inherit = "stock.move"
|
|
|
|
@api.model
|
|
def create(self, vals):
|
|
if 'production_id' in vals:
|
|
production = self.env['mrp.production'].browse(
|
|
vals['production_id'])
|
|
if production.mrp_production_request_id:
|
|
vals['propagate'] = False
|
|
return super(StockMove, self).create(vals)
|