From a59260d828919a59cfe4d9c3780bf7903db43e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 3 Dec 2024 10:27:21 +0100 Subject: [PATCH] [IMP] test_base_import_pdf_by_template: Set auto_detect_pattern --- .../demo/base_import_pdf_template.xml | 2 +- test_base_import_pdf_by_template/hooks.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/test_base_import_pdf_by_template/demo/base_import_pdf_template.xml b/test_base_import_pdf_by_template/demo/base_import_pdf_template.xml index 8d933e7429..2a053fcdaf 100644 --- a/test_base_import_pdf_by_template/demo/base_import_pdf_template.xml +++ b/test_base_import_pdf_by_template/demo/base_import_pdf_template.xml @@ -65,7 +65,7 @@ Purchase Orders Decathlon - + (ESA79935607) Referencia,Cantidad,Precio diff --git a/test_base_import_pdf_by_template/hooks.py b/test_base_import_pdf_by_template/hooks.py index 7cde6a0c3c..404080a2ba 100644 --- a/test_base_import_pdf_by_template/hooks.py +++ b/test_base_import_pdf_by_template/hooks.py @@ -5,9 +5,6 @@ def post_init_hook(env): # Template changes generic_product = env.ref("test_base_import_pdf_by_template.generic_product") - template_po_decathlon = env.ref("test_base_import_pdf_by_template.po_decathlon") - template_po_decathlon.write({"auto_detect_pattern": r"(?<=ESA79935607)[\S\s]*"}) - product_model_name = "product.product" env.ref("test_base_import_pdf_by_template.po_decathlon_line_product_id").write( - {"default_value": f"{product_model_name},{generic_product.id}"} + {"default_value": f"product.product,{generic_product.id}"} )