Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
5882 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

Thanks for sharing the soulution Julien

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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?

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 19
3021
1
thg 11 20
5339
2
thg 10 20
3712
2
thg 10 19
8792
0
thg 3 24
1704