[ENH] OCA Standards

This commit is contained in:
Bhavesh Odedra
2018-10-16 17:20:33 +05:30
parent ee10168976
commit 7d40232093
30 changed files with 1388 additions and 936 deletions

View File

@@ -1,331 +1,328 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- explicit list view definition -->
<!-- Agreement List View-->
<record model="ir.ui.view" id="partner_agreement_list_view">
<field name="name">Agreement List</field>
<field name="model">partner_agreement.agreement</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name"/>
<field name="customer"/>
<field name="vendor"/>
<field name="parent_agreement"/>
<field name="type"/>
<field name="subtype"/>
<field name="active" invisible="1"/>
</tree>
</field>
<field name="name">Agreement List</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name"/>
<field name="customer_id"/>
<field name="vendor_id"/>
<field name="parent_agreement_id"/>
<field name="agreement_type_id"/>
<field name="agreement_subtype_id"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<!-- Agreement Form View -->
<record model="ir.ui.view" id="partner_agreement_form_view">
<field name="name">Agreement Form</field>
<field name="model">partner_agreement.agreement</field>
<field name="arch" type="xml">
<form string="Agreements Form">
<header>
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
<field name="state" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Agreement Name"/>
<h1>
<field name="name"/>
</h1>
</div>
<group string="General" colspan="2" col="4">
<field name="contract_id" string="Internal ID"/>
<field name="stage" widget="selection" requried="True"/>
<field name="parent_agreement" domain="[('customer', '=', customer)]"/>
<field name="type" widget="selection" requried="True"/>
<field name="assigned_to" attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
<field name="subtype" widget="selection" domain="[('agreement_type', '=', type)]"/>
<field name="active" invisible="1"/>
</group>
<group>
<field name="description" string="Description" requried="True"/>
</group>
<group name="customer_vendor_information">
<group name="customer_left" string="Customer Information">
<div class="o_address_format">
<field name="customer" domain="[('customer', '=', True)]"/>
<field name="customer_street" placeholder="Street..." class="o_address_street" readonly="1"/>
<field name="customer_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
<field name="customer_city" placeholder="City" class="o_address_city" readonly="1"/>
<field name="customer_state" class="o_address_state" placeholder="State" options="{&quot;no_open&quot;: True}" readonly="1"/>
<field name="customer_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
<field name="name">Agreement Form</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<form string="Agreements Form">
<header>
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
<field name="state" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Agreement Name"/>
<h1>
<field name="name"/>
</h1>
</div>
<group string="General" colspan="2" col="4">
<field name="contract_id" string="Internal ID"/>
<field name="stage_id" widget="selection" requried="True"/>
<field name="parent_agreement_id" domain="[('customer_id', '=', customer_id)]"/>
<field name="agreement_type_id" widget="selection" requried="True"/>
<field name="assigned_user_id" attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
<field name="agreement_subtype_id" widget="selection" domain="[('agreement_type_id', '=', agreement_type_id)]"/>
<field name="active" invisible="1"/>
</group>
<group>
<field name="description" string="Description" requried="True"/>
</group>
<group name="customer_vendor_information">
<group name="customer_left" string="Customer Information">
<div class="o_address_format">
<field name="customer_id" domain="[('customer', '=', True)]"/>
<field name="customer_street" placeholder="Street..." class="o_address_street" readonly="1"/>
<field name="customer_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
<field name="customer_city" placeholder="City" class="o_address_city" readonly="1"/>
<field name="customer_state_id" class="o_address_state" placeholder="State" options="{&quot;no_open&quot;: True}" readonly="1"/>
<field name="customer_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
</div>
</group>
<group name="vendor_right" string="Vendor Information">
<div class="o_address_format">
<field name="vendor_id" domain="[('supplier', '=', True)]"/>
<field name="vendor_street" placeholder="Street..." class="o_address_street" readonly="1"/>
<field name="vendor_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
<field name="vendor_city" placeholder="City" class="o_address_city" readonly="1"/>
<field name="vendor_state_id" class="o_address_state" placeholder="State" options="{&quot;no_open&quot;: True}" readonly="1"/>
<field name="vendor_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
</div>
</group>
<group name="contact_left" string="Primary Contact">
<field name="customer_contact_id" domain="[('parent_id', '=', customer_id)]" nolabel="1"/>
<field name="customer_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="customer_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
<group name="contact_right" string="Primary Contact">
<field name="vendor_contact_id" domain="[('parent_id', '=', vendor_id)]" nolabel="1"/>
<field name="vendor_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="vendor_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
</group>
<group name="term_information">
<group name="termdates_left" string="Term Dates">
<field name="start_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
<field name="end_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
<field name="expiration_notice"/>
<field name="change_notice"/>
<field name="notification_address_id" domain="['|',('parent_id','=',customer_id),('parent_id','=',vendor_id)]"/>
<field name="termination_requested"/>
<field name="termination_date"/>
</group>
<group name="paymentterm_right" string="Payment Terms">
<field name="customer_term" attrs="{'invisible': [('customer_id', '=', False)]}"/>
<field name="vendor_term" attrs="{'invisible': [('vendor_id', '=', False)]}"/>
<field name="payment_term_id" widget="selection"/>
<field name="renewal_type_id" widget="selection"/>
<field name="increase_type_id" widget="selection"/>
</group>
</group>
<group>
<field name="special_terms"/>
</group>
<notebook>
<page name="contract_document" string="Contract Document">
<div>
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
</div>
<group colspan="2" col="4">
<field name="customer_signed_date"/>
<field name="company_signed_date"/>
<field name="customer_signed_user_id" domain="[('parent_id', '=', customer_id)]"/>
<field name="company_signed_user_id"/>
<field name="signed_contract" filename="signed_contract_filename"/>
<field name="signed_contract_filename" invisible="1"/>
</group>
<group colspan="2" col="2" default_order='section_sequence'>
<field name="sections_ids" string="Contract Sections" context="{'default_agreement': active_id}">
<tree default_order='section_sequence'>
<field name="section_sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>
</group>
<group colspan="2" col="2" default_order='section_id, clause_sequence'>
<field name="clauses_ids" string="Contract Clauses" context="{'default_agreement': active_id}">
<tree default_order='section_id, clause_sequence'>
<field name="clause_sequence" widget="handle"/>
<field name="section_id"/>
<field name="name"/>
</tree>
</field>
</group>
</page>
<page name="products" string="MRC and NRC Products">
<group string="Financial Details" colspan="2" col="4">
<field name="total_company_mrc"/>
<field name="total_customer_mrc"/>
<field name="total_company_nrc"/>
<field name="total_customer_nrc"/>
<field name="currency_id"/>
<field name="contract_value" readonly="1"/>
</group>
<group>
<field name="sale_order_id" domain="[('partner_id', '=', customer_id)]"/>
</group>
<group string="Sales Order Lines">
<field name="order_lines_services_ids" nolabel="1" readonly="1"/>
</group>
</page>
<page colspan="2" col="4" name="child_agreements" string="Child Agreements">
<field name="child_agreements_ids">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page colspan="2" col="4" name="old_versions" string="Revisions">
<field name="previous_version_agreements_ids" string="Previouse Versions">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page colspan="2" col="4" name="peformance" string="Performance">
<p>This section is a place where finincial records will show the current performance of this agreement. </p>
<p>Perhaps include invoices with total vs costs? </p>
</page>
</notebook>
<group colspan="2" col="4" string="Administration">
<field name="reviewed_date"/>
<field name="approved_date"/>
<field name="reviewed_user_id"/>
<field name="approved_user_id"/>
<field name="is_template"/>
</group>
<footer>
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
| Created By: <field name="create_uid" readonly="True"/>
| Created On: <field name="create_date" readonly="True"/>
</footer>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</group>
<group name="vendor_right" string="Vendor Information">
<div class="o_address_format">
<field name="vendor" domain="[('supplier', '=', True)]"/>
<field name="vendor_street" placeholder="Street..." class="o_address_street" readonly="1"/>
<field name="vendor_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
<field name="vendor_city" placeholder="City" class="o_address_city" readonly="1"/>
<field name="vendor_state" class="o_address_state" placeholder="State" options="{&quot;no_open&quot;: True}" readonly="1"/>
<field name="vendor_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
</div>
</group>
<group name="contact_left" string="Primary Contact">
<field name="customer_contact" domain="[('parent_id', '=', customer)]" nolabel="1"/>
<field name="customer_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="customer_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
<group name="contact_right" string="Primary Contact">
<field name="vendor_contact" domain="[('parent_id', '=', vendor)]" nolabel="1"/>
<field name="vendor_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="vendor_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
</group>
<group name="term_information">
<group name="termdates_left" string="Term Dates">
<field name="start_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
<field name="end_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
<field name="expiration_notice"/>
<field name="change_notice"/>
<field name="notification_address" domain="['|',('parent_id','=',customer),('parent_id','=',vendor)]"/>
<field name="termination_requested"/>
<field name="termination_date"/>
</group>
<group name="paymentterm_right" string="Payment Terms">
<field name="customer_term" attrs="{'invisible': [('customer', '=', False)]}"/>
<field name="vendor_term" attrs="{'invisible': [('vendor', '=', False)]}"/>
<field name="payment_term" widget="selection"/>
<field name="renewal_type" widget="selection"/>
<field name="increase_type" widget="selection"/>
</group>
</group>
<group>
<field name="special_terms"/>
</group>
<notebook>
<page name="contract_document" string="Contract Document">
<div>
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
</div>
<group colspan="2" col="4">
<field name="customer_signed_date"/>
<field name="company_signed_date"/>
<field name="customer_signed_by" domain="[('parent_id', '=', customer)]"/>
<field name="company_signed_by"/>
<field name="signed_contract" filename="signed_contract_filename"/>
<field name="signed_contract_filename" invisible="1"/>
</group>
<group colspan="2" col="2" default_order='section_sequence'>
<field name="sections" string="Contract Sections" context="{'default_agreement': active_id}">
<tree default_order='section_sequence'>
<field name="section_sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>
</group>
<group colspan="2" col="2" default_order='section, clause_sequence'>
<field name="clauses" string="Contract Clauses" context="{'default_agreement': active_id}">
<tree default_order='section, clause_sequence'>
<field name="clause_sequence" widget="handle"/>
<field name="section"/>
<field name="name"/>
</tree>
</field>
</group>
</page>
<page name="products" string="MRC and NRC Products">
<group string="Financial Details" colspan="2" col="4">
<field name="total_company_mrc"/>
<field name="total_customer_mrc"/>
<field name="total_company_nrc"/>
<field name="total_customer_nrc"/>
<field name="currency_id"/>
<field name="contract_value" readonly="1"/>
</group>
<group>
<field name="sale_order" domain="[('partner_id', '=', customer)]"/>
</group>
<group string="Sales Order Lines">
<field name="order_lines_services" nolabel="1" readonly="1"/>
</group>
<!-- <group string="Non-Service Products Order Lines">
<field name="order_lines_nonservices" nolabel="1"/>
</group>-->
</page>
<page colspan="2" col="4" name="child_agreements" string="Child Agreements">
<field name="child_agreements">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page colspan="2" col="4" name="old_versions" string="Revisions">
<field name="previous_version_agreements" string="Previouse Versions">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page colspan="2" col="4" name="peformance" string="Performance">
<p>This section is a place where finincial records will show the current performance of this agreement. </p>
<p>Perhaps include invoices with total vs costs? </p>
</page>
</notebook>
<group colspan="2" col="4" string="Administration">
<field name="reviewed_date"/>
<field name="approved_date"/>
<field name="reviewed_by"/>
<field name="approved_by"/>
<field name="is_template"/>
</group>
<footer>
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
| Created By: <field name="create_uid" readonly="True"/>
| Created On: <field name="create_date" readonly="True"/>
</footer>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</form>
</field>
</record>
<!-- Agreement Kanban View -->
<record id="view_project_agreement_kanban" model="ir.ui.view">
<field name="name">Agreement Kanban</field>
<field name="model">partner_agreement.agreement</field>
<field name="arch" type="xml">
<kanban default_group_by="stage">
<field name="color"/>
<field name="assigned_to"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title"><field name="name"/></strong><br/>
<div class="o_kanban_record_subtitle text-muted">
<field name="customer" invisible="context.get('default_customer', False)"/>
<t t-if="record.start_date.raw_value and record.start_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<div t-attf-class="#{red || ''}"><i><field name="start_date"/></i></div>
</div>
</div>
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li t-if="widget.editable"><a type="edit">Edit</a></li>
<li class="divider"/>
<li class="dropdown-header">Record's Colour</li>
<li>
<ul class="oe_kanban_colorpicker" data-field="color"/>
</li>
</ul>
</div>
</div>
<div class="o_kanban_record_body">
<field name="type"/> - <field name="subtype"/>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
V: <field name="version"/>
</div>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_to.raw_value)" t-att-title="record.assigned_to.value" width="36" height="36" class="oe_kanban_avatar"/>
</div>
</div>
</div>
<div class="oe_clear"/>
</div>
</t>
</templates>
</kanban>
</field>
<field name="name">Agreement Kanban</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<kanban default_group_by="stage_id">
<field name="color"/>
<field name="assigned_user_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong><br/>
<div class="o_kanban_record_subtitle text-muted">
<field name="customer_id" invisible="context.get('default_customer_id', False)"/>
<t t-if="record.start_date.raw_value and record.start_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<div t-attf-class="#{red || ''}">
<i><field name="start_date"/></i>
</div>
</div>
</div>
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li t-if="widget.editable"><a type="edit">Edit</a></li>
<li class="divider"/>
<li class="dropdown-header">Record's Colour</li>
<li>
<ul class="oe_kanban_colorpicker" data-field="color"/>
</li>
</ul>
</div>
</div>
<div class="o_kanban_record_body">
<field name="agreement_type_id"/> - <field name="agreement_subtype_id"/>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
V: <field name="version"/>
</div>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_user_id.raw_value)" t-att-title="record.assigned_user_id.value" width="36" height="36" class="oe_kanban_avatar"/>
</div>
</div>
</div>
<div class="oe_clear"/>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Agreement Search View -->
<record model="ir.ui.view" id="partner_agreement_search_view">
<field name="name">Agreement Search</field>
<field name="model">partner_agreement.agreement</field>
<field name="arch" type="xml">
<search string="Agreement Search">
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
<filter name="group_customer" string="customers" icon="terp-partner" context="{'group_by':'customer'}"/>
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
</search>
</field>
<field name="name">Agreement Search</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<search string="Agreement Search">
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
<filter name="group_customer_id" string="customers" icon="terp-partner" context="{'group_by':'customer_id'}"/>
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
</search>
</field>
</record>
<!-- Adding a new filter to the order line search view -->
<record id="order_lines_search_view" model="ir.ui.view">
<field name="name">Order Lines Search</field>
<field name="model">sale.order.line</field>
<field name="type">search</field>
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
<field name="arch" type="xml">
<xpath expr="/search/filter[1]" position="after">
<filter name="filter_service_product_type" string="Service Type" domain="[('type', '=', 'service')]"/>
</xpath>
</field>
<field name="name">Order Lines Search</field>
<field name="model">sale.order.line</field>
<field name="type">search</field>
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
<field name="arch" type="xml">
<xpath expr="/search/filter[1]" position="after">
<filter name="filter_service_product_type" string="Service Type" domain="[('type', '=', 'service')]"/>
</xpath>
</field>
</record>
<!-- actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_agreement">
<field name="name">Agreements</field>
<field name="res_model">partner_agreement.agreement</field>
<field name="context">{"search_default_filter_non_template":1}</field>
<field name="view_mode">kanban,tree,form</field>
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="context">{"search_default_filter_non_template":1}</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
<field name="name">Agreements</field>
<field name="res_model">partner_agreement.agreement</field>
<field name="context">{"search_default_filter_templates":1}</field>
<field name="view_mode">tree,kanban,form</field>
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="context">{"search_default_filter_templates":1}</field>
<field name="view_mode">tree,kanban,form</field>
</record>
<!-- ########################### MENU ITEMS ############################### -->
<!-- Top menu item -->
<menuitem name="Agreements" id="partner_agreement.menu_root" web_icon="partner_agreement,static/description/icon.png" sequence="51"/>
<menuitem
name="Agreements"
id="partner_agreement_menu_root"
web_icon="agreement,static/description/icon.png"
sequence="51"/>
<!-- menu categories -->
<menuitem
name="Agreements"
id="partner_agreement.menu_1"
parent="partner_agreement.menu_root"
sequence="10"
action="partner_agreement_agreement"/>
<menuitem
name="Agreements"
id="partner_agreement_menu_1"
parent="partner_agreement_menu_root"
sequence="10"
action="partner_agreement_agreement"/>
<menuitem
name="Templates"
id="partner_agreement.menu_4"
parent="partner_agreement.menu_root"
id="partner_agreement_menu_4"
parent="partner_agreement_menu_root"
sequence="20"
action="partner_agreement_agreement_templates"/>
<menuitem
name="Agreement Parts"
id="partner_agreement.menu_2"
sequence="30"
parent="partner_agreement.menu_root"/>
<menuitem
name="Configuration"
id="partner_agreement.menu_3"
sequence="40"
parent="partner_agreement.menu_root"/>
</data>
</odoo>
<menuitem
name="Agreement Parts"
id="partner_agreement_menu_2"
sequence="30"
parent="partner_agreement_menu_root"/>
<menuitem
name="Configuration"
id="partner_agreement_menu_3"
sequence="40"
parent="partner_agreement_menu_root"/>
</odoo>

