From 8e4a0c19b382a9ccaf899653c5461694f9adb26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 9 Aug 2017 17:22:53 +0200 Subject: [PATCH 1/6] [IMP] sale_payment: make payment code more sale limited Purpose is to have methods on transactions can be called and that handle correctly transactions linked to a sale order, but also in a near future to an invoice, a subscription, several of them, none of them, ... This commit already checks that sale order related code for payment transactions is run only when a sale order is linked to a transaction. --- addons/sale_payment/models/payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_payment/models/payment.py b/addons/sale_payment/models/payment.py index a6b6ef3b209..50bc52fa4e1 100644 --- a/addons/sale_payment/models/payment.py +++ b/addons/sale_payment/models/payment.py @@ -32,7 +32,7 @@ class PaymentTransaction(models.Model): tx = getattr(self, tx_find_method_name)(data) _logger.info('<%s> transaction processed: tx ref:%s, tx amount: %s', acquirer_name, tx.reference if tx else 'n/a', tx.amount if tx else 'n/a') - if tx: + if tx and tx.sale_order_id: # Auto-confirm SO if necessary tx._confirm_so() From 4f78182cd571e924e9e58ad7c4abbb5d040f5d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 23 Aug 2017 14:41:33 +0200 Subject: [PATCH 2/6] [IMP] portal: improve less for customer portal --- .../views/account_portal_templates.xml | 2 +- .../views/account_portal_templates.xml | 2 +- .../static/src/less/portal_frontend.less | 49 ++++++++++--------- addons/portal/views/portal_templates.xml | 10 ++-- .../views/project_portal_templates.xml | 4 +- addons/purchase/views/portal_templates.xml | 2 +- addons/sale/views/sale_portal_templates.xml | 4 +- 7 files changed, 38 insertions(+), 35 deletions(-) diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml index aa7f81ec3a3..cba163a8cb1 100644 --- a/addons/account/views/account_portal_templates.xml +++ b/addons/account/views/account_portal_templates.xml @@ -25,7 +25,7 @@

There are currently no invoices and payments for your account.

-
+
diff --git a/addons/account_payment/views/account_portal_templates.xml b/addons/account_payment/views/account_portal_templates.xml index 7c8ba8543cf..6d1c446e0f3 100644 --- a/addons/account_payment/views/account_portal_templates.xml +++ b/addons/account_payment/views/account_portal_templates.xml @@ -1,6 +1,6 @@ - + + + + + \ No newline at end of file diff --git a/addons/account_payment/views/account_portal_templates.xml b/addons/account_payment/views/account_portal_templates.xml index 6d1c446e0f3..12dc68013af 100644 --- a/addons/account_payment/views/account_portal_templates.xml +++ b/addons/account_payment/views/account_portal_templates.xml @@ -1,7 +1,7 @@
Invoice #