Skip to content

Commit

Permalink
Merge PR #27 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by andhit-r
  • Loading branch information
ssi-bot committed Sep 20, 2023
2 parents 7df7ebc + 8eaafbc commit d3b886f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 71 deletions.
33 changes: 0 additions & 33 deletions ssi_helpdesk/models/helpdesk_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,6 @@ def _default_date(self):
inverse_name="split_id",
copy=False,
)
data_requirement_ids = fields.One2many(
string="Data Requirements",
comodel_name="helpdesk_ticket.data_requirement",
inverse_name="ticket_id",
)
data_requirement_state = fields.Selection(
string="Data Requirement Status",
selection=[
("no_need", "Not Needed"),
("open", "In Progress"),
("done", "Done"),
],
compute="_compute_data_requirement_state",
store=True,
)
resolution_documentation_ids = fields.One2many(
string="Resolution Documentations",
comodel_name="helpdesk_ticket.resolution_documentation",
Expand Down Expand Up @@ -278,24 +263,6 @@ def _get_policy_field(self):
res += policy_field
return res

@api.depends(
"data_requirement_ids",
"data_requirement_ids.state",
)
def _compute_data_requirement_state(self):
for record in self:
result = "no_need"

count_req = len(record.data_requirement_ids)

if count_req > 0:
result = "done"
for req in record.data_requirement_ids:
if req.state == "open":
result = "open"

record.data_requirement_state = result

@api.depends(
"resolution_documentation_ids",
"resolution_documentation_ids.state",
Expand Down
39 changes: 1 addition & 38 deletions ssi_helpdesk/views/helpdesk_ticket_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@
<field name="title" />
</xpath>
<xpath expr="//separator[@name='activity']" position="before">
<separator name="data1" />
<filter
name="dom_no_need_data"
string="No Data Needed"
domain="[('data_requirement_state','=','no_need')]"
/>
<filter
name="dom_open_data"
string="Waiting Data"
domain="[('data_requirement_state','=','open')]"
/>
<filter
name="dom_data_collected"
string="Data Collected"
domain="[('data_requirement_state','=','done')]"
/>
<separator name="resolution" />
<filter
name="dom_no_need_resolution"
Expand Down Expand Up @@ -156,25 +140,6 @@
/>
</group>
</page>
<page name="requirement" string="Data Requirement(s)">
<group name="requirement" colspan="4" col="2">
<field name="data_requirement_state" />
</group>
<field name="data_requirement_ids">
<tree editable="top">
<field name="sequence" widget="handle" />
<field name="type_id" />
<field name="name" />
<field name="url" widget="url" />
<field
name="attachment_id"
domain="[('res_model','=','helpdesk_ticket'),('res_id','=',parent.id)]"
/>
<field name="date_submit" />
<field name="state" />
</tree>
</field>
</page>
<page name="resolution" string="Resolution Documentation(s)">
<group name="resolution" colspan="4" col="2">
<field name="resolution_documentation_state" />
Expand All @@ -189,13 +154,11 @@
</tree>
</field>
</page>
<page name="duplicate" string="Duplicate">
<page name="split" string="Duplicate &amp; Split">
<group name="duplicate" colspan="4" col="2">
<field name="duplicate_id" />
</group>
<field name="duplicate_ids" widget="many2many" />
</page>
<page name="split" string="Split">
<group name="duplicate" colspan="4" col="2">
<field name="split_id" />
</group>
Expand Down

0 comments on commit d3b886f

Please sign in to comment.