diff options
| author | Prakash Prajapati <ppr@odoo.com> | 2019-01-22 10:50:13 +0000 |
|---|---|---|
| committer | jem-odoo <jem@openerp.com> | 2019-04-04 08:59:01 +0000 |
| commit | 4327fbebfdb8e95af18a0d849917be2caa76bfe5 (patch) | |
| tree | e6b8bc3d23c7d0264d5829d2e18267d11343f7bd /addons | |
| parent | ed7efc1f3e80ee5319ac7790a3e4de1f80558f4e (diff) | |
[IMP] sale, sale_management, sale_stock: Improve in the portal view.
Small changes in quotation portal view:
* Reposition the 'Expiration Date'
* Added Incoterm info
* Added ":" after address
* Rename Details => Pricing
* Rename Optional Products => Options
* Remove "discount" in the column "discount" after the % In the
section "Options" add "10% discount" like in the printed report
* Add payment terms note
Purpose is to make it a little more beautiful and cleaner
for end user.
Task-1920476
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/portal/views/portal_templates.xml | 2 | ||||
| -rw-r--r-- | addons/sale/views/sale_portal_templates.xml | 32 | ||||
| -rw-r--r-- | addons/sale/views/sale_views.xml | 2 | ||||
| -rw-r--r-- | addons/sale_management/views/sale_portal_templates.xml | 9 | ||||
| -rw-r--r-- | addons/sale_stock/views/sale_stock_portal_template.xml | 7 |
5 files changed, 33 insertions, 19 deletions
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml index 462a93a5936..1c45973f82c 100644 --- a/addons/portal/views/portal_templates.xml +++ b/addons/portal/views/portal_templates.xml @@ -175,7 +175,7 @@ <template id="portal_record_sidebar" name="My Portal Record Sidebar"> <div t-attf-class="col-12 col-lg flex-lg-grow-0 #{classes}"> - <div class="card bg-white mb-4" id="sidebar_content"> + <div class="card bg-white mb-4 sticky-top" id="sidebar_content"> <div t-if="title" class="card-body text-center pb-2 pt-3"> <t t-raw="title"/> </div> diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml index 32b2a06b451..4e1d82f36b7 100644 --- a/addons/sale/views/sale_portal_templates.xml +++ b/addons/sale/views/sale_portal_templates.xml @@ -135,7 +135,7 @@ <a t-if="sale_order.has_to_be_signed(True)" role="button" class="btn btn-primary btn-block mb8" data-toggle="modal" data-target="#modalaccept" href="#"> <i class="fa fa-check"/><t t-if="sale_order.has_to_be_paid(True)"> Sign & Pay</t><t t-else=""> Accept & Sign</t> </a> - <a t-elif="sale_order.has_to_be_paid(True)" role="button" id="o_sale_portal_paynow" class="btn btn-primary btn-block mb8" data-toggle="modal" data-target="#modalaccept" href="#"> + <a t-elif="sale_order.has_to_be_paid(True)" role="button" id="o_sale_portal_paynow" data-toggle="modal" data-target="#modalaccept" href="#" t-att-class="'btn-block mb8 %s' % ('btn btn-light' if sale_order.transaction_ids else 'btn btn-primary')" > <i class="fa fa-check"/> <t t-if="not sale_order.signature">Accept & Pay</t><t t-else="">Pay now</t> </a> <div class="o_download_pdf btn-toolbar flex-sm-nowrap"> @@ -330,7 +330,7 @@ </div> </t> <div t-elif="sale_order.has_to_be_paid(True)" class="col-sm-auto mt8"> - <a role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#"> + <a role="button" data-toggle="modal" data-target="#modalaccept" href="#" t-att-class="'%s' % ('btn btn-light' if sale_order.transaction_ids else 'btn btn-primary')"> <i class="fa fa-check"/> <t t-if="not sale_order.signature">Accept & Pay</t><t t-else="">Pay now</t> </a> </div> @@ -373,21 +373,23 @@ </t> </t> </div> - <div class="mb-3"> - <strong>Date:</strong> <span t-field="sale_order.create_date" t-options='{"widget": "date"}'/> - </div> - <div class="mb-3" t-if="sale_order.validity_date"> - <strong>Expiration Date:</strong> <span t-field="sale_order.validity_date" t-options='{"widget": "date"}'/> + <div class="row" id="so_date"> + <div class="mb-3 col-6"> + <strong>Date:</strong> <span t-field="sale_order.create_date" t-options='{"widget": "date"}'/> + </div> + <div class="mb-3 col-6" t-if="sale_order.validity_date"> + <strong>Expiration Date:</strong> <span t-field="sale_order.validity_date" t-options='{"widget": "date"}'/> + </div> </div> <div class="row"> <div class="col-lg-6"> - <strong t-if="sale_order.partner_shipping_id == sale_order.partner_invoice_id" class="d-block mb-1">Invoicing and Shipping Address</strong> - <strong t-if="sale_order.partner_shipping_id != sale_order.partner_invoice_id" class="d-block mb-1">Invoicing Address</strong> + <strong t-if="sale_order.partner_shipping_id == sale_order.partner_invoice_id" class="d-block mb-1">Invoicing and Shipping Address:</strong> + <strong t-if="sale_order.partner_shipping_id != sale_order.partner_invoice_id" class="d-block mb-1">Invoicing Address:</strong> <address t-field="sale_order.partner_invoice_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/> </div> <t t-if="sale_order.partner_shipping_id != sale_order.partner_invoice_id"> <div id="shipping_address" class="col-lg-6"> - <strong class="d-block mb-1">Shipping Address</strong> + <strong class="d-block mb-1">Shipping Address:</strong> <address t-field="sale_order.partner_shipping_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/> </div> </t> @@ -417,7 +419,7 @@ </div> <section id="details" style="page-break-inside: auto;" class="mt32"> - <h3 id="details">Details</h3> + <h3 id="details">Pricing</h3> <t t-set="display_discount" t-value="True in [line.discount > 0 for line in sale_order.order_line]"/> @@ -468,7 +470,7 @@ </td> <td t-if="display_discount" t-attf-class="text-right {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}"> <strong t-if="line.discount > 0" class="text-info"> - <t t-esc="((line.discount % 1) and '%s' or '%d') % line.discount"/>% discount + <t t-esc="((line.discount % 1) and '%s' or '%d') % line.discount"/>% </strong> </td> <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"> @@ -578,6 +580,12 @@ <hr class="mt-0 mb-1"/> <em t-field="sale_order.note"/> </section> + + <section class="mt-5" t-if="sale_order.payment_term_id"> + <h3 class="">Payment terms</h3> + <hr class="mt-0 mb-1"/> + <span t-field="sale_order.payment_term_id"/> + </section> </div> </template> diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 0d4f50435a6..bee7433ca85 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -540,7 +540,7 @@ </div> <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/> </group> - <field name="note" class="oe_inline" placeholder="Terms and conditions... (note: you can setup default ones in the Configuration menu)"/> + <field name="note" class="oe_inline" placeholder="Terms and conditions... Configuration menu)"/> <div class="oe_clear"/> </group> </page> diff --git a/addons/sale_management/views/sale_portal_templates.xml b/addons/sale_management/views/sale_portal_templates.xml index 90d2100ba4a..2a04c93fbdb 100644 --- a/addons/sale_management/views/sale_portal_templates.xml +++ b/addons/sale_management/views/sale_portal_templates.xml @@ -30,14 +30,13 @@ <xpath expr="//section[@id='signature']" position="after"> <t t-if="any([(not option.line_id) for option in sale_order.sale_order_option_ids])"> <section> - <h3>Optional Products</h3> - <t t-set="display_discount" t-value="True in [option.discount for option in sale_order.sale_order_option_ids]"/> + <h3>Options</h3> + <t t-set="display_discount" t-value="True in [option.discount > 0 for option in sale_order.sale_order_option_ids]"/> <table class="table table-sm"> <thead> <tr> <th class="text-left">Product</th> <th t-if="display_discount" class="text-right"> - <span>Discount</span> </th> <th class="text-right">Price</th> <th t-if="sale_order.state in ['draft', 'sent'] and report_type == 'html'"></th> @@ -49,8 +48,8 @@ <td> <div t-field="option.name"/> </td> - <td t-if="display_discount"> - <strong t-if="option.discount" class="text-info text-right"> + <td t-if="display_discount" class="text-right"> + <strong t-if="option.discount" class="text-info"> <t t-esc="((option.discount % 1) and '%s' or '%d') % option.discount"/>% discount </strong> </td> diff --git a/addons/sale_stock/views/sale_stock_portal_template.xml b/addons/sale_stock/views/sale_stock_portal_template.xml index 9d327b32fe2..a781a04c3b5 100644 --- a/addons/sale_stock/views/sale_stock_portal_template.xml +++ b/addons/sale_stock/views/sale_stock_portal_template.xml @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <template id="sale_order_portal_content_inherit_sale_stock" name="Orders Shipping Followup" inherit_id="sale.sale_order_portal_content"> + <xpath expr="//div[@id='so_date']" position="after"> + <div class="row" t-if="sale_order.incoterm"> + <div class="mb-3 col-6 ml-auto"> + <strong>Incoterm: </strong> <span t-field="sale_order.incoterm"/> + </div> + </div> + </xpath> <xpath expr="//div[@id='informations']" position="inside"> <t t-if="sale_order.picking_ids"> <div> |
