From 0a0cf5a0186eeac37218cbe965a2f61203cea75b Mon Sep 17 00:00:00 2001 From: snt Date: Mon, 16 Feb 2026 23:09:36 +0100 Subject: [PATCH] [FIX] website_sale_aplicoop: Replace or operators with t-set safe variables in QWeb template The eskaera_shop_products template was using 'or' operators directly in t-attf-* attributes, which causes QWeb parsing issues when values are None. Solution: Pre-compute safe variable values using t-set before the form element - safe_display_price: Handles None values for display_price, falls back to product.list_price, then 0 - safe_uom_category: Safely checks product.uom_id and category_id chain before accessing name This pattern is more QWeb-compatible and avoids inline operator evaluation issues that were causing "TypeError: 'NoneType' object is not callable" errors. Tested: Template loads successfully, safe variables render correctly. --- website_sale_aplicoop/views/website_templates.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/website_sale_aplicoop/views/website_templates.xml b/website_sale_aplicoop/views/website_templates.xml index 8719540..9e541e7 100644 --- a/website_sale_aplicoop/views/website_templates.xml +++ b/website_sale_aplicoop/views/website_templates.xml @@ -1211,13 +1211,21 @@

+ +