Skip to content

Commit 7e2227b

Browse files
committed
[IMP] *: Remove the old syntax of t-call
Applying the script `/odoo/upgrade_code/19.0-00-t-call.py`. see: odoo/odoo#235469
1 parent 1e69f20 commit 7e2227b

File tree

2 files changed

+32
-43
lines changed

2 files changed

+32
-43
lines changed

theme_artists/views/snippets/s_product_catalog.xml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,37 @@
2121
<!-- List -->
2222
<xpath expr="//div[hasclass('col-lg-6')]/ul[hasclass('list-unstyled')]" position="replace">
2323
<ul class="list-unstyled my-3">
24-
<t t-call="website.s_product_catalog_dish">
25-
<t t-set="name">New York</t>
26-
<t t-set="price">02.08.2025</t>
27-
<t t-set="description">The Museum of Modern Art (MoMA)</t>
28-
</t>
29-
<t t-call="website.s_product_catalog_dish">
30-
<t t-set="name">Paris</t>
31-
<t t-set="price">09.09.2025</t>
32-
<t t-set="description">Digital Art Paris</t>
33-
</t>
34-
<t t-call="website.s_product_catalog_dish">
35-
<t t-set="name">Brussels</t>
36-
<t t-set="price">12.11.2025</t>
37-
<t t-set="description">Royal Museums of Fine Arts of Belgium</t>
38-
</t>
24+
<t t-call="website.s_product_catalog_dish"
25+
name.translate="New York"
26+
price.translate="02.08.2025"
27+
description.translate="The Museum of Modern Art (MoMA)"/>
28+
<t t-call="website.s_product_catalog_dish"
29+
name.translate="Paris"
30+
price.translate="09.09.2025"
31+
description.translate="Digital Art Paris"/>
32+
<t t-call="website.s_product_catalog_dish"
33+
name.translate="Brussels"
34+
price.translate="12.11.2025"
35+
description.translate="Royal Museums of Fine Arts of Belgium"/>
3936
</ul>
4037
</xpath>
4138
<!-- Title -->
4239
<xpath expr="//div[hasclass('col-lg-6')][2]/h3[hasclass('h4-fs')]" position="replace"/>
4340
<!-- List -->
4441
<xpath expr="//div[hasclass('col-lg-6')][2]/ul[hasclass('list-unstyled')]" position="replace">
4542
<ul class="list-unstyled my-3">
46-
<t t-call="website.s_product_catalog_dish">
47-
<t t-set="name">Amsterdam</t>
48-
<t t-set="price">02.08.2025</t>
49-
<t t-set="description">Comput'Art</t>
50-
</t>
51-
<t t-call="website.s_product_catalog_dish">
52-
<t t-set="name">Berlin</t>
53-
<t t-set="price">12.12.2025</t>
54-
<t t-set="description">Berlin Art Week</t>
55-
</t>
56-
<t t-call="website.s_product_catalog_dish">
57-
<t t-set="name">London</t>
58-
<t t-set="price">03.01.2026</t>
59-
<t t-set="description">Abstract Vision</t>
60-
</t>
43+
<t t-call="website.s_product_catalog_dish"
44+
name.translate="Amsterdam"
45+
price.translate="02.08.2025"
46+
description.translate="Comput'Art"/>
47+
<t t-call="website.s_product_catalog_dish"
48+
name.translate="Berlin"
49+
price.translate="12.12.2025"
50+
description.translate="Berlin Art Week"/>
51+
<t t-call="website.s_product_catalog_dish"
52+
name.translate="London"
53+
price.translate="03.01.2026"
54+
description.translate="Abstract Vision"/>
6155
</ul>
6256
</xpath>
6357
</template>

theme_test_custo/views/header.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,17 @@
1010
<t t-call="website.navbar_nav">
1111
<!-- Menu -->
1212
<t t-foreach="website.menu_id.child_id" t-as="submenu">
13-
<t t-call="website.submenu">
14-
<t t-set="item_class" t-valuef="nav-item"/>
15-
<t t-set="link_class" t-valuef="nav-link"/>
16-
</t>
13+
<t t-call="website.submenu" item_class.f="nav-item" link_class.f="nav-link"/>
1714
</t>
1815
<!-- Sign In -->
19-
<t t-call="portal.placeholder_user_sign_in">
20-
<t t-set="_item_class" t-valuef="nav-item"/>
21-
<t t-set="_link_class" t-valuef="nav-link text-900"/>
22-
</t>
16+
<t t-call="portal.placeholder_user_sign_in"
17+
_item_class.f="nav-item"
18+
_link_class.f="nav-link text-900"/>
2319
<!-- User Dropdown -->
24-
<t t-call="portal.user_dropdown">
25-
<t t-set="_user_name" t-value="true"/>
26-
<t t-set="_item_class" t-valuef="nav-item dropdown ml-auto"/>
27-
<t t-set="_link_class" t-valuef="nav-link text-900"/>
28-
</t>
20+
<t t-call="portal.user_dropdown"
21+
_user_name="true"
22+
_item_class.f="nav-item dropdown ml-auto"
23+
_link_class.f="nav-link text-900"/>
2924
</t>
3025
</div>
3126
</nav>

0 commit comments

Comments
 (0)