diff options
| author | Romain Derie <rde@odoo.com> | 2018-06-20 16:01:02 +0200 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2018-06-22 18:32:49 +0200 |
| commit | a7e2bd86661a5143a2ad4df628b4fb54238dcc2b (patch) | |
| tree | 7f528feb1b551460c086dfdacb6ddb5c81551037 /addons/payment/models | |
| parent | 3d7e6b4757b0c793e95c83748c69f3354b996f96 (diff) | |
[IMP] account(_payment), payment, web: show residual amount..
.. & hide transaction list + page numbers on HTML report.
1. Before this commit:
Portal Invoices were displaying the total amount instead of the residual
amount. The pay button would also trigger a payment for the total amount
Now:
If part of the invoice is already paid, we show the residual amount and
payment transaction amount are set to residual amount so the client is asked
to pay what he really needs to pay.
2. Processed transaction results in a bootstrap alert message displayed at the
top of the page, showing warning, success or alert depending of the result.
This alert is supposed to show thank message `post_msg` only if it set.
Before this commit:
Since `post_msg` is an html field and editable through summernote, it will
never be empty. Indeed, empty field with summernote are replaced by a `br` tag
inside a `p` tag.
The condition would never be false, resulting in an empty `p` with a `br`
inside being displayed at the bottom of the alert, making it looks like it is
bugged.
Now:
The condition also consider summernote's empty string as such.
3. Remove the transaction list from the invoice portal template since it is not
an important information to the client.
Some client would not even understand what it is.
4. Hide page numbers on HTML report since they are not split in pages and page
number remains empty, resulting in `Page: /` (Or empty square with the
'clean layout.)
Diffstat (limited to 'addons/payment/models')
| -rw-r--r-- | addons/payment/models/account_invoice.py | 2 |
1 files changed, 1 insertions, 1 deletions
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)], |
