[IMP] quality_control_mrp: required changes

* Limit access by groups in views
* Use api.model
This commit is contained in:
oihane
2015-11-18 16:55:01 +01:00
parent 75d638db0a
commit ba059c5572
6 changed files with 25 additions and 24 deletions

View File

@@ -1,7 +1,6 @@
# -*- 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 . import qc_inspection
from . import mrp_production

View File

@@ -1,7 +1,7 @@
# -*- 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
@@ -21,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(

View File

@@ -1,7 +1,7 @@
# -*- 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