Skip to content
Snippets Groups Projects
Commit 084b5534 authored by fwi-odoo's avatar fwi-odoo Committed by Yannick Tivisse
Browse files

[MOV] sale: Merge xml files when related to same model

Merge sale_layout_category_data.xml into sale_data.xml
Merge sale_team_dashboard_views into sales_team_views.xml
parent a33e808c
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,6 @@ The Dashboard for the Sales Manager will include
'data': [
'data/ir_sequence_data.xml',
'data/sale_data.xml',
'data/sale_layout_category_data.xml',
'data/sale_tour.xml',
'report/sale_report.xml',
'data/mail_template_data.xml',
......@@ -61,7 +60,6 @@ The Dashboard for the Sales Manager will include
'views/sale_config_settings_views.xml',
'views/sale_templates.xml',
'views/sale_layout_category_view.xml',
'views/sales_team_dashboard_views.xml',
],
'demo': [
'data/sale_demo.xml',
......
......@@ -61,6 +61,18 @@
<field name="parent_id" eval="ref('account.mt_invoice_validated')"/>
<field name="relation_field">team_id</field>
</record>
<record id="sale_layout_cat_1" model="sale.layout_category">
<field name="name">Services</field>
<field name="subtotal" eval="True"></field>
<field name="pagebreak" eval="True"></field>
<field name="sequence">1</field>
</record>
<record id="sale_layout_cat_2" model="sale.layout_category">
<field name="name">Material</field>
<field name="subtotal" eval="True"></field>
<field name="pagebreak" eval="False"></field>
<field name="sequence">10</field>
</record>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="sale_layout_cat_1" model="sale.layout_category">
<field name="name">Services</field>
<field name="subtotal" eval="True"></field>
<field name="pagebreak" eval="True"></field>
<field name="sequence">1</field>
</record>
<record id="sale_layout_cat_2" model="sale.layout_category">
<field name="name">Material</field>
<field name="subtotal" eval="True"></field>
<field name="pagebreak" eval="False"></field>
<field name="sequence">10</field>
</record>
</data>
</openerp>
<odoo>
<record id="action_quotation_form" model="ir.actions.act_window">
<field name="name">New Quotation</field>
<field name="res_model">sale.order</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="context">{
'search_default_team_id': [active_id],
'default_team_id': active_id,
'default_user_id': uid,
}
</field>
<field name="search_view_id" ref="sale_order_view_search_inherit_quotation"/>
</record>
<record id="crm_team_salesteams_view_kanban" model="ir.ui.view">
<field name="name">crm.team.kanban</field>
<field name="model">crm.team</field>
<field name="inherit_id" ref="sales_team.crm_team_salesteams_view_kanban"/>
<field name="arch" type="xml">
<data>
<xpath expr="//templates" position="before">
<field name="use_quotations"/>
<field name="use_invoices"/>
<field name="invoiced"/>
<field name="invoiced_target"/>
<field name="currency_id"/>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="inside">
<div class="row mb4" t-if="record.use_invoices.raw_value">
<div class="col-xs-8">
<a name="%(action_orders_to_invoice_salesteams)d" type="action">
Sales to Invoice
</a>
</div>
<div class="col-xs-4 text-right">
<field name="sales_to_invoice_amount" widget="monetary"/>
</div>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_primary_left')]" position="inside">
<button class="btn btn-primary" name="%(sale.action_quotations_salesteams)d" type="action">Quotations</button>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="after">
<div t-if="record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom">
<field name="invoiced" widget="progress" title="Invoicing" options="{'current_value': 'invoiced', 'max_value': 'invoiced_target', 'editable': true, 'edit_max_value': true, 'on_change': 'update_invoiced_target'}"/>
</div>
<div t-if="!record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom text-center">
<a href="#" class="sales_team_target_definition o_inline_link">Click to define a team target</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_manage_view')]" position="inside">
<t t-if="record.use_quotations.raw_value">
<div>
<a name="%(action_quotations_salesteams)d" type="action">Quotations</a>
</div>
<div >
<a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
</div>
</t>
<div t-if="record.use_invoices.raw_value" groups="account.group_account_invoice">
<a name="%(action_invoice_salesteams)d" type="action">Invoices</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_manage_new')]" position="inside">
<div t-if="record.use_quotations.raw_value">
<a name="%(action_quotation_form)d" type="action">
Quotation
</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]" position="inside">
<t t-if="record.use_quotations.raw_value">
<div>
<a name="%(action_order_report_quotation_salesteam)d" type="action">
Quotation
</a>
</div>
<div>
<a name="%(action_order_report_so_salesteam)d" type="action">
Sales
</a>
</div>
</t>
<div t-if="record.use_invoices.raw_value">
<a name="%(action_account_invoice_report_salesteam)d" type="action">
Invoices
</a>
</div>
</xpath>
</data>
</field>
</record>
</odoo>
......@@ -31,5 +31,108 @@
</xpath>
</field>
</record>
<!-- Sales Team Dashboard Views -->
<record id="action_quotation_form" model="ir.actions.act_window">
<field name="name">New Quotation</field>
<field name="res_model">sale.order</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="context">{
'search_default_team_id': [active_id],
'default_team_id': active_id,
'default_user_id': uid,
}
</field>
<field name="search_view_id" ref="sale_order_view_search_inherit_quotation"/>
</record>
<record id="crm_team_salesteams_view_kanban" model="ir.ui.view">
<field name="name">crm.team.kanban</field>
<field name="model">crm.team</field>
<field name="inherit_id" ref="sales_team.crm_team_salesteams_view_kanban"/>
<field name="arch" type="xml">
<data>
<xpath expr="//templates" position="before">
<field name="use_quotations"/>
<field name="use_invoices"/>
<field name="invoiced"/>
<field name="invoiced_target"/>
<field name="currency_id"/>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="inside">
<div class="row mb4" t-if="record.use_invoices.raw_value">
<div class="col-xs-8">
<a name="%(action_orders_to_invoice_salesteams)d" type="action">
Sales to Invoice
</a>
</div>
<div class="col-xs-4 text-right">
<field name="sales_to_invoice_amount" widget="monetary"/>
</div>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_primary_left')]" position="inside">
<button class="btn btn-primary" name="%(sale.action_quotations_salesteams)d" type="action">Quotations</button>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="after">
<div t-if="record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom">
<field name="invoiced" widget="progress" title="Invoicing" options="{'current_value': 'invoiced', 'max_value': 'invoiced_target', 'editable': true, 'edit_max_value': true, 'on_change': 'update_invoiced_target'}"/>
</div>
<div t-if="!record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom text-center">
<a href="#" class="sales_team_target_definition o_inline_link">Click to define a team target</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_manage_view')]" position="inside">
<t t-if="record.use_quotations.raw_value">
<div>
<a name="%(action_quotations_salesteams)d" type="action">Quotations</a>
</div>
<div >
<a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
</div>
</t>
<div t-if="record.use_invoices.raw_value" groups="account.group_account_invoice">
<a name="%(action_invoice_salesteams)d" type="action">Invoices</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_manage_new')]" position="inside">
<div t-if="record.use_quotations.raw_value">
<a name="%(action_quotation_form)d" type="action">
Quotation
</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]" position="inside">
<t t-if="record.use_quotations.raw_value">
<div>
<a name="%(action_order_report_quotation_salesteam)d" type="action">
Quotation
</a>
</div>
<div>
<a name="%(action_order_report_so_salesteam)d" type="action">
Sales
</a>
</div>
</t>
<div t-if="record.use_invoices.raw_value">
<a name="%(action_account_invoice_report_salesteam)d" type="action">
Invoices
</a>
</div>
</xpath>
</data>
</field>
</record>
</data>
</openerp>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment