Skip to content

Commit 7141906

Browse files
committed
[FIX] fitness: prevent error on opening pricing
Currently, an error occurs when the user opens the pricing page after installing the fitness module. Steps to replicate: * Install fitness * Website > pricing Error: `QwebError: Error while rendering the template: KeyError: 'fitness' Template: fitness.pricing-1 Reference: 3772 Path: /t/t/div/div[2]/section/div/div/div[1]/div/div[2]/a Element: <a t-att-href='request.env.ref(fitness.product_product_7).... ` Root cause: * This error appeared after PR [1], likely because the XML reference wasn’t a string. It should be written like in [2]. Solution: * Use a properly formatted string reference. [1]: #965 [2]: https://github.com/odoo/industry/blob/9ed468d9398dd4eab49e9549357f72e329b80b58/yoga_pilates/demo/website_view.xml#L383 sentry-6955738430 closes #1261 X-original-commit: 6b45d79 Signed-off-by: Vallaeys Valentin (vava) <[email protected]> Signed-off-by: Anshik Gopalbhai Brahmbhatt (agbr) <[email protected]>
1 parent 9ed468d commit 7141906

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fitness/demo/website_view.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
</ul>
269269
<div class="card-footer">
270270
<p>30-day trial, satisfaction guaranteed.</p>
271-
<a t-att-href="request.env.ref(fitness.product_product_7).website_url" class="btn btn-primary" data-bs-original-title="">Order now</a>
271+
<a t-att-href="request.env.ref('fitness.product_product_7').website_url" class="btn btn-primary" data-bs-original-title="">Order now</a>
272272
</div>
273273
</div>
274274
</div>
@@ -293,7 +293,7 @@
293293
</ul>
294294
<div class="card-footer">
295295
<p>30-day trial, satisfaction guaranteed.</p>
296-
<a t-att-href="request.env.ref(fitness.product_product_8).website_url" class="btn btn-primary" data-bs-original-title="">Start now</a>
296+
<a t-att-href="request.env.ref('fitness.product_product_8').website_url" class="btn btn-primary" data-bs-original-title="">Start now</a>
297297
</div>
298298
</div>
299299
</div>
@@ -320,7 +320,7 @@
320320
</ul>
321321
<div class="card-footer">
322322
<p>30-day trial, satisfaction guaranteed.</p>
323-
<a t-att-href="request.env.ref(fitness.product_product_9).website_url" class="btn btn-primary" data-bs-original-title="">Join Us Now</a>
323+
<a t-att-href="request.env.ref('fitness.product_product_9').website_url" class="btn btn-primary" data-bs-original-title="">Join Us Now</a>
324324
</div>
325325
</div>
326326
</div>

0 commit comments

Comments
 (0)