From 3b94df0e91b96b95f4541acc4889e0011b6cdd10 Mon Sep 17 00:00:00 2001 From: eduezerouali-tecnativa Date: Thu, 19 Feb 2026 18:44:42 +0100 Subject: [PATCH] [FIX] website_sale_cart_expire: fix test payment_method_id --- .../tests/test_website_sale_cart_expire.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website_sale_cart_expire/tests/test_website_sale_cart_expire.py b/website_sale_cart_expire/tests/test_website_sale_cart_expire.py index a5ec78bc35..b211ee8a92 100644 --- a/website_sale_cart_expire/tests/test_website_sale_cart_expire.py +++ b/website_sale_cart_expire/tests/test_website_sale_cart_expire.py @@ -30,6 +30,9 @@ def setUpClass(cls): # Set to draft and assign all to website_2 # (this also updates write_date to now()) cls.orders.write({"state": "draft", "website_id": cls.website_2.id}) + cls.payment_method = cls.env["payment.method"].create( + {"name": "Test_method", "code": "123"} + ) def _create_payment_transaction(self, order): self.tx_counter += 1 @@ -50,6 +53,7 @@ def _create_payment_transaction(self, order): "partner_id": order.partner_id.id, "operation": "online_direct", "sale_order_ids": [fields.Command.set([order.id])], + "payment_method_id": self.payment_method.id, } )