Skip to content

Commit

Permalink
[FIX] quality_control_oca: Remove object_id and type fields in
Browse files Browse the repository at this point in the history
Quality control test model because they have no use.
TT31885
  • Loading branch information
victoralmau committed Sep 16, 2021
1 parent a353a4c commit 494093e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion quality_control_oca/demo/quality_control_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<data noupdate="1">
<record model="qc.test" id="qc_test_1">
<field name="name">Generic Test (demo)</field>
<field name="type">generic</field>
<field name="active" eval="True" />
<field name="category" ref="qc_test_template_category_generic" />
</record>
Expand Down
17 changes: 0 additions & 17 deletions quality_control_oca/models/qc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
Expand Down
7 changes: 0 additions & 7 deletions quality_control_oca/views/qc_test_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
</h1>
<group>
<group>
<field name="type" />
<field
name="object_id"
attrs="{'invisible': [('type','=','generic')]}"
/>
<field name="active" />
</group>
<group>
Expand Down Expand Up @@ -56,8 +51,6 @@
<tree string="Tests">
<field name="name" />
<field name="category" />
<field name="type" />
<field name="object_id" />
<field name="company_id" groups="base.group_multi_company" />
</tree>
</field>
Expand Down

0 comments on commit 494093e

Please sign in to comment.