Skip to content

Commit

Permalink
[17.0][MIG] agreement_legal: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ilo committed Sep 10, 2024
1 parent 904fab7 commit 9568f6c
Show file tree
Hide file tree
Showing 16 changed files with 177 additions and 237 deletions.
1 change: 1 addition & 0 deletions agreement_legal/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Contributors
- Sandip Mangukiya <smangukiya@opensourceintegrators.com>
- Yves Goldberg <yves@ygol.com>
- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
- Italo LOPES <italo.lopes@camptocamp.com>

Other credits
-------------
Expand Down
1 change: 1 addition & 0 deletions agreement_legal/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
- Sandip Mangukiya \<<smangukiya@opensourceintegrators.com>\>
- Yves Goldberg \<<yves@ygol.com>\>
- Tharathip Chaweewongphan \<<tharathipc@ecosoft.co.th>\>
- Italo LOPES \<<italo.lopes@camptocamp.com>\>
1 change: 1 addition & 0 deletions agreement_legal/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<li>Sandip Mangukiya &lt;<a class="reference external" href="mailto:smangukiya&#64;opensourceintegrators.com">smangukiya&#64;opensourceintegrators.com</a>&gt;</li>
<li>Yves Goldberg &lt;<a class="reference external" href="mailto:yves&#64;ygol.com">yves&#64;ygol.com</a>&gt;</li>
<li>Tharathip Chaweewongphan &lt;<a class="reference external" href="mailto:tharathipc&#64;ecosoft.co.th">tharathipc&#64;ecosoft.co.th</a>&gt;</li>
<li>Italo LOPES &lt;<a class="reference external" href="mailto:italo.lopes&#64;camptocamp.com">italo.lopes&#64;camptocamp.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
Expand Down
2 changes: 1 addition & 1 deletion agreement_legal/static/src/js/form_view.esm.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @odoo-module **/

import {registry} from "@web/core/registry";
import {FormController} from "@web/views/form/form_controller";
import {formView} from "@web/views/form/form_view";
import {registry} from "@web/core/registry";
import {useService} from "@web/core/utils/hooks";

