[TEST] website_sale_aplicoop: add tests for home_delivery computed field
- New test_home_delivery.py: verifies group.order.home_delivery derives from delivery_product_id (compute), and that sale.order.home_delivery is set correctly through _get_effective_delivery_context - Fix test_save_order_endpoints: replace home_delivery=True (now ignored on computed field) with delivery_product_id to enable delivery - Fix test_phase3_confirm_eskaera: same fix for integration test setUp Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9d614ed79e
commit
a1899483c5
4 changed files with 257 additions and 4 deletions
|
|
@ -694,6 +694,16 @@ class TestConfirmEskaera_Integration(TransactionCase):
|
|||
}
|
||||
)
|
||||
|
||||
# Delivery service product — home_delivery on group.order is computed
|
||||
# from delivery_product_id, so we must set the product to enable delivery.
|
||||
self.delivery_product = self.env["product.product"].create(
|
||||
{
|
||||
"name": "Integration Delivery Svc",
|
||||
"type": "service",
|
||||
"list_price": 0.0,
|
||||
}
|
||||
)
|
||||
|
||||
# Create test group order
|
||||
self.group_order = self.env["group.order"].create(
|
||||
{
|
||||
|
|
@ -704,7 +714,7 @@ class TestConfirmEskaera_Integration(TransactionCase):
|
|||
"end_date": date.today() + timedelta(days=7),
|
||||
"cutoff_day": "3",
|
||||
"pickup_day": "5",
|
||||
"home_delivery": True,
|
||||
"delivery_product_id": self.delivery_product.id,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue