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

Hello,

During Checking Qweb change for v10 come across below issue.

<t t-set="r_name" t-value="dynamic value from field"/>

If i check with t-if tag it work

<t t-if="r_name == condition "/>

But if I want to call the dynamic template which set in variable r_name than it will give below error.

<t t-call="{ r_name }"/>


Note :- Above code work fine in v9. After check in detail come to know that in v9 before t-call it will parse the variable value and than call but in v10 it just pass as it is. It is issue in v10 Qweb?



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

In Odoo 10 there is no evaluation of the t-call template value since the qweb engine for rendering the templates in this new version were rewrited and now are compiled to speed up and the current implementation is using the t-call value as string

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

what all are the changes in odoo 10 qweb which affecting odoo 9 qweb code

You need to read the release notes to know all the changes, theres a mail in the odoo community with all the release notes that it's used for odoo 10 release

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

Is there any workaround for this issue? We really need dynamic calls in templates in our module.

(sorry for posting this as an answer, don't have enough karma to comment)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 1 24
1631
0
thg 1 24
1326
0
thg 2 22
2492
2
thg 1 21
6359
2
thg 3 20
5304