mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] quality_control_mrp: migrated from odoomrp/odoomrp-wip
[IMP] quality_control_mrp: required changes * Limit access by groups in views * Use api.model
This commit is contained in:
committed by
Oihane Crucelaegui
parent
6e8e007b46
commit
39250af1ed
@@ -1,8 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
# For copyright and license notices, see __openerp__.py file in root directory
|
||||
##############################################################################
|
||||
# (c) 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp.addons.quality_control.models.qc_trigger_line import\
|
||||
_filter_trigger_lines
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
@@ -19,14 +21,7 @@ class MrpProduction(models.Model):
|
||||
created_inspections = fields.Integer(
|
||||
compute="_count_inspections", string="Created inspections")
|
||||
|
||||
@api.v7
|
||||
def action_produce(self, cr, uid, production_id, production_qty,
|
||||
production_mode, wiz=False, context=None):
|
||||
production = self.browse(cr, uid, production_id, context=context)
|
||||
production.action_produce(
|
||||
production_id, production_qty, production_mode, wiz=wiz)
|
||||
|
||||
@api.v8
|
||||
@api.model
|
||||
def action_produce(self, production_id, production_qty, production_mode,
|
||||
wiz=False):
|
||||
res = super(MrpProduction, self).action_produce(
|
||||
@@ -42,6 +37,6 @@ class MrpProduction(models.Model):
|
||||
trigger_lines = trigger_lines.union(
|
||||
self.env[model].get_trigger_line_for_product(
|
||||
qc_trigger, move.product_id))
|
||||
for trigger_line in trigger_lines:
|
||||
for trigger_line in _filter_trigger_lines(trigger_lines):
|
||||
inspection_model._make_inspection(move, trigger_line)
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user