Skip to content

Commit

Permalink
[IMP] fieldservice: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
brian10048 committed Nov 13, 2023
1 parent 41ea5c0 commit 5bccc89
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
12 changes: 7 additions & 5 deletions fieldservice/security/ir_rule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@

<record id="fsm_order_own_rule" model="ir.rule">
<field name="name">FSM Orders Entry (only own)</field>
<field name="model_id" ref="model_fsm_order"/>
<field name="domain_force">['|',('person_id.user_ids','=',user.id),('person_id','=',False)]</field>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_user_own'))]"/>
<field name="model_id" ref="model_fsm_order" />
<field
name="domain_force"
>['|',('person_id.user_ids','=',user.id),('person_id','=',False)]</field>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_user_own'))]" />
</record>

<record id="fsm_order_user" model="ir.rule">
<field name="name">FSM Orders Entry</field>
<field name="model_id" ref="model_fsm_order"/>
<field name="model_id" ref="model_fsm_order" />
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_user'))]"/>
<field name="groups" eval="[(4, ref('fieldservice.group_fsm_user'))]" />
</record>

<record id="fsm_template_comp_rule" model="ir.rule">
Expand Down
11 changes: 7 additions & 4 deletions fieldservice/security/res_groups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
<!-- FSM groups -->
<record id="group_fsm_user_own" model="res.groups">
<field name="name">User (only own documents)</field>
<field name="category_id" ref="fsm"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="fsm" />
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
</record>

<record id="group_fsm_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="fsm"/>
<field name="implied_ids" eval="[(4, ref('fieldservice.group_fsm_user_own'))]"/>
<field name="category_id" ref="fsm" />
<field
name="implied_ids"
eval="[(4, ref('fieldservice.group_fsm_user_own'))]"
/>
</record>
<record id="group_fsm_dispatcher" model="res.groups">
<field name="name">Dispatcher</field>
Expand Down
6 changes: 5 additions & 1 deletion fieldservice/views/fsm_location.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@
<group id="main-left">
<field name="id" invisible="1" />
<field name="fsm_parent_id" domain="[('id', '!=', id)]" />
<field name="partner_id" groups="base.group_no_one" readonly="1" />
<field
name="partner_id"
groups="base.group_no_one"
readonly="1"
/>
<field name="owner_id" />
<field
name="contact_id"
Expand Down
6 changes: 5 additions & 1 deletion fieldservice/views/fsm_person.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@
</h1>
<group>
<group>
<field name="partner_id" groups="base.group_no_one" readonly="1" />
<field
name="partner_id"
groups="base.group_no_one"
readonly="1"
/>
<field
name="category_ids"
widget="many2many_tags"
Expand Down

0 comments on commit 5bccc89

Please sign in to comment.