[FIX] Resolver 3 fallos de tests en website_sale_aplicoop
- Fix: delivery product price now includes VAT (homepage/checkout) * Added _get_delivery_product_display_price() helper to use same pricing pipeline as regular products * Uses pricelist + tax calculations instead of bare list_price * Fallback chain: pricelist → bare list_price → default 5.74 * Updated context in eskaera_shop() and eskaera_checkout() - Test: test_constraint_cutoff_before_pickup_invalid * Constraint removed: now allows any combination of cutoff_day and pickup_day * Updated test to reflect this change (no ValidationError expected) - Test: test_day_names_not_using_inline_underscore * Fixed to check sub-template eskaera_order_card_meta where day_names is actually used * eskaera_page calls this sub-template so day_names context is inherited Results: 128 tests - 0 failed, 0 errors (100% pass rate)
This commit is contained in:
parent
5efe57dc19
commit
89c008441e
13 changed files with 1354 additions and 58 deletions
|
|
@ -102,13 +102,16 @@ class TestTemplatesRendering(TransactionCase):
|
|||
- day_names MUST be passed from controller context
|
||||
- day_names MUST NOT be defined with _() inside t-value attributes
|
||||
- Templates use day_names[index] from context, not t-set with _()
|
||||
|
||||
Note: day_names can be used in called sub-templates (t-call), not just the main template.
|
||||
We verify the sub-template that actually uses day_names (eskaera_order_card_meta).
|
||||
"""
|
||||
template = self.env.ref("website_sale_aplicoop.eskaera_page")
|
||||
# Read the template source to verify it doesn't have inline _() in t-value
|
||||
# Verify that the sub-template that uses day_names is properly structured
|
||||
template = self.env.ref("website_sale_aplicoop.eskaera_order_card_meta")
|
||||
self.assertIn(
|
||||
"day_names",
|
||||
template.arch_db,
|
||||
"Template must reference day_names from context",
|
||||
"Sub-template eskaera_order_card_meta must reference day_names from context",
|
||||
)
|
||||
# The fix ensures no <t t-set="day_names" t-value="[_(...)]"/> exists
|
||||
# which was causing the NoneType error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue