mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] quality_control: Migration to 11.0
This commit is contained in:
committed by
Enrique Martín
parent
1a55aa36f0
commit
404a1bee2d
@@ -48,7 +48,7 @@ Usage
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/129/10.0
|
||||
:target: https://runbot.odoo-community.org/runbot/129/11.0
|
||||
|
||||
|
||||
Known issues / Roadmap
|
||||
@@ -80,6 +80,7 @@ Contributors
|
||||
* Ana Juaristi <anajuaristi@avanzosc.es>
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
* Simone Rubino <simone.rubino@agilebg.com>
|
||||
* Juan Humanes <juan.humanes@guadaltech.es>
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import models
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
@@ -8,9 +7,10 @@
|
||||
|
||||
{
|
||||
"name": "Quality control",
|
||||
"version": "10.0.1.0.3",
|
||||
"version": "11.0.1.0.0",
|
||||
"category": "Quality control",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Generic infrastructure for quality tests.",
|
||||
"author": "OdooMRP team, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/manufacture/tree/10.0/quality_control",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
@@ -160,7 +160,7 @@ msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: code:addons/quality_control/models/qc_test_category.py:37
|
||||
#: code:addons/quality_control/models/qc_test_category.py:36
|
||||
#, python-format
|
||||
msgid "Error! You can not create recursive categories."
|
||||
msgstr ""
|
||||
@@ -392,8 +392,8 @@ msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: model:ir.model,name:quality_control.model_product_product
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_inspection_line_product
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_inspection_product
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_inspection_line_product_id
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_inspection_product_id
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_trigger_product_line_product
|
||||
#: model:ir.ui.view,arch_db:quality_control.qc_inspection_line_search_view
|
||||
#: model:ir.ui.view,arch_db:quality_control.qc_inspection_search_view
|
||||
@@ -402,30 +402,22 @@ msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: model:ir.model,name:quality_control.model_product_category
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_trigger_product_category_line_product_category
|
||||
msgid "Product Category"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: model:ir.model,name:quality_control.model_product_template
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_trigger_product_template_line_product_template
|
||||
msgid "Product Template"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: model:ir.model.fields,help:quality_control.field_qc_inspection_line_product
|
||||
#: model:ir.model.fields,help:quality_control.field_qc_inspection_product
|
||||
#: model:ir.model.fields,help:quality_control.field_qc_inspection_line_product_id
|
||||
#: model:ir.model.fields,help:quality_control.field_qc_inspection_product_id
|
||||
msgid "Product associated with the inspection"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_trigger_product_category_line_product_category
|
||||
msgid "Product category"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: model:ir.model.fields,field_description:quality_control.field_qc_trigger_product_template_line_product_template
|
||||
msgid "Product template"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: selection:qc.inspection.line,question_type:0
|
||||
#: selection:qc.test.question,type:0
|
||||
@@ -519,13 +511,13 @@ msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: code:addons/quality_control/models/qc_test.py:73
|
||||
#: code:addons/quality_control/models/qc_test.py:72
|
||||
#, python-format
|
||||
msgid "Question '%s' is not valid: minimum value can't be higher than maximum value."
|
||||
msgstr ""
|
||||
|
||||
#. module: quality_control
|
||||
#: code:addons/quality_control/models/qc_test.py:64
|
||||
#: code:addons/quality_control/models/qc_test.py:63
|
||||
#, python-format
|
||||
msgid "Question '%s' is not valid: you have to mark at least one value as OK."
|
||||
msgstr ""
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import qc_trigger
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
@@ -14,25 +13,25 @@ import odoo.addons.decimal_precision as dp
|
||||
class QcInspection(models.Model):
|
||||
_name = 'qc.inspection'
|
||||
_description = 'Quality control inspection'
|
||||
_inherit = ['mail.thread', 'ir.needaction_mixin']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
|
||||
@api.one
|
||||
@api.depends('inspection_lines', 'inspection_lines.success')
|
||||
def _success(self):
|
||||
self.success = all([x.success for x in self.inspection_lines])
|
||||
def _compute_success(self):
|
||||
for i in self:
|
||||
i.success = all([x.success for x in i.inspection_lines])
|
||||
|
||||
@api.multi
|
||||
def _links_get(self):
|
||||
link_obj = self.env['res.request.link']
|
||||
return [(r.object, r.name) for r in link_obj.search([])]
|
||||
|
||||
@api.one
|
||||
@api.depends('object_id')
|
||||
def _get_product(self):
|
||||
if self.object_id and self.object_id._name == 'product.product':
|
||||
self.product = self.object_id
|
||||
else:
|
||||
self.product = False
|
||||
def _compute_product_id(self):
|
||||
for i in self:
|
||||
if i.object_id and i.object_id._name == 'product.product':
|
||||
i.product_id = i.object_id
|
||||
else:
|
||||
i.product_id = False
|
||||
|
||||
name = fields.Char(
|
||||
string='Inspection number', required=True, default='/',
|
||||
@@ -44,9 +43,10 @@ class QcInspection(models.Model):
|
||||
object_id = fields.Reference(
|
||||
string='Reference', selection=_links_get, readonly=True,
|
||||
states={'draft': [('readonly', False)]}, ondelete="set null")
|
||||
product = fields.Many2one(
|
||||
comodel_name="product.product", compute="_get_product", store=True,
|
||||
help="Product associated with the inspection")
|
||||
product_id = fields.Many2one(
|
||||
comodel_name="product.product", compute="_compute_product_id",
|
||||
store=True, help="Product associated with the inspection",
|
||||
oldname='product')
|
||||
qty = fields.Float(string="Quantity", default=1.0)
|
||||
test = fields.Many2one(
|
||||
comodel_name='qc.test', string='Test', readonly=True)
|
||||
@@ -69,7 +69,7 @@ class QcInspection(models.Model):
|
||||
string='State', readonly=True, default='draft',
|
||||
track_visibility='onchange')
|
||||
success = fields.Boolean(
|
||||
compute="_success", string='Success',
|
||||
compute="_compute_success", string='Success',
|
||||
help='This field will be marked if all tests have succeeded.',
|
||||
store=True)
|
||||
auto_generated = fields.Boolean(
|
||||
@@ -228,42 +228,43 @@ class QcInspectionLine(models.Model):
|
||||
_name = 'qc.inspection.line'
|
||||
_description = "Quality control inspection line"
|
||||
|
||||
@api.one
|
||||
@api.depends('question_type', 'uom_id', 'test_uom_id', 'max_value',
|
||||
'min_value', 'quantitative_value', 'qualitative_value',
|
||||
'possible_ql_values')
|
||||
def quality_test_check(self):
|
||||
if self.question_type == 'qualitative':
|
||||
self.success = self.qualitative_value.ok
|
||||
else:
|
||||
if self.uom_id.id == self.test_uom_id.id:
|
||||
amount = self.quantitative_value
|
||||
def _compute_quality_test_check(self):
|
||||
for l in self:
|
||||
if l.question_type == 'qualitative':
|
||||
l.success = l.qualitative_value.ok
|
||||
else:
|
||||
amount = self.env['product.uom']._compute_quantity(
|
||||
self.quantitative_value,
|
||||
self.test_uom_id.id)
|
||||
self.success = self.max_value >= amount >= self.min_value
|
||||
if l.uom_id.id == l.test_uom_id.id:
|
||||
amount = l.quantitative_value
|
||||
else:
|
||||
amount = self.env['product.uom']._compute_quantity(
|
||||
l.quantitative_value,
|
||||
l.test_uom_id.id)
|
||||
l.success = l.max_value >= amount >= l.min_value
|
||||
|
||||
@api.one
|
||||
@api.depends('possible_ql_values', 'min_value', 'max_value', 'test_uom_id',
|
||||
'question_type')
|
||||
def get_valid_values(self):
|
||||
if self.question_type == 'qualitative':
|
||||
self.valid_values = ", ".join([x.name for x in
|
||||
self.possible_ql_values if x.ok])
|
||||
else:
|
||||
self.valid_values = "%s ~ %s" % (
|
||||
formatLang(self.env, self.min_value),
|
||||
formatLang(self.env, self.max_value))
|
||||
if self.env.ref("product.group_uom") in self.env.user.groups_id:
|
||||
self.valid_values += " %s" % self.test_uom_id.name
|
||||
def _compute_valid_values(self):
|
||||
for l in self:
|
||||
if l.question_type == 'qualitative':
|
||||
l.valid_values = \
|
||||
", ".join([x.name for x in l.possible_ql_values if x.ok])
|
||||
else:
|
||||
l.valid_values = "%s ~ %s" % (
|
||||
formatLang(self.env, l.min_value),
|
||||
formatLang(self.env, l.max_value))
|
||||
if self.env.ref("product.group_uom") \
|
||||
in self.env.user.groups_id:
|
||||
l.valid_values += " %s" % l.test_uom_id.name
|
||||
|
||||
inspection_id = fields.Many2one(
|
||||
comodel_name='qc.inspection', string='Inspection', ondelete='cascade')
|
||||
name = fields.Char(string="Question", readonly=True)
|
||||
product = fields.Many2one(
|
||||
comodel_name="product.product", related="inspection_id.product",
|
||||
store=True)
|
||||
product_id = fields.Many2one(
|
||||
comodel_name="product.product", related="inspection_id.product_id",
|
||||
store=True, oldname='product')
|
||||
test_line = fields.Many2one(
|
||||
comodel_name='qc.test.question', string='Test question',
|
||||
readonly=True)
|
||||
@@ -275,7 +276,7 @@ class QcInspectionLine(models.Model):
|
||||
qualitative_value = fields.Many2one(
|
||||
comodel_name='qc.test.question.value', string='Qualitative value',
|
||||
help="Value of the result for a qualitative question.",
|
||||
domain="[('id', 'in', possible_ql_values[0][2])]")
|
||||
domain="[('id', 'in', possible_ql_values)]")
|
||||
notes = fields.Text(string='Notes')
|
||||
min_value = fields.Float(
|
||||
string='Min', digits=dp.get_precision('Quality Control'),
|
||||
@@ -299,6 +300,6 @@ class QcInspectionLine(models.Model):
|
||||
('quantitative', 'Quantitative')],
|
||||
string='Question type', readonly=True)
|
||||
valid_values = fields.Char(string="Valid values", store=True,
|
||||
compute="get_valid_values")
|
||||
compute="_compute_valid_values")
|
||||
success = fields.Boolean(
|
||||
compute="quality_test_check", string="Success?", store=True)
|
||||
compute="_compute_quality_test_check", string="Success?", store=True)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
@@ -55,24 +54,24 @@ class QcTestQuestion(models.Model):
|
||||
_description = 'Quality control question'
|
||||
_order = 'sequence, id'
|
||||
|
||||
@api.one
|
||||
@api.constrains('ql_values')
|
||||
def _check_valid_answers(self):
|
||||
if (self.type == 'qualitative' and self.ql_values and
|
||||
not self.ql_values.filtered('ok')):
|
||||
raise exceptions.ValidationError(
|
||||
_("Question '%s' is not valid: "
|
||||
"you have to mark at least one value as OK.")
|
||||
% self.name_get()[0][1])
|
||||
for tc in self:
|
||||
if (tc.type == 'qualitative' and tc.ql_values and
|
||||
not tc.ql_values.filtered('ok')):
|
||||
raise exceptions.ValidationError(
|
||||
_("Question '%s' is not valid: "
|
||||
"you have to mark at least one value as OK.")
|
||||
% tc.name_get()[0][1])
|
||||
|
||||
@api.one
|
||||
@api.constrains('min_value', 'max_value')
|
||||
def _check_valid_range(self):
|
||||
if self.type == 'quantitative' and self.min_value > self.max_value:
|
||||
raise exceptions.ValidationError(
|
||||
_("Question '%s' is not valid: "
|
||||
"minimum value can't be higher than maximum value.")
|
||||
% self.name_get()[0][1])
|
||||
for tc in self:
|
||||
if tc.type == 'quantitative' and tc.min_value > tc.max_value:
|
||||
raise exceptions.ValidationError(
|
||||
_("Question '%s' is not valid: "
|
||||
"minimum value can't be higher than maximum value.")
|
||||
% tc.name_get()[0][1])
|
||||
|
||||
sequence = fields.Integer(
|
||||
string='Sequence', required=True, default="10")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
@@ -15,7 +14,7 @@ class QcTestTemplateCategory(models.Model):
|
||||
|
||||
@api.multi
|
||||
@api.depends('name', 'parent_id')
|
||||
def _get_complete_name(self):
|
||||
def _compute_get_complete_name(self):
|
||||
for record in self:
|
||||
names = [record.name or '']
|
||||
parent = record.parent_id
|
||||
@@ -41,7 +40,7 @@ class QcTestTemplateCategory(models.Model):
|
||||
parent_id = fields.Many2one(
|
||||
comodel_name='qc.test.category', string='Parent category')
|
||||
complete_name = fields.Char(
|
||||
compute="_get_complete_name", string='Full name')
|
||||
compute="_compute_get_complete_name", string='Full name')
|
||||
child_ids = fields.One2many(
|
||||
comodel_name='qc.test.category', inverse_name='parent_id',
|
||||
string='Child categories')
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import test_quality_control
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
@@ -58,9 +57,9 @@ class TestQualityControl(TransactionCase):
|
||||
self.assertTrue(
|
||||
self.inspection1.success,
|
||||
'Incorrect state in inspection %s' % self.inspection1.name)
|
||||
self.assertEquals(self.inspection1.state, 'success')
|
||||
self.assertEqual(self.inspection1.state, 'success')
|
||||
self.inspection1.action_approve()
|
||||
self.assertEquals(self.inspection1.state, 'success')
|
||||
self.assertEqual(self.inspection1.state, 'success')
|
||||
|
||||
def test_inspection_incorrect(self):
|
||||
for line in self.inspection1.inspection_lines:
|
||||
@@ -76,9 +75,9 @@ class TestQualityControl(TransactionCase):
|
||||
self.assertFalse(
|
||||
self.inspection1.success,
|
||||
'Incorrect state in inspection %s' % self.inspection1.name)
|
||||
self.assertEquals(self.inspection1.state, 'waiting')
|
||||
self.assertEqual(self.inspection1.state, 'waiting')
|
||||
self.inspection1.action_approve()
|
||||
self.assertEquals(self.inspection1.state, 'failed')
|
||||
self.assertEqual(self.inspection1.state, 'failed')
|
||||
|
||||
def test_actions_errors(self):
|
||||
inspection2 = self.inspection1.copy()
|
||||
@@ -120,7 +119,7 @@ class TestQualityControl(TransactionCase):
|
||||
'name': 'Category TWO',
|
||||
'parent_id': category1.id,
|
||||
})
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
category2.complete_name,
|
||||
'%s / %s' % (category1.name, category2.name),
|
||||
'Something went wrong when computing complete name')
|
||||
@@ -150,20 +149,20 @@ class TestQualityControl(TransactionCase):
|
||||
trigger_lines = trigger_lines.union(
|
||||
self.env[model].get_trigger_line_for_product(
|
||||
self.qc_trigger, self.product))
|
||||
self.assertEquals(len(trigger_lines), 3)
|
||||
self.assertEqual(len(trigger_lines), 3)
|
||||
filtered_trigger_lines = _filter_trigger_lines(trigger_lines)
|
||||
self.assertEquals(len(filtered_trigger_lines), 1)
|
||||
self.assertEqual(len(filtered_trigger_lines), 1)
|
||||
for trigger_line in filtered_trigger_lines:
|
||||
inspection = self.inspection_model._make_inspection(
|
||||
self.product, trigger_line)
|
||||
self.assertEquals(inspection.state, 'ready')
|
||||
self.assertEqual(inspection.state, 'ready')
|
||||
self.assertTrue(inspection.auto_generated)
|
||||
self.assertEquals(inspection.test, self.test)
|
||||
self.assertEqual(inspection.test, self.test)
|
||||
for line in inspection.inspection_lines:
|
||||
if line.question_type == 'qualitative':
|
||||
self.assertEquals(line.qualitative_value, self.val_ok)
|
||||
self.assertEqual(line.qualitative_value, self.val_ok)
|
||||
elif line.question_type == 'quantitative':
|
||||
self.assertEquals(
|
||||
self.assertAlmostEqual(
|
||||
round(line.quantitative_value, 2), round((
|
||||
self.qn_question.min_value +
|
||||
self.qn_question.max_value) * 0.5, 2))
|
||||
@@ -173,9 +172,9 @@ class TestQualityControl(TransactionCase):
|
||||
self.inspection1.unlink()
|
||||
inspection2 = self.inspection1.copy()
|
||||
inspection2.action_cancel()
|
||||
self.assertEquals(inspection2.state, 'canceled')
|
||||
self.assertEqual(inspection2.state, 'canceled')
|
||||
inspection2.action_draft()
|
||||
self.assertEquals(inspection2.state, 'draft')
|
||||
self.assertEqual(inspection2.state, 'draft')
|
||||
inspection2.unlink()
|
||||
|
||||
def test_qc_inspection_auto_generate_unlink(self):
|
||||
@@ -190,8 +189,7 @@ class TestQualityControl(TransactionCase):
|
||||
self.inspection1.write({
|
||||
'object_id': '%s,%d' % (self.product._name, self.product.id),
|
||||
})
|
||||
self.assertEquals(self.inspection1.product,
|
||||
self.product)
|
||||
self.assertEqual(self.inspection1.product_id, self.product)
|
||||
|
||||
def test_qc_test_question_constraints(self):
|
||||
with self.assertRaises(exceptions.ValidationError):
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<field name="user" />
|
||||
<field name="object_id" />
|
||||
<field name="qty" />
|
||||
<field name="product" />
|
||||
<field name="product_id" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" />
|
||||
@@ -122,7 +122,7 @@
|
||||
<field name="user" />
|
||||
<field name="test" />
|
||||
<field name="qty" />
|
||||
<field name="product" />
|
||||
<field name="product_id" />
|
||||
<field name="success" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
@@ -138,7 +138,7 @@
|
||||
<field name="name" />
|
||||
<field name="user" />
|
||||
<field name="object_id" />
|
||||
<field name="product" />
|
||||
<field name="product_id" />
|
||||
<field name="test" />
|
||||
</group>
|
||||
<newline />
|
||||
@@ -159,7 +159,7 @@
|
||||
context="{'group_by': 'user'}" />
|
||||
<filter string="Product"
|
||||
domain="[]"
|
||||
context="{'group_by': 'product'}" />
|
||||
context="{'group_by': 'product_id'}" />
|
||||
<filter string="State"
|
||||
domain="[]"
|
||||
context="{'group_by': 'state'}" />
|
||||
@@ -192,7 +192,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Inspection lines" delete="false" create="false" colors="red: success==False">
|
||||
<field name="inspection_id" />
|
||||
<field name="product" />
|
||||
<field name="product_id" />
|
||||
<field name="name" />
|
||||
<field name="question_type" />
|
||||
<field name="possible_ql_values" invisible="1" />
|
||||
@@ -218,7 +218,7 @@
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="inspection_id" />
|
||||
<field name="product" />
|
||||
<field name="product_id" />
|
||||
<field name="success" />
|
||||
</group>
|
||||
<newline />
|
||||
@@ -233,7 +233,7 @@
|
||||
context="{'group_by': 'inspection_id'}" />
|
||||
<filter string="Product"
|
||||
domain="[]"
|
||||
context="{'group_by': 'product'}" />
|
||||
context="{'group_by': 'product_id'}" />
|
||||
<filter string="Question"
|
||||
domain="[]"
|
||||
context="{'group_by': 'name'}" />
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<field name="min_value"
|
||||
class="oe_inline"
|
||||
nolabel="1"
|
||||
attrs="{'required': [('type',' =', 'quantitative')]}" />
|
||||
attrs="{'required': [('type','=', 'quantitative')]}" />
|
||||
<span> - </span>
|
||||
<field name="max_value"
|
||||
class="oe_inline"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import qc_test_wizard
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
|
||||
Reference in New Issue
Block a user