summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrakash Prajapati <ppr@odoo.com>2019-01-22 09:00:24 +0000
committerjem-odoo <jem@openerp.com>2019-04-04 08:44:01 +0000
commited7efc1f3e80ee5319ac7790a3e4de1f80558f4e (patch)
tree79acef53acd9b835855a2e22caa42e892ee6f7ff
parentfb2fc0b3d8907f9fbf01834c2db3287668873fff (diff)
[IMP] sale, sale_management, sale_stock: Improve the sale order report.
Change capital letter "A" in Invoicing Address ..etc Added space between address and "Quotation number" Remove the time of the quotation date Replace "expiration date" next to "quotation date" Rename Optional Products to "Options" and place it above the terms and conditions. TaskID: 1920476 closes odoo/odoo#30550
-rw-r--r--addons/sale/report/sale_report_templates.xml44
-rw-r--r--addons/sale_management/report/sale_report_templates.xml4
-rw-r--r--addons/sale_stock/report/sale_order_report_templates.xml16
3 files changed, 30 insertions, 34 deletions
diff --git a/addons/sale/report/sale_report_templates.xml b/addons/sale/report/sale_report_templates.xml
index f5aee8c92d8..3991d063cbc 100644
--- a/addons/sale/report/sale_report_templates.xml
+++ b/addons/sale/report/sale_report_templates.xml
@@ -12,12 +12,12 @@
and doc.partner_invoice_id != doc.partner_id
or doc.partner_shipping_id != doc.partner_invoice_id">
<t t-set="information_block">
- <strong t-if="doc.partner_shipping_id == doc.partner_invoice_id">Invoicing and shipping address:</strong>
- <strong t-if="doc.partner_shipping_id != doc.partner_invoice_id">Invoicing address:</strong>
+ <strong t-if="doc.partner_shipping_id == doc.partner_invoice_id">Invoicing and Shipping Address:</strong>
+ <strong t-if="doc.partner_shipping_id != doc.partner_invoice_id">Invoicing Address:</strong>
<div t-field="doc.partner_invoice_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
<t t-if="doc.partner_shipping_id != doc.partner_invoice_id">
- <strong>Shipping address:</strong>
+ <strong>Shipping Address:</strong>
<div t-field="doc.partner_shipping_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
</t>
@@ -26,7 +26,7 @@
<div class="page">
<div class="oe_structure"/>
- <h2>
+ <h2 class="mt16">
<t t-if="not (env.context.get('proforma', False) or is_pro_forma)">
<span t-if="doc.state not in ['draft','sent']">Order # </span>
<span t-if="doc.state in ['draft','sent']">Quotation # </span>
@@ -48,20 +48,16 @@
</div>
<div t-if="doc.date_order and doc.state in ['draft','sent']" class="col-auto mw-100 mb-2">
<strong>Quotation Date:</strong>
- <p class="m-0" t-field="doc.date_order"/>
+ <p class="m-0" t-field="doc.date_order" t-options='{"widget": "date"}'/>
+ </div>
+ <div t-if="doc.validity_date and doc.state in ['draft', 'sent']" class="col-auto mw-100 mb-2" name="expiration_date">
+ <strong>Expiration:</strong>
+ <p class="m-0" t-field="doc.validity_date"/>
</div>
<div t-if="doc.user_id.name" class="col-auto mw-100 mb-2">
<strong>Salesperson:</strong>
<p class="m-0" t-field="doc.user_id"/>
</div>
- <div name="payment_term" t-if="doc.payment_term_id" class="col-auto mw-100 mb-2">
- <strong>Payment Terms:</strong>
- <p class="m-0" t-field="doc.payment_term_id"/>
- </div>
- <div t-if="doc.validity_date and doc.state in ['draft', 'sent']" class="col-auto mw-100 mb-2">
- <strong>Expiration Date:</strong>
- <p class="m-0" t-field="doc.validity_date"/>
- </div>
</div>
<!-- Is there a discount on at least one line? -->
@@ -149,7 +145,7 @@
</tbody>
</table>
- <div class="clearfix">
+ <div class="clearfix" name="so_total_summary">
<div id="total" class="row" name="total">
<div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
<table class="table table-sm">
@@ -193,16 +189,7 @@
</div>
</div>
- <p t-field="doc.note" />
- <p t-if="doc.payment_term_id.note">
- <span t-field="doc.payment_term_id.note"/>
- </p>
- <p id="fiscal_position_remark" t-if="doc.fiscal_position_id and doc.fiscal_position_id.sudo().note">
- <strong>Fiscal Position Remark:</strong>
- <span t-field="doc.fiscal_position_id.sudo().note"/>
- </p>
-
- <div t-if="doc.signature" class="mt32 ml16 mr16" name="signature">
+ <div t-if="doc.signature" class="mt32 ml64 mr4" name="signature">
<div class="offset-8">
<strong>Signature</strong>
</div>
@@ -215,6 +202,15 @@
</div>
<div class="oe_structure"/>
+
+ <p t-field="doc.note" />
+ <p t-if="doc.payment_term_id.note">
+ <span t-field="doc.payment_term_id.note"/>
+ </p>
+ <p id="fiscal_position_remark" t-if="doc.fiscal_position_id and doc.fiscal_position_id.sudo().note">
+ <strong>Fiscal Position Remark:</strong>
+ <span t-field="doc.fiscal_position_id.sudo().note"/>
+ </p>
</div>
</t>
</template>
diff --git a/addons/sale_management/report/sale_report_templates.xml b/addons/sale_management/report/sale_report_templates.xml
index f61e88fd24b..eac3cce3e3d 100644
--- a/addons/sale_management/report/sale_report_templates.xml
+++ b/addons/sale_management/report/sale_report_templates.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_saleorder_document_inherit_sale_management" inherit_id="sale.report_saleorder_document">
- <xpath expr="//div[hasclass('page')]/p[@id='fiscal_position_remark']" position="after">
+ <xpath expr="//div[@name='signature']" position="after">
<div t-if="doc.sale_order_option_ids and doc.state in ['draft', 'sent']">
<t t-set="has_option_discount" t-value="any(doc.sale_order_option_ids.filtered(lambda o: o.discount != 0.0))" />
<h4>
- <span>Optional Products</span>
+ <span>Options</span>
</h4>
<table class="table table-sm">
<thead>
diff --git a/addons/sale_stock/report/sale_order_report_templates.xml b/addons/sale_stock/report/sale_order_report_templates.xml
index 9faa1aca6f3..34a8bda04f5 100644
--- a/addons/sale_stock/report/sale_order_report_templates.xml
+++ b/addons/sale_stock/report/sale_order_report_templates.xml
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<odoo>
<template id="report_saleorder_document_inherit_sale_stock" inherit_id="sale.report_saleorder_document">
- <xpath expr="//div[@name='payment_term']" position="after">
- <div class="col-3" t-if="doc.incoterm" groups="sale_stock.group_display_incoterm">
- <strong>Incoterms:</strong>
- <p t-field="doc.incoterm.code"/>
- </div>
- </xpath>
- </template>
-</odoo> \ No newline at end of file
+ <xpath expr="//div[@name='expiration_date']" position="after">
+ <div class="col-3" t-if="doc.incoterm" groups="sale_stock.group_display_incoterm">
+ <strong>Incoterm:</strong>
+ <p t-field="doc.incoterm.code"/>
+ </div>
+ </xpath>
+ </template>
+</odoo>