summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffroy Larue <gla@odoo.com>2018-11-16 09:09:36 +0000
committerGeoffroy Larue <gla@odoo.com>2018-11-16 09:33:06 +0000
commite9879e63b48c406673b4e50865e1e7136e54ac67 (patch)
tree7e9663ba946441948ac9c86df6ad7c9e7d5edaec
parent76d29d15bfb2c56b7745a9b1fe990a6c558245c1 (diff)
[IMP] portal: improve design
Small changes to the customer portal : form input reorderings, relabelling, removal of the draft quotation warning.
-rw-r--r--addons/portal/static/src/scss/portal.scss1
-rw-r--r--addons/portal/views/portal_templates.xml8
-rw-r--r--addons/sale/controllers/portal.py2
-rw-r--r--addons/sale/views/sale_portal_templates.xml11
4 files changed, 8 insertions, 14 deletions
diff --git a/addons/portal/static/src/scss/portal.scss b/addons/portal/static/src/scss/portal.scss
index 2f344baebf5..a02e765f6a3 100644
--- a/addons/portal/static/src/scss/portal.scss
+++ b/addons/portal/static/src/scss/portal.scss
@@ -363,7 +363,6 @@ img.o_we_custom_image {
address {
span[itemprop="name"] {
- font-weight: bold;
margin-bottom: 0.3em;
}
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml
index 95d3669e34a..6827424deea 100644
--- a/addons/portal/views/portal_templates.xml
+++ b/addons/portal/views/portal_templates.xml
@@ -370,10 +370,6 @@
<label class="col-form-label" for="email">Email</label>
<input type="email" name="email" t-attf-class="form-control #{error.get('email') and 'is-invalid' or ''}" t-att-value="email or partner.email" />
</div>
- <div t-attf-class="form-group #{error.get('phone') and 'o_has_error' or ''} col-xl-6">
- <label class="col-form-label" for="phone">Phone</label>
- <input type="tel" name="phone" t-attf-class="form-control #{error.get('phone') and 'is-invalid' or ''}" t-att-value="phone or partner.phone" />
- </div>
<div class="clearfix" />
<div t-attf-class="form-group #{error.get('company_name') and 'o_has_error' or ''} col-xl-6">
@@ -385,6 +381,10 @@
<label class="col-form-label label-optional" for="vat">VAT Number</label>
<input type="text" name="vat" t-attf-class="form-control #{error.get('vat') and 'is-invalid' or ''}" t-att-value="vat or partner.vat" t-att-readonly="None if partner.can_edit_vat() else '1'" t-att-title="None if partner.can_edit_vat() else 'Changing VAT number is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.'" />
</div>
+ <div t-attf-class="form-group #{error.get('phone') and 'o_has_error' or ''} col-xl-6">
+ <label class="col-form-label" for="phone">Phone</label>
+ <input type="tel" name="phone" t-attf-class="form-control #{error.get('phone') and 'is-invalid' or ''}" t-att-value="phone or partner.phone" />
+ </div>
<div class="clearfix" />
<div t-attf-class="form-group #{error.get('street') and 'o_has_error' or ''} col-xl-6">
diff --git a/addons/sale/controllers/portal.py b/addons/sale/controllers/portal.py
index 0796b65dead..117a0598c08 100644
--- a/addons/sale/controllers/portal.py
+++ b/addons/sale/controllers/portal.py
@@ -198,7 +198,7 @@ class CustomerPortal(CustomerPortal):
return {'error': _('Invalid order')}
if not order_sudo.has_to_be_signed():
- return {'error': _('Order is not in a state requiring customer signature.')}
+ return {'error': _('The order is not in a state requiring customer signature.')}
if not signature:
return {'error': _('Signature is missing.')}
diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml
index 9a428d7ab19..4d0b6ad1b32 100644
--- a/addons/sale/views/sale_portal_templates.xml
+++ b/addons/sale/views/sale_portal_templates.xml
@@ -305,11 +305,6 @@
<strong>This quotation has been canceled.</strong> <a role="button" href="#discussion"><i class="fa fa-comment"/> Contact us to get a new quotation.</a>
</div>
- <div t-if="sale_order.state == 'draft'" class="alert alert-warning alert-dismissable d-print-none" role="status">
- <button type="button" class="close" data-dismiss="alert" aria-label="close">&amp;times;</button>
- <strong>This is a draft quotation.</strong> <a role="button" href="#discussion"><i class="fa fa-comment"/> Contact us to get the final version.</a>
- </div>
-
<div t-if="sale_order.is_expired" class="alert alert-warning alert-dismissable d-print-none" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="close">&amp;times;</button>
<strong>This offer expired!</strong> <a role="button" href="#discussion"><i class="fa fa-comment"/> Contact us to get a new quotation.</a>
@@ -343,7 +338,7 @@
<!-- chatter -->
<div id="sale_order_communication" class="mt-4">
- <h2>Communication</h2>
+ <h2>History</h2>
<t t-call="portal.message_thread">
<t t-set="object" t-value="sale_order"/>
</t>
@@ -361,8 +356,8 @@
<template id="sale_order_portal_content" name="Sales Order Portal Content">
<!-- Intro -->
<div id="introduction" t-attf-class="pb-2 pt-3 #{'card-header bg-white' if report_type == 'html' else ''}">
- <h2 class="my-0">
- <span t-field="sale_order.type_name"></span>
+ <h2 class="my-0">
+ <t t-esc="sale_order.type_name"/>
<em t-esc="sale_order.name"/>
</h2>
</div>