Skip to content

Commit

Permalink
[FIX] tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgarRetes committed Nov 5, 2024
1 parent 6ec2c0d commit 9e4b8b5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
5 changes: 2 additions & 3 deletions fieldservice_activity/models/fsm_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ class FSMActivity(models.Model):
_description = "Field Service Activity"

name = fields.Char(
required=True, readonly=True, states={"todo": [("readonly", False)]}
required=True, readonly=True,
)
required = fields.Boolean(
default=False,
readonly=True,
states={"todo": [("readonly", False)]},
)
sequence = fields.Integer()
completed = fields.Boolean(default=False)
completed_on = fields.Datetime(readonly=True)
completed_by = fields.Many2one("res.users", readonly=True)
ref = fields.Char(
"Reference", readonly=True, states={"todo": [("readonly", False)]}
"Reference", readonly=True
)
fsm_order_id = fields.Many2one("fsm.order", "FSM Order")
fsm_template_id = fields.Many2one("fsm.template", "FSM Template")
Expand Down
3 changes: 2 additions & 1 deletion fieldservice_activity/tests/test_fsm_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from datetime import datetime

from odoo.exceptions import ValidationError
from odoo.tests.common import Form, TransactionCase
from odoo.tests.common import TransactionCase
from odoo.tests import Form


class TestFSMActivity(TransactionCase):
Expand Down
6 changes: 3 additions & 3 deletions fieldservice_activity/views/fsm_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<field name="order_activity_ids" nolabel="1">
<list editable="bottom">
<field name="sequence" widget="handle" />
<field name="name" />
<field name="required" />
<field name="ref" />
<field name="name" readonly="state != 'todo'"/>
<field name="required" readonly="state != 'todo'"/>
<field name="ref" readonly="state != 'todo'"/>
<field name="completed" column_invisible="1" />
<field name="completed_on" />
<field name="completed_by" />
Expand Down
6 changes: 3 additions & 3 deletions fieldservice_activity/views/fsm_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<field name="temp_activity_ids" nolabel="1">
<list editable="bottom">
<field name="sequence" widget="handle" />
<field name="name" />
<field name="required" />
<field name="ref" />
<field name="name" readonly="state != 'todo'"/>
<field name="required" readonly="state != 'todo'"/>
<field name="ref" readonly="state != 'todo'"/>
<field name="completed" invisible="1" />
<field name="completed_on" invisible="1" />
<field name="completed_by" invisible="1" />
Expand Down

0 comments on commit 9e4b8b5

Please sign in to comment.