From 494093ebf9603d23f78f0658d1aff81e1340adf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Thu, 16 Sep 2021 09:15:37 +0200 Subject: [PATCH] [FIX] quality_control_oca: Remove object_id and type fields in Quality control test model because they have no use. TT31885 --- .../demo/quality_control_demo.xml | 1 - quality_control_oca/models/qc_test.py | 17 ----------------- quality_control_oca/views/qc_test_view.xml | 7 ------- 3 files changed, 25 deletions(-) diff --git a/quality_control_oca/demo/quality_control_demo.xml b/quality_control_oca/demo/quality_control_demo.xml index c70cf1428aa..ca294a7b7ef 100644 --- a/quality_control_oca/demo/quality_control_demo.xml +++ b/quality_control_oca/demo/quality_control_demo.xml @@ -3,7 +3,6 @@ Generic Test (demo) - generic diff --git a/quality_control_oca/models/qc_test.py b/quality_control_oca/models/qc_test.py index 460db7b98ed..16382dc9d77 100644 --- a/quality_control_oca/models/qc_test.py +++ b/quality_control_oca/models/qc_test.py @@ -16,14 +16,6 @@ class QcTest(models.Model): _name = "qc.test" _description = "Quality control test" - def object_selection_values(self): - return set() - - @api.onchange("type") - def onchange_type(self): - if self.type == "generic": - self.object_id = False - active = fields.Boolean("Active", default=True) name = fields.Char(string="Name", required=True, translate=True) test_lines = fields.One2many( @@ -32,16 +24,7 @@ def onchange_type(self): string="Questions", copy=True, ) - object_id = fields.Reference( - string="Reference object", selection="object_selection_values", - ) fill_correct_values = fields.Boolean(string="Pre-fill with correct values") - type = fields.Selection( - [("generic", "Generic"), ("related", "Related")], - string="Type", - required=True, - default="generic", - ) category = fields.Many2one(comodel_name="qc.test.category", string="Category") company_id = fields.Many2one( comodel_name="res.company", diff --git a/quality_control_oca/views/qc_test_view.xml b/quality_control_oca/views/qc_test_view.xml index baa9aaab5cd..30c960ed0e5 100644 --- a/quality_control_oca/views/qc_test_view.xml +++ b/quality_control_oca/views/qc_test_view.xml @@ -18,11 +18,6 @@ - - @@ -56,8 +51,6 @@ - -