Files
manufacture/quality_control/wizard/qc_test_wizard.py
Pedro M. Baeza 75332fdee6 [IMP] quality_control:
Total refactorization with new API, README files, and new concepts.
* Triggers for product category
* ACLs
* Tolerances in questions
* one2many copyable
* Fix some views
* Error on same tolerance
* Colors on inspection lines
* Unify inspection header data assignment in set_test method
* key name in set_test
* Change icon set
2015-10-26 16:49:50 +01:00

24 lines
912 B
Python

# -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class QcInspectionSetTest(models.TransientModel):
"""This wizard is responsible for setting the test for a given
inspection. This will not only fill in the 'test' field, but will
also fill in all lines of the inspection with the corresponding lines of
the template.
"""
_name = 'qc.inspection.set.test'
test = fields.Many2one(comodel_name='qc.test', string='Test')
@api.multi
def action_create_test(self):
inspection_obj = self.env['qc.inspection']
inspection_obj.browse(self.env.context['active_id']).set_test(
self.test)
return True