Skip to content

Commit

Permalink
[17.0][MIG] agreement_serviceprofile: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ilo committed Oct 1, 2024
1 parent 02ec305 commit a6404b4
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
4 changes: 4 additions & 0 deletions agreement_serviceprofile/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ Contributors

- Brian McMaster <[email protected]>

- `Camptocamp <https://www.camptocamp.com>`__:

- Italo LOPES <[email protected]>

Maintainers
-----------

Expand Down
2 changes: 1 addition & 1 deletion agreement_serviceprofile/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/agreement",
"license": "AGPL-3",
"depends": ["agreement_legal"],
"depends": ["agreement"],
"data": [
"data/serviceprofile_stage.xml",
"security/ir.model.access.csv",
Expand Down
2 changes: 2 additions & 0 deletions agreement_serviceprofile/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
- Murtuza Saleh \<<[email protected]>\>
- [Mc Master Lawn and Pest Services](https://www.mcmpest.com):
- Brian McMaster \<<[email protected]>\>
- [Camptocamp](https://www.camptocamp.com):
- Italo LOPES \<<[email protected]>\>
4 changes: 2 additions & 2 deletions agreement_serviceprofile/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_agreement_servprof_allusers,service profile all users,model_agreement_serviceprofile,agreement_legal.group_agreement_user,1,1,1,0
access_agreement_servprof_manager,service profile manager,model_agreement_serviceprofile,agreement_legal.group_agreement_manager,1,1,1,1
access_agreement_servprof_allusers,service profile all users,model_agreement_serviceprofile,base.group_user,1,1,1,0
access_agreement_servprof_manager,service profile manager,model_agreement_serviceprofile,base.group_system,1,1,1,1
4 changes: 4 additions & 0 deletions agreement_serviceprofile/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<li>Brian McMaster &lt;<a class="reference external" href="mailto:brian&#64;mcmpest.com">brian&#64;mcmpest.com</a>&gt;</li>
</ul>
</li>
<li><a class="reference external" href="https://www.camptocamp.com">Camptocamp</a>:<ul>
<li>Italo LOPES &lt;<a class="reference external" href="mailto:italo.lopes&#64;camptocamp.com">italo.lopes&#64;camptocamp.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
8 changes: 5 additions & 3 deletions agreement_serviceprofile/views/agreement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<record id="agreement_fsm_order_form_view" model="ir.ui.view">
<field name="name">agreement.form.fsm.order.view</field>
<field name="model">agreement</field>
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view" />
<field name="inherit_id" ref="agreement.agreement_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page name="serviceprofiles" string="Service Profiles">
Expand All @@ -28,12 +28,14 @@
<field
name="product_variant_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '=', False)], 'required': [('use_product_variant','!=', False)]}"
invisible="use_product_variant == False"
required="use_product_variant != False"
/>
<field
name="product_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '!=', False)], 'required': [('use_product_variant','=', False)]}"
invisible="use_product_variant != False"
required="use_product_variant == False"
/>
</group>
</group>
Expand Down
14 changes: 8 additions & 6 deletions agreement_serviceprofile/views/agreement_serviceprofile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<field name="partner_id" />
<field name="product_id" />
<field name="product_variant_id" />
<field name="active" invisible="1" />
<field name="active" column_invisible="1" />
</tree>
</field>
</record>
Expand All @@ -37,7 +37,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active == True"
/>
<field name="active" invisible="1" />
<div class="oe_title">
Expand All @@ -54,12 +54,14 @@
<field
name="product_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '!=', False)], 'required': [('use_product_variant','=', False)]}"
invisible="use_product_variant != False"
required="use_product_variant == False"
/>
<field
name="product_variant_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '=', False)], 'required': [('use_product_variant','!=', False)]}"
invisible="use_product_variant == False"
required="use_product_variant != False"
/>
<field name="use_product_variant" />
</group>
Expand Down Expand Up @@ -143,15 +145,15 @@
<menuitem
name="Service Profiles"
id="agreement_serviceprofiles"
parent="agreement_legal.agreement_masterdata"
parent="agreement.agreement_setting_menu"
sequence="50"
action="agreement_serviceprofile_action"
/>

<menuitem
name="Service Profiles"
id="dashboard_serviceprofiles"
parent="agreement_legal.agreement_dashboard"
parent="agreement.agreement_reporting_menu"
sequence="20"
action="agreement_serviceprofile_dashboard"
/>
Expand Down

0 comments on commit a6404b4

Please sign in to comment.