Skip to Content
Menu
This question has been flagged
3 Replies
4485 Views

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
Discard
Author Best Answer

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
Discard

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

Best Answer

Thanks for sharing the soulution Julien

Avatar
Discard
Best Answer

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
Discard
Author

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

Related Posts Replies Views Activity
2
May 19
2187
1
Nov 20
3893
2
Oct 20
2769
2
Oct 19
7767
0
Mar 24
340