diff options
| -rw-r--r-- | addons/account/views/account_portal_templates.xml | 7 | ||||
| -rw-r--r-- | addons/account_payment/views/account_portal_templates.xml | 19 | ||||
| -rw-r--r-- | addons/payment/models/account_invoice.py | 2 | ||||
| -rw-r--r-- | addons/payment/views/payment_portal_templates.xml | 8 | ||||
| -rw-r--r-- | addons/web/views/report_templates.xml | 8 |
5 files changed, 16 insertions, 28 deletions
diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml index d2e30a7f1c8..1513427285d 100644 --- a/addons/account/views/account_portal_templates.xml +++ b/addons/account/views/account_portal_templates.xml @@ -75,7 +75,12 @@ <div class="col-md-3 hidden-print"> <div class="bs-sidebar mb16" id="sidebar_content"> <div class="text-center pt16 o_account_portal_sidebar"> - <h2 class="media-heading"><strong><span t-field="invoice.amount_total"/></strong></h2> + <h2 class="media-heading"> + <strong> + <span t-if="invoice.residual > 0" t-field="invoice.residual"/> + <span t-else="1" t-field="invoice.amount_total"/> + </strong> + </h2> <div class="mb4" t-if="invoice.state != 'paid'"><i class="fa fa-clock-o"/><span class="o_portal_sidebar_timeago ml4" t-att-datetime="invoice.date_due"/></div> </div> <div class="o_payment_button"> diff --git a/addons/account_payment/views/account_portal_templates.xml b/addons/account_payment/views/account_portal_templates.xml index a82565af347..b541872e39a 100644 --- a/addons/account_payment/views/account_portal_templates.xml +++ b/addons/account_payment/views/account_portal_templates.xml @@ -86,25 +86,6 @@ <t t-call="account_payment.portal_invoice_payment"/> </div> </div> - <t t-set="tx_ids" t-value="invoice.transaction_ids.filtered(lambda tx: tx.state in ('pending','authorized', 'done'))"/> - <div t-if="tx_ids" class="o_tx_status mb8"> - <strong>Transactions</strong> - <br/> - <t t-foreach="tx_ids" t-as="tx"> - <span t-esc="tx.reference"/> - <span class="text-muted" t-field="tx.create_date"/> - <t t-if="tx.state == 'done'"> - <span class="label label-success orders_label_text_align"><i class="fa fa-fw fa-check"/> Done</span> - </t> - <t t-if="tx.state == 'authorized'"> - <span class="label label-success orders_label_text_align"><i class="fa fa-fw fa-check"/> Authorized</span> - </t> - <t t-if="tx.state not in ('done', 'authorized')"> - <span class="label label-info orders_label_text_align"><i class="fa fa-fw fa-clock-o"/> Waiting</span> - <t t-if="tx.state_message"><br /><span t-esc="tx.state_message"/></t> - </t> - </t> - </div> </xpath> </template> diff --git a/addons/payment/models/account_invoice.py b/addons/payment/models/account_invoice.py index 490ebd58cdf..54d9f9099b0 100644 --- a/addons/payment/models/account_invoice.py +++ b/addons/payment/models/account_invoice.py @@ -75,7 +75,7 @@ class AccountInvoice(models.Model): vals['acquirer_id'] = acquirer.id vals.update({ - 'amount': sum(self.mapped('amount_total')), + 'amount': sum(self.mapped('residual')), 'currency_id': currency.id, 'partner_id': partner.id, 'invoice_ids': [(6, 0, self.ids)], diff --git a/addons/payment/views/payment_portal_templates.xml b/addons/payment/views/payment_portal_templates.xml index cfa0ac19269..1cb4873d524 100644 --- a/addons/payment/views/payment_portal_templates.xml +++ b/addons/payment/views/payment_portal_templates.xml @@ -118,20 +118,22 @@ To be called with the 'payment_tx_id' value. --> + <t t-set="thanks_msg" t-value="payment_tx_id.acquirer_id.post_msg"/> + <t t-set="thanks_msg" t-value="thanks_msg and thanks_msg != '<p><br></p>' and thanks_msg"/> <div t-if="payment_tx_id and payment_tx_id.state == 'pending'" class="alert alert-warning alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <span t-if='payment_tx_id.acquirer_id.pending_msg' t-raw="payment_tx_id.acquirer_id.pending_msg"/> - <span t-if='payment_tx_id.acquirer_id.post_msg' t-raw="payment_tx_id.acquirer_id.post_msg"/> + <span t-if='thanks_msg' t-raw="thanks_msg"/> </div> <div t-if="payment_tx_id and payment_tx_id.state == 'authorized'" class="alert alert-success alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> Your payment has been authorized. - <span t-if='payment_tx_id.acquirer_id.post_msg' t-raw="payment_tx_id.acquirer_id.post_msg"/> + <span t-if='thanks_msg' t-raw="thanks_msg"/> </div> <div t-if="payment_tx_id and payment_tx_id.state == 'done'" class="alert alert-success alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <span t-if='payment_tx_id.acquirer_id.done_msg' t-raw="payment_tx_id.acquirer_id.done_msg"/> - <span t-if='payment_tx_id.acquirer_id.post_msg' t-raw="payment_tx_id.acquirer_id.post_msg"/> + <span t-if='thanks_msg' t-raw="thanks_msg"/> </div> <div t-if="payment_tx_id and payment_tx_id.state == 'cancel'" class="alert alert-danger alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index b2adac467e7..5c08be5df9f 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -176,7 +176,7 @@ <li t-if="company.vat"><i class="fa fa-building-o"/><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li> </ul> <div t-field="company.report_footer"/> - <div class="text-muted"> + <div t-if="not type_html" class="text-muted"> Page: <span class="page"/> of @@ -215,7 +215,7 @@ <li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li> </ul> <div t-field="company.report_footer"/> - <div> + <div t-if="not type_html"> Page: <span class="page"/> / <span class="topage"/> </div> </div> @@ -257,7 +257,7 @@ <h4 class="mt0 mb0 text-uppercase" t-field="company.report_header"/> </div> <div class="col-xs-1"> - <ul class="list-inline pagenumber pull-right text-center"> + <ul t-if="not type_html" class="list-inline pagenumber pull-right text-center"> <li><strong><span class="page"/></strong></li> </ul> </div> @@ -304,7 +304,7 @@ <span t-field="company.report_footer"/> </div> - <div class="text-muted"> + <div t-if="not type_html" class="text-muted"> Page: <span class="page"/> / <span class="topage"/> </div> </div> |
