From 34c47eecd30bdf66bc057bf285a51cff956cd0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Wed, 12 Sep 2018 15:41:39 +0200 Subject: [PATCH] [IMP] various,sale: improve sign, pay and reject Flow ==== Have one model field responsible of telling when the sales order has to be signed or paid to avoid inconsistencies. The general rule is: sign & pay are only used upfront to confirm a sales order. If a sales person starts to modify (confirm) it manually, we don't need those features. Especially at that point pay should be done with invoices. Modal ===== For the sign, we want to force refresh the page to update its state, and thus we need to show the confirmation message on the reloaded page. For sign and pay, we changed a bit the structure of the text in the modal to allow to translate it more easily. Also fixed the payment selection by moving it into the body instead of the footer. For the reject modal, we want the feedback field to be required, so we can see in the chatter by who and why it has been rejected. Misc ==== Moved remaining bits of code related to preview/pay/accept/decline from sale_management into sale, where it should have been in the first place. Sales Order: - Improved status/contextual alerts. - Hide discount from small to fix responsive. PR: #26801 task-1876864 remove sales help --- .../views/account_portal_templates.xml | 2 +- .../views/account_portal_templates.xml | 4 +- addons/mail/data/mail_data.xml | 1 - .../portal/static/src/js/portal_signature.js | 7 + addons/sale/controllers/portal.py | 124 ++++++++++- addons/sale/data/mail_data.xml | 16 +- addons/sale/models/sale.py | 72 ++++-- addons/sale/report/sale_report_templates.xml | 4 +- addons/sale/views/sale_portal_templates.xml | 206 ++++++++---------- addons/sale/views/sale_views.xml | 3 + addons/sale_management/controllers/portal.py | 121 +--------- addons/sale_management/models/sale_order.py | 67 +----- .../views/sale_order_views.xml | 9 - 13 files changed, 294 insertions(+), 342 deletions(-) diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml index 020d305b9e8..1791f820511 100644 --- a/addons/account/views/account_portal_templates.xml +++ b/addons/account/views/account_portal_templates.xml @@ -102,7 +102,7 @@ Download diff --git a/addons/account_payment/views/account_portal_templates.xml b/addons/account_payment/views/account_portal_templates.xml index 6bada8f26aa..ffcbb7f99c6 100644 --- a/addons/account_payment/views/account_portal_templates.xml +++ b/addons/account_payment/views/account_portal_templates.xml @@ -44,7 +44,7 @@ -