View File

@@ -1,103 +1,102 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- Agreement Clauses Sequences-->
<record id="seq_agreement_clause" model="ir.sequence">
<field name="name">agreement_clause_sequencer</field>
<field name="code">agreement.clause</field>
<field name="prefix">0</field>
<field name="padding">1</field>
<field name="name">agreement_clause_sequencer</field>
<field name="code">agreement.clause</field>
<field name="prefix">0</field>
<field name="padding">1</field>
</record>
<!-- Agreement Clause List View-->
<record model="ir.ui.view" id="partner_agreement_clause_list_view">
<field name="name">Agreement Clause List</field>
<field name="model">partner_agreement.clause</field>
<field name="arch" type="xml">
<tree default_order='agreement, clause_sequence'>
<field name="clause_sequence" widget="handle"/>
<field name="agreement"/>
<field name="name"/>
<field name="section"/>
<field name="content" widget="html"/>
<field name="active" invisible="1"/>
</tree>
</field>
<field name="name">Agreement Clause List</field>
<field name="model">agreement.clause</field>
<field name="arch" type="xml">
<tree default_order='agreement_id, clause_sequence'>
<field name="clause_sequence" widget="handle"/>
<field name="agreement_id"/>
<field name="name"/>
<field name="section_id"/>
<field name="content" widget="html"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<!-- Agreement Clause Form View -->
<record model="ir.ui.view" id="partner_agreement_clause_form_view">
<field name="name">Agreement clause Form</field>
<field name="model">partner_agreement.clause</field>
<field name="arch" type="xml">
<form string="Agreements Clause Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Clause Name"/>
<h1><field name="name"/></h1>
</div>
<group>
<field name="agreement"/>
<!-- <field name='section_parent_id' string="Parent Section" readonly="True"/> -->
<field name="section" domain="[('agreement', '=', agreement)]"/>
<field name="content" widget="html"/>
</group>
<notebook>
<page string="Dynamic Placeholder Generator">
THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
<group>
<field name="model_id"/>
<field name="model_object_field" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
<field name="sub_object" readonly="1"/>
<field name="sub_model_object_field" domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"/>
<field name="null_value"/>
<field name="copyvalue"/>
</group>
</page>
</notebook>
Sequence #<field name="clause_sequence"/>
</sheet>
</form>
</field>
<field name="name">Agreement clause Form</field>
<field name="model">agreement.clause</field>
<field name="arch" type="xml">
<form string="Agreements Clause Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Clause Name"/>
<h1><field name="name"/></h1>
</div>
<group>
<field name="agreement_id"/>
<field name="section_id" domain="[('agreement_id', '=', agreement_id)]"/>
<field name="content" widget="html"/>
</group>
<notebook>
<page string="Dynamic Placeholder Generator">
THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
<group>
<field name="model_id"/>
<field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id" domain="[('model_id','=',sub_object_id),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object_id','=',False)],'required':[('sub_object_id','!=',False)]}"/>
<field name="null_value"/>
<field name="copyvalue"/>
</group>
</page>
</notebook>
Sequence #<field name="clause_sequence"/>
</sheet>
</form>
</field>
</record>
<!-- Agreement Clause Search View -->
<record model="ir.ui.view" id="agreement_clause_search_view">
<field name="name">Agreement Clause Search</field>
<field name="model">partner_agreement.clause</field>
<field name="arch" type="xml">
<search string="Agreement Clause Search">
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement'}"/>
<filter name="group_section" icon="terp-partner" context="{'group_by':'section'}"/>
</search>
</field>
<field name="name">Agreement Clause Search</field>
<field name="model">agreement.clause</field>
<field name="arch" type="xml">
<search string="Agreement Clause Search">
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
<filter name="group_section" icon="terp-partner" context="{'group_by':'section_id'}"/>
</search>
</field>
</record>
<!-- Agreement Clause Pivot View -->
<record model="ir.ui.view" id="agreement_clause_pivot_view">
<field name="name">Agreement Clause Pivot</field>
<field name="model">partner_agreement.clause</field>
<field name="arch" type="xml">
<pivot string="Agreement Clause Pivot">
<field name="agreement" type="row"/>
<field name="section" type="row"/>
<field name="name" type="row"/>
</pivot>
</field>
<field name="name">Agreement Clause Pivot</field>
<field name="model">agreement.clause</field>
<field name="arch" type="xml">
<pivot string="Agreement Clause Pivot">
<field name="agreement_id" type="row"/>
<field name="section_id" type="row"/>
<field name="name" type="row"/>
</pivot>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_clause">
<field name="name">Agreement Clauses</field>
<field name="res_model">partner_agreement.clause</field>
<field name="res_model">agreement.clause</field>
<field name="view_mode">tree,pivot,form</field>
</record>
</record>
<!-- Menu Items -->
<menuitem
name="Clauses"
id="partner_agreement_clauses_menu_1"
parent="partner_agreement.menu_2"
parent="agreement.partner_agreement_menu_2"
sequence="32"
action="partner_agreement_action_clause"/>
</data>
</odoo>
</odoo>

View File

@@ -1,53 +1,51 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- explicit list view definition -->
<!-- Agreement Increase Type List View-->
<record model="ir.ui.view" id="partner_agreement_increasetype_list_view">
<field name="name">Agreement Increase Type List</field>
<field name="model">partner_agreement.increasetype</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name"/>
<field name="description"/>
<field name="increase_percent"/>
</tree>
</field>
<field name="name">Agreement Increase Type List</field>
<field name="model">agreement.increasetype</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name"/>
<field name="description"/>
<field name="increase_percent"/>
</tree>
</field>
</record>
<!-- Agreement Increase Type Form View -->
<record model="ir.ui.view" id="partner_agreement_increasetype_form_view">
<field name="name">Agreement Increase Type Form</field>
<field name="model">partner_agreement.increasetype</field>
<field name="arch" type="xml">
<form string="Agreements Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Type"/>
<h1><field name="name"/></h1>
</div>
<group>
<field name="description"/>
<field name="increase_percent"/>
</group>
</sheet>
</form>
</field>
<record model="ir.ui.view" id="partner_agreement_increasetype_form_view">
<field name="name">Agreement Increase Type Form</field>
<field name="model">agreement.increasetype</field>
<field name="arch" type="xml">
<form string="Agreements Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Type"/>
<h1><field name="name"/></h1>
</div>
<group>
<field name="description"/>
<field name="increase_percent"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_increasetype">
<field name="name">Agreement Increase Type</field>
<field name="res_model">partner_agreement.increasetype</field>
<field name="view_mode">tree,form</field>
<field name="name">Agreement Increase Type</field>
<field name="res_model">agreement.increasetype</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Increase Types"
id="partner_agreement_increasetype_menu_1"
parent="partner_agreement.menu_3"
sequence="45"
action="partner_agreement_action_increasetype"/>
</data>
</odoo>
name="Increase Types"
id="partner_agreement_increasetype_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="45"
action="partner_agreement_action_increasetype"/>
</odoo>

View File

@@ -1,51 +1,49 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- explicit list view definition -->
<!-- Agreement Renewal Type List View-->
<record model="ir.ui.view" id="partner_agreement_renewaltype_list_view">
<field name="name">Agreement Renewal Type List</field>
<field name="model">partner_agreement.renewaltype</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name"/>
<field name="description"/>
</tree>
</field>
<field name="name">Agreement Renewal Type List</field>
<field name="model">agreement.renewaltype</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name"/>
<field name="description"/>
</tree>
</field>
</record>
<!-- Agreement Renewal Type Form View -->
<record model="ir.ui.view" id="partner_agreement_renewaltype_form_view">
<field name="name">Agreement Renewal Type Form</field>
<field name="model">partner_agreement.renewaltype</field>
<field name="arch" type="xml">
<form string="Agreements Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Type"/>
<h1><field name="name"/></h1>
</div>
<group>
<field name="description"/>
</group>
</sheet>
</form>
</field>
<field name="name">Agreement Renewal Type Form</field>
<field name="model">agreement.renewaltype</field>
<field name="arch" type="xml">
<form string="Agreements Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Type"/>
<h1><field name="name"/></h1>
</div>
<group>
<field name="description"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_renewaltype">
<field name="name">Agreement Renewal Type</field>
<field name="res_model">partner_agreement.renewaltype</field>
<field name="view_mode">tree,form</field>
<field name="name">Agreement Renewal Type</field>
<field name="res_model">agreement.renewaltype</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Renewal Types"
id="partner_agreement_renewaltype_menu_1"
parent="partner_agreement.menu_3"
sequence="44"
action="partner_agreement_action_renewaltype"/>
</data>
</odoo>
name="Renewal Types"
id="partner_agreement_renewaltype_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="44"
action="partner_agreement_action_renewaltype"/>
</odoo>

View File

@@ -1,97 +1,96 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- Agreement Sections Sequences-->
<record id="seq_agreement_section" model="ir.sequence">
<field name="name">agreement_section_sequencer</field>
<field name="code">agreement.section</field>
<field name="prefix">0</field>
<field name="padding">1</field>
<field name="name">agreement_section_sequencer</field>
<field name="code">agreement.section</field>
<field name="prefix">0</field>
<field name="padding">1</field>
</record>
<!-- Agreement Sections List View-->
<record model="ir.ui.view" id="partner_agreement_section_list_view">
<field name="name">Agreement Section List</field>
<field name="model">partner_agreement.section</field>
<field name="arch" type="xml">
<tree default_order='agreement, section_sequence'>
<field name="agreement" string="Agreement"/>
<field name="section_sequence" string="Sequence"/>
<field name="name" string="Section Name"/>
<field name="active" invisible="1"/>
</tree>
</field>
<field name="name">Agreement Section List</field>
<field name="model">agreement.section</field>
<field name="arch" type="xml">
<tree default_order='agreement_id, section_sequence'>
<field name="agreement_id" string="Agreement"/>
<field name="section_sequence" string="Sequence"/>
<field name="name" string="Section Name"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<!-- Agreement Sections Form View -->
<record model="ir.ui.view" id="partner_agreement_section_form_view">
<field name="name">Agreement Section Form</field>
<field name="model">partner_agreement.section</field>
<field name="arch" type="xml">
<form string="Agreements Section Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Section Name"/>
<h1><field name="name" string="Section Name"/></h1>
</div>
<group>
<field name="agreement" string="Agreement"/>
</group>
<group>
<field name='content' string="Content"/>
</group>
<notebook>
<page string="Clauses">
<field name="clauses" string="Clauses" context="{'default_section': active_id,'default_agreement': agreement}">
<tree>
<field name="clause_sequence" widget="handle"/>
<field name="name"/>
<field name="content"/>
</tree>
</field>
</page>
<page string="Dynamic Placeholder Generator">
THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
<group>
<field name="model_id"/>
<field name="model_object_field" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
<field name="sub_object" readonly="1"/>
<field name="sub_model_object_field" domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"/>
<field name="null_value"/>
<field name="copyvalue"/>
</group>
</page>
</notebook>
Sequence #<field name="section_sequence" readonly="1"/>
</sheet>
</form>
</field>
<field name="name">Agreement Section Form</field>
<field name="model">agreement.section</field>
<field name="arch" type="xml">
<form string="Agreements Section Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Section Name"/>
<h1><field name="name" string="Section Name"/></h1>
</div>
<group>
<field name="agreement_id" string="Agreement"/>
</group>
<group>
<field name='content' string="Content"/>
</group>
<notebook>
<page string="Clauses">
<field name="clauses_ids" string="Clauses" context="{'default_section_id': active_id,'default_agreement_id': agreement_id}">
<tree>
<field name="clause_sequence" widget="handle"/>
<field name="name"/>
<field name="content"/>
</tree>
</field>
</page>
<page string="Dynamic Placeholder Generator">
THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
<group>
<field name="model_id"/>
<field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id" domain="[('model_id','=',sub_object_id),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object_id','=',False)],'required':[('sub_object_id','!=',False)]}"/>
<field name="null_value"/>
<field name="copyvalue"/>
</group>
</page>
</notebook>
Sequence #<field name="section_sequence" readonly="1"/>
</sheet>
</form>
</field>
</record>
<!-- Agreement Section Search View -->
<record model="ir.ui.view" id="partner_agreement_section_search_view">
<field name="name">Agreement Section Search</field>
<field name="model">partner_agreement.section</field>
<field name="arch" type="xml">
<search string="Agreement Section Search">
<filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement'}"/>
</search>
</field>
<field name="name">Agreement Section Search</field>
<field name="model">agreement.section</field>
<field name="arch" type="xml">
<search string="Agreement Section Search">
<filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
</search>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_section">
<field name="name">Agreement Sections</field>
<field name="res_model">partner_agreement.section</field>
<field name="view_mode">tree,form</field>
<field name="name">Agreement Sections</field>
<field name="res_model">agreement.section</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Sections"
id="partner_agreement_sections_menu_1"
parent="partner_agreement.menu_2"
sequence="31"
action="partner_agreement_action_section"/>
</data>
</odoo>
name="Sections"
id="partner_agreement_sections_menu_1"
parent="agreement.partner_agreement_menu_2"
sequence="31"
action="partner_agreement_action_section"/>
</odoo>

View File

@@ -1,52 +1,50 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- explicit list view definition -->
<!-- Agreement Stage List View-->
<record model="ir.ui.view" id="partner_agreement_stage_list_view">
<field name="name">Agreement Stage List</field>
<field name="model">partner_agreement.stage</field>
<field name="arch" type="xml">
<tree default_order='sequence, name'>
<field name="sequence" widget="handle"/>
<field name="name" string="Stage Name"/>
</tree>
</field>
<field name="name">Agreement Stage List</field>
<field name="model">agreement.stage</field>
<field name="arch" type="xml">
<tree default_order='sequence, name'>
<field name="sequence" widget="handle"/>
<field name="name" string="Stage Name"/>
</tree>
</field>
</record>
<!-- Agreement Stage Form View -->
<record model="ir.ui.view" id="partner_agreement_stage_form_view">
<field name="name">Agreement Stage Form</field>
<field name="model">partner_agreement.stage</field>
<field name="arch" type="xml">
<form string="Agreements Stage Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Stage Name"/>
<h1><field name="name" string="Stage Name"/></h1>
</div>
<group>
<field name="sequence"/>
<field name="fold"/>
</group>
</sheet>
</form>
</field>
<field name="name">Agreement Stage Form</field>
<field name="model">agreement.stage</field>
<field name="arch" type="xml">
<form string="Agreements Stage Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Stage Name"/>
<h1><field name="name" string="Stage Name"/></h1>
</div>
<group>
<field name="sequence"/>
<field name="fold"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_stage">
<field name="name">Agreement Stage</field>
<field name="res_model">partner_agreement.stage</field>
<field name="view_mode">tree,form</field>
<field name="name">Agreement Stage</field>
<field name="res_model">agreement.stage</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Stages"
id="partner_agreement_stage_menu_1"
parent="partner_agreement.menu_3"
sequence="41"
action="partner_agreement_action_stage"/>
</data>
</odoo>
name="Stages"
id="partner_agreement_stage_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="41"
action="partner_agreement_action_stage"/>
</odoo>

View File

@@ -1,51 +1,49 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- explicit list view definition -->
<!-- Agreement Sub Type List View-->
<record model="ir.ui.view" id="partner_agreement_subtype_list_view">
<field name="name">Agreement Subtype List</field>
<field name="model">partner_agreement.subtype</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name" string="Sub-Type Name"/>
<field name="agreement_type" string="Agreement Type"/>
</tree>
</field>
<field name="name">Agreement Subtype List</field>
<field name="model">agreement.subtype</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name" string="Sub-Type Name"/>
<field name="agreement_type_id" string="Agreement Type"/>
</tree>
</field>
</record>
<!-- Agreement Sub Type Form View -->
<record model="ir.ui.view" id="partner_agreement_subtype_form_view">
<field name="name">Agreement Sub Type Form</field>
<field name="model">partner_agreement.subtype</field>
<field name="arch" type="xml">
<form string="Agreements Sub Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Sub-Type Name"/>
<h1><field name="name" string="Sub-Type Name"/></h1>
</div>
<group>
<field name="agreement_type" string="Agreement Type" required="True"/>
</group>
</sheet>
</form>
</field>
<field name="name">Agreement Sub Type Form</field>
<field name="model">agreement.subtype</field>
<field name="arch" type="xml">
<form string="Agreements Sub Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Sub-Type Name"/>
<h1><field name="name" string="Sub-Type Name"/></h1>
</div>
<group>
<field name="agreement_type_id" string="Agreement Type" required="True"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_subtype">
<field name="name">Agreement Sub Type</field>
<field name="res_model">partner_agreement.subtype</field>
<field name="view_mode">tree,form</field>
<field name="name">Agreement Sub Type</field>
<field name="res_model">agreement.subtype</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Sub-Types"
id="partner_agreement_subtype_menu_1"
parent="partner_agreement.menu_3"
sequence="43"
action="partner_agreement_action_subtype"/>
</data>
</odoo>
name="Sub-Types"
id="partner_agreement_subtype_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="43"
action="partner_agreement_action_subtype"/>
</odoo>

View File

@@ -1,51 +1,49 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- explicit list view definition -->
<!-- Agreement Type List View-->
<record model="ir.ui.view" id="partner_agreement_type_list_view">
<field name="name">Agreement Type List</field>
<field name="model">partner_agreement.type</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name" string="Type Name"/>
<field name="agreement_subtypes" string="Sub-Types"/>
</tree>
</field>
<field name="name">Agreement Type List</field>
<field name="model">agreement.type</field>
<field name="arch" type="xml">
<tree default_order='name'>
<field name="name" string="Type Name"/>
<field name="agreement_subtypes_ids" string="Sub-Types"/>
</tree>
</field>
</record>
<!-- Agreement Type Form View -->
<record model="ir.ui.view" id="partner_agreement_type_form_view">
<field name="name">Agreement Type Form</field>
<field name="model">partner_agreement.type</field>
<field name="arch" type="xml">
<form string="Agreements Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Type"/>
<h1><field name="name" string="Type Name"/></h1>
</div>
<group>
<field name="agreement_subtypes" string="Sub-Types"/>
</group>
</sheet>
</form>
</field>
<field name="name">Agreement Type Form</field>
<field name="model">agreement.type</field>
<field name="arch" type="xml">
<form string="Agreements Type Form">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Type"/>
<h1><field name="name" string="Type Name"/></h1>
</div>
<group>
<field name="agreement_subtypes_ids" string="Sub-Types"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_type">
<field name="name">Agreement Type</field>
<field name="res_model">partner_agreement.type</field>
<field name="view_mode">tree,form</field>
<field name="name">Agreement Type</field>
<field name="res_model">agreement.type</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Items -->
<menuitem
name="Types"
id="partner_agreement_type_menu_1"
parent="partner_agreement.menu_3"
sequence="42"
action="partner_agreement_action_type"/>
</data>
</odoo>
name="Types"
id="partner_agreement_type_menu_1"
parent="agreement.partner_agreement_menu_3"
sequence="42"
action="partner_agreement_action_type"/>
</odoo>

View File

@@ -1,48 +1,49 @@
<?xml version="1.0"?>
<odoo>
<report
id="partner_agreement_contract_document"
model="partner_agreement.agreement"
model="agreement"
string="Contract Document"
name="partner_agreement.report_agreement_document"
file="partner_agreement.report_agreement_document"
name="agreement.report_agreement_document"
file="agreement.report_agreement_document"
report_type="qweb-pdf"/>
<report
id="partner_agreement_contract_document_preview"
model="partner_agreement.agreement"
model="agreement"
string="Contract Document Preview"
name="partner_agreement.report_agreement_document"
file="partner_agreement.report_agreement_document"
name="agreement.report_agreement_document"
file="agreement.report_agreement_document"
report_type="qweb-html"/>
<template id="report_agreement_document">
<t t-name="partner_agreement.report_agreement_document">
<template id="report_agreement_document">
<t t-name="agreement.report_agreement_document">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<h3>!!! THIS IS JUST AN EXAMPLE REPORT TO SHOW HOW SECTIONS/CLAUSES CAN LOOK. MORE WORK IS NEEDED FOR FORMATTING</h3>
<table class="table table-condensed">
<tbody class="section_tbody">
<tr t-foreach="doc.sections" t-as="s">
<h3 t-field="s.name"/>
<span t-field="s.content"/>
<table class="table table-condensed">
<tbody class="clause_tbody">
<tr t-foreach="s.clauses" t-as="c">
<h4 style="padding:20px" t-field="c.name"/>
<h5 style="padding:20px" t-field="c.content"/>
</tr>
</tbody>
</table>
</tr>
</tbody>
</table>
</div>
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<h3>!!! THIS IS JUST AN EXAMPLE REPORT TO SHOW HOW SECTIONS/CLAUSES CAN LOOK. MORE WORK IS NEEDED FOR FORMATTING</h3>
<table class="table table-condensed">
<tbody class="section_tbody">
<tr t-foreach="doc.sections_ids" t-as="s">
<h3 t-field="s.name"/>
<span t-field="s.content"/>
<table class="table table-condensed">
<tbody class="clause_tbody">
<tr t-foreach="s.clauses_ids" t-as="c">
<h4 style="padding:20px" t-field="c.name"/>
<h5 style="padding:20px" t-field="c.content"/>
</tr>
</tbody>
</table>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</t>
</t>
</template>
</odoo>
</t>
</template>
</odoo>

View File

@@ -1,19 +1,17 @@
<?xml version="1.0"?>
<odoo>
<record model="ir.ui.view" id="partner_form">
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//page[@name='internal_notes']" position="after">
<page name="agreement" string="Agreements">
<group colspan="2" col="2">
<field name="agreements" string="Agreements" />
</group>
</page>
</xpath>
</data>
</field>
</record>
<record model="ir.ui.view" id="partner_form">
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='internal_notes']" position="after">
<page name="agreement" string="Agreements">
<group colspan="2" col="2">
<field name="agreements_ids" string="Agreements" />
</group>
</page>
</xpath>
</field>
</record>
</odoo>