export class AgreementFormController extends FormController {
Expand Down
2 changes: 1 addition & 1 deletion agreement_legal/static/src/js/kanban_view.esm.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @odoo-module **/

import {registry} from "@web/core/registry";
import {KanbanController} from "@web/views/kanban/kanban_controller";
import {kanbanView} from "@web/views/kanban/kanban_view";
import {registry} from "@web/core/registry";
import {useService} from "@web/core/utils/hooks";

export class AgreementKanbanController extends KanbanController {
Expand Down
2 changes: 1 addition & 1 deletion agreement_legal/static/src/js/list_view.esm.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @odoo-module **/

import {registry} from "@web/core/registry";
import {ListController} from "@web/views/list/list_controller";
import {listView} from "@web/views/list/list_view";
import {registry} from "@web/core/registry";
import {useService} from "@web/core/utils/hooks";

export class AgreementListController extends ListController {
Expand Down
4 changes: 1 addition & 3 deletions agreement_legal/static/src/xml/agreement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
t-name="agreement.ListView.Buttons"
t-inherit="web.ListView.Buttons"
t-inherit-mode="primary"
owl="1"
>
<xpath
expr="//*[@class='btn btn-primary o_list_button_add']"
Expand Down Expand Up @@ -36,7 +35,6 @@
t-name="agreement.KanbanView.Buttons"
t-inherit="web.KanbanView.Buttons"
t-inherit-mode="primary"
owl="1"
>
<xpath
expr="//*[@class='btn btn-primary o-kanban-button-new']"
Expand All @@ -51,7 +49,7 @@
<attribute name="t-if">!noCreate and canCreateTemplate</attribute>
</xpath>
</t>
<t t-name="agreement.TemplateButton" owl="1">
<t t-name="agreement.TemplateButton">
<button
type="button"
t-if="!canCreateTemplate"
Expand Down
86 changes: 45 additions & 41 deletions agreement_legal/views/agreement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<field name="model">agreement</field>
<field name="arch" type="xml">
<tree js_class="agreement_template_tree" default_order="code desc, name">
<field name="code" invisible="context.get('default_model')" />
<field name="code" column_invisible="context.get('default_model')" />
<field name="name" />
<field name="partner_id" />
<field name="company_id" />
<field name="parent_agreement_id" />
<field name="agreement_type_id" />
<field name="agreement_subtype_id" />
<field name="stage_id" />
<field name="active" invisible="1" />
<field name="active" column_invisible="1" />
</tree>
</field>
</record>
Expand All @@ -32,14 +32,14 @@
type="object"
name="create_new_version"
class="oe_highlight"
attrs="{'invisible': [('state', '=', 'active')]}"
invisible="state == active"
/>
<button
string="New Agreement"
type="object"
name="create_new_agreement"
class="oe_highlight"
attrs="{'invisible': [('is_template', '=', False)]}"
invisible="is_template == False"
/>
<field
name="stage_id"
Expand All @@ -55,7 +55,7 @@
name="web_ribbon"
title="Template"
bg_color="bg-info"
attrs="{'invisible': [('is_template', '=', False)]}"
invisible="is_template == False"
/>
<div class="oe_title">
<label
Expand All @@ -75,10 +75,7 @@
domain="[('partner_id', '=', partner_id)]"
/>
<field name="is_template" invisible="1" />
<field
name="template_id"
attrs="{'invisible': [('is_template', '=', True)]}"
/>
<field name="template_id" invisible="is_template == True" />
</group>
<group>
<field
Expand All @@ -93,7 +90,8 @@
/>
<field
name="assigned_user_id"
attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"
invisible="is_template == True"
readonly="is_template == True"
/>
<field name="active" invisible="1" />
<field name="state" invisible="1" />
Expand All @@ -115,14 +113,15 @@
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"
required="sub_object_id != False"
readonly="sub_object_id == False"
/>
<field name="default_value" />
<field name="copyvalue" />
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the description and special terms.
This section (on the left) allows you to add dynamic fields inside the description and
special terms.
<ol>
<li>Select the agreement field</li>
<li>Select the sub-field</li>
Expand All @@ -139,11 +138,12 @@
string="Use custom content"
/>
</group>
<!-- <group name="cust_parties">-->
<p>
This section (on the left) allows you to replace the default listing of the parties with custom dynamic content.
</p>
<!-- </group>-->
<!-- <group name="cust_parties">-->
<p>
This section (on the left) allows you to replace the default listing of the parties with
custom dynamic content.
</p>
<!-- </group>-->
<group name="partner" string="Partner">
<field
name="partner_id"
Expand All @@ -155,8 +155,8 @@
/>
</group>
<group name="company" string="Company">
<!-- <div class="o_address_format">-->
<field
<!-- <div class="o_address_format">-->
<field
name="company_id"
readonly="1"
context="{'show_address': 1}"
Expand All @@ -165,7 +165,7 @@
colspan="2"
class="o_address_format"
/>
<!-- </div>-->
<!-- </div>-->
<field name="company_partner_id" invisible="1" />
</group>
<group name="partner_left" string="Primary Contact">
Expand Down Expand Up @@ -216,27 +216,30 @@
<group
name="parties_content"
string="Parties Content"
attrs="{'invisible':[('use_parties_content', '=', False)]}"
invisible="use_parties_content == False"
>
<field name="parties" nolabel="1" />
</group>
<group name="term_information">
<group name="termdates_left" string="Term Dates">
<field
name="signature_date"
attrs="{'invisible': [('is_template', '=', True)]}"
invisible="is_template == True"
/>
<field
name="start_date"
attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"
required="is_template == False"
invisible="is_template == True"
/>
<field
name="end_date"
attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"
required="is_template == False"
invisible="is_template == True"
/>
<field
name="to_review_date"
attrs="{'required': [('is_template', '=', False), ('end_date', '!=', False)], 'invisible': [('is_template', '=', True)]}"
required="is_template == False and end_date != False"
invisible="is_template == True"
/>
<field name="expiration_notice" />
<field name="change_notice" />
Expand Down Expand Up @@ -283,7 +286,7 @@
<field
name="clauses_ids"
nolabel="1"
context="{'tree_view_ref': 'agreement_legal.partner_agreement_clause_list_view2', 'form_view_ref': 'agreement_legal.partner_agreement_clause_form_view2', 'default_temp_agreement_id': active_id}"
context="{'tree_view_ref': 'agreement_legal.partner_agreement_clause_list_view2', 'form_view_ref': 'agreement_legal.partner_agreement_clause_form_view2', 'default_temp_agreement_id': id}"
/>
<separator string="Appendices" />
<field
Expand Down Expand Up @@ -349,48 +352,49 @@
</page>
<page name="performance" string="Performance">
<p
>This section is a place where financial records will show the current performance of this agreement.</p>
>This section is a place where financial records will show the current performance of this
agreement.</p>
<p>Perhaps include invoices with total vs costs? </p>
</page>
</notebook>
<separator string="Administration" />
<!-- <group string="Administration">-->
<div name="Administration">
<p class="oe_inline">Reviewed by <field
<separator string="Administration" />
<!-- <group string="Administration">-->
<div name="Administration">
<p class="oe_inline">Reviewed by <field
name="reviewed_user_id"
class="oe_inline"
/> on <field name="reviewed_date" class="oe_inline" />.</p>
<p>Approved by <field
<p>Approved by <field
name="approved_user_id"
class="oe_inline"
/> on <field name="approved_date" class="oe_inline" />.</p>
</div>
<!-- </group>-->
</div>
<!-- </group>-->
<p name="footer">
Version: <field name="version" readonly="True" />.<field
name="revision"
readonly="True"
/>
| Created By:
| Created By:
<field
name="create_uid"
readonly="True"
attrs="{'invisible': [('parent_agreement_id', '!=', False)]}"
invisible="parent_agreement_id != False"
/>
<field
name="create_uid_parent"
attrs="{'invisible': [('parent_agreement_id', '=', False)]}"
invisible="parent_agreement_id == False"
/>
| Created On:
| Created On:
<field
name="create_date"
readonly="True"
attrs="{'invisible': [('parent_agreement_id', '!=', False)]}"
invisible="parent_agreement_id != False"
/>
<field
name="create_date_parent"
readonly="True"
attrs="{'invisible': [('parent_agreement_id', '=', False)]}"
invisible="parent_agreement_id == False"
/>
</p>
</sheet>
Expand Down
10 changes: 5 additions & 5 deletions agreement_legal/views/agreement_appendix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<field name="name" />
<field name="title" />
<field name="agreement_id" />
<field name="active" invisible="1" />
<field name="active" column_invisible="1" />
</tree>
</field>
</record>
Expand All @@ -27,7 +27,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 Down Expand Up @@ -58,8 +58,8 @@
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"
readonly="sub_object_id == False"
required="sub_object_id != False"
/>
<field name="default_value" />
<field name="copyvalue" />
Expand Down Expand Up @@ -115,7 +115,7 @@
<attribute name="default_order">sequence</attribute>
</tree>
<field name="agreement_id" position="attributes">
<attribute name="invisible">1</attribute>
<attribute name="column_invisible">1</attribute>
</field>
</field>
</record>
Expand Down
10 changes: 5 additions & 5 deletions agreement_legal/views/agreement_clause.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<field name="title" />
<field name="agreement_id" />
<field name="section_id" />
<field name="active" invisible="1" />
<field name="active" column_invisible="1" />
</tree>
</field>
</record>
Expand All @@ -28,7 +28,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 Down Expand Up @@ -63,8 +63,8 @@
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"
readonly="sub_object_id == False"
required="sub_object_id != False"
/>
<field name="default_value" />
<field name="copyvalue" />
Expand Down Expand Up @@ -125,7 +125,7 @@
<attribute name="default_order">sequence</attribute>
</tree>
<field name="agreement_id" position="attributes">
<attribute name="invisible">1</attribute>
<attribute name="column_invisible">1</attribute>
</field>
</field>
</record>
Expand Down
Loading

0 comments on commit 9568f6c

Please sign in to comment.