Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
5856 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona

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

Risposta migliore

Thanks for sharing the soulution Julien

Avatar
Abbandona
Risposta migliore

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
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
2
mag 19
2982
1
nov 20
5312
2
ott 20
3704
2
ott 19
8774
0
mar 24
1690