[MIG] quality_control: Migration to 12.0

This commit is contained in:
Ignacio Ales
2019-05-10 09:55:37 +02:00
committed by Enrique Martín
parent 6a7c6010fb
commit d548ecfeaf
87 changed files with 30426 additions and 17956 deletions

View File

@@ -17,9 +17,8 @@ class QcTest(models.Model):
_description = 'Quality control test'
@api.multi
def _links_get(self):
link_obj = self.env['res.request.link']
return [(r.object, r.name) for r in link_obj.search([])]
def object_selection_values(self):
return set()
@api.onchange('type')
def onchange_type(self):
@@ -33,7 +32,7 @@ class QcTest(models.Model):
comodel_name='qc.test.question', inverse_name='test',
string='Questions', copy=True)
object_id = fields.Reference(
string='Reference object', selection=_links_get,)
string='Reference object', selection=object_selection_values,)
fill_correct_values = fields.Boolean(
string='Pre-fill with correct values')
type = fields.Selection(
@@ -89,7 +88,7 @@ class QcTestQuestion(models.Model):
digits=dp.get_precision('Quality Control'))
max_value = fields.Float(string='Max',
digits=dp.get_precision('Quality Control'),)
uom_id = fields.Many2one(comodel_name='product.uom', string='Uom')
uom_id = fields.Many2one(comodel_name='uom.uom', string='Uom')
class QcTestQuestionValue(models.Model):