summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorToufik Ben Jaa <tbe@odoo.com>2019-08-12 14:54:24 +0000
committerToufik Ben Jaa <tbe@odoo.com>2019-08-13 11:43:50 +0000
commit0f6740c80c97c18d2ca8e9421c11398bf4314849 (patch)
tree6c60d6060b8bdc22dbae8228a038e879a3d1af66 /addons
parent964f1c2b594f5acdca3171cd34aef5276091db31 (diff)
[FIX] website_sale_digital: `invoice_id` doesn't exists anymore
- Since commit https://github.com/odoo/odoo/commit/beaa30a3d1843de43a45f419bfbc1bfa7613a920 the object `account.invoice` has been removed. We now refer to `account.move` when talking about invoices. In website_sale_digital, a piece of code was still refering to the field `invoice_id` in `account.move.line` instead of using `move_id`. - Fixing some missing adaptation after the account refactoring closes odoo/odoo#35630 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/views/report_payment_receipt_templates.xml4
-rw-r--r--addons/l10n_be_invoice_bba/data/mail_template_data.xml2
-rw-r--r--addons/sale/views/sale_portal_templates.xml2
-rw-r--r--addons/website_sale_digital/controllers/main.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/addons/account/views/report_payment_receipt_templates.xml b/addons/account/views/report_payment_receipt_templates.xml
index 156b88be0ec..3da12afe644 100644
--- a/addons/account/views/report_payment_receipt_templates.xml
+++ b/addons/account/views/report_payment_receipt_templates.xml
@@ -44,10 +44,10 @@
<tbody>
<tr t-foreach="o.reconciled_invoice_ids" t-as="inv">
<td><span t-field="inv.invoice_date"/></td>
- <td><span t-field="inv.number"/></td>
+ <td><span t-field="inv.name"/></td>
<td class="text-right"><span t-field="inv.amount_total"/></td>
<td class="text-right"><span t-esc="o._get_invoice_payment_amount(inv)" t-options="{'widget': 'monetary', 'display_currency': inv.currency_id}"/></td>
- <td class="text-right"><span t-field="inv.residual"/></td>
+ <td class="text-right"><span t-field="inv.amount_residual"/></td>
</tr>
</tbody>
</table>
diff --git a/addons/l10n_be_invoice_bba/data/mail_template_data.xml b/addons/l10n_be_invoice_bba/data/mail_template_data.xml
index 4c8f095d5b3..c528fcd7ec5 100644
--- a/addons/l10n_be_invoice_bba/data/mail_template_data.xml
+++ b/addons/l10n_be_invoice_bba/data/mail_template_data.xml
@@ -11,7 +11,7 @@
% endif
<br /><br />
Here is, in attachment, your
- % if object.number:
+ % if object.name:
invoice <strong>${object.name}</strong>
% else:
invoice
diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml
index 86635a61804..0b273b2038a 100644
--- a/addons/sale/views/sale_portal_templates.xml
+++ b/addons/sale/views/sale_portal_templates.xml
@@ -406,7 +406,7 @@
<div class="d-flex flex-wrap align-items-center justify-content-between">
<div>
<a t-att-href="report_url">
- <span t-esc="i.number"/>
+ <span t-esc="i.name"/>
</a>
<div class="small d-lg-inline-block">Date: <span class="text-muted" t-field="i.invoice_date"/></div>
</div>
diff --git a/addons/website_sale_digital/controllers/main.py b/addons/website_sale_digital/controllers/main.py
index 4b0835f3b9b..717a96bb445 100644
--- a/addons/website_sale_digital/controllers/main.py
+++ b/addons/website_sale_digital/controllers/main.py
@@ -34,7 +34,7 @@ class WebsiteSaleDigital(CustomerPortal):
if not 'sale_order' in response.qcontext:
return response
order = response.qcontext['sale_order']
- invoiced_lines = request.env['account.move.line'].sudo().search([('invoice_id', 'in', order.invoice_ids.ids), ('invoice_id.state', '=', 'paid')])
+ invoiced_lines = request.env['account.move.line'].sudo().search([('move_id', 'in', order.invoice_ids.ids), ('move_id.invoice_payment_state', '=', 'paid')])
products = invoiced_lines.mapped('product_id') | order.order_line.filtered(lambda r: not r.price_subtotal).mapped('product_id')
if not order.amount_total:
# in that case, we should add all download links to the products