Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
5859 Vues

Hello,

I have been getting this error since I upgraded to Odoo v15 when I try to send & print an invoice:

Failed to render QWeb template : 'account.move' object has no attribute 'invoice_payment_state' Traceback (most recent call last): File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/qweb.py", line 219, in render_template yield from compiled_fn(self, values, log) File "", line 66, in template AttributeError: 'account.move' object has no attribute 'invoice_payment_state' Error when render the template AttributeError: 'account.move' object has no attribute 'invoice_payment_state' Template: Path: /div/div/p/t[7] Node: )

Any idea on how to solve it ?

Thanks.

Avatar
Ignorer
Auteur Meilleure réponse

The problem was due to the Email Template, Invoice:Send by email.

In the template, there was the following line :

t-if="object.invoice_payment_state == 'paid'" data-oe-t-group="3" data-oe-t-selectable="true" data-oe-t-group-active="true" data-oe-t-inline="true"        

I changed, 

object.invoice_payment_state
To,
object.payment_state

And it solved the error I was getting.

Avatar
Ignorer

what is the name of the xml file

Hello Mediserv,

With the developer tools enabled. Go to the technical menu > Email templates and look for "Invoice:Send by email".

Click on the "</>" button to edit the body.

And there you go.

Thanks so much I followed your instructions. everything works fine when payment_mode in subscription template is set to "manual and daft". but when set to "post" when calling generate_recurring_invoice method, it loads for infinity without executing

Meilleure réponse

Thanks for sharing the soulution Julien

Avatar
Ignorer
Meilleure réponse

The error probably results in a similar way as described here:

https://www.odoo.com/forum/help-1/odoo-13-invoice-status-open-163712

Are there still QWeb Views if you take a look under Technical Settings > Views and search for  "invoice_payment_state" under View Architecture?

Avatar
Ignorer
Auteur

Hello Christian,
Thank you for your answer.
There are still QWeb views that exist for invoice_payment_state.
What should I do of it ?

Publications associées Réponses Vues Activité
2
mai 19
2984
1
nov. 20
5314
2
oct. 20
3705
2
oct. 19
8775
0
mars 24
1690