Skip to content

Commit

Permalink
[IMP] test_base_import_pdf_by_template: Set auto_detect_pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralmau committed Dec 3, 2024
1 parent d94ffc0 commit a59260d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<field name="name">Purchase Orders Decathlon</field>
<field name="model_id" ref="purchase.model_purchase_order" />
<field name="child_field_id" ref="purchase.field_purchase_order__order_line" />
<!-- <field name="auto_detect_pattern">(?<=ESA79935607)[\S\s]*</field> -->
<field name="auto_detect_pattern">(ESA79935607)</field>
<field name="header_items">Referencia,Cantidad,Precio</field>
</record>
<record id="po_decathlon_line_partner_id" model="base.import.pdf.template.line">
Expand Down
5 changes: 1 addition & 4 deletions test_base_import_pdf_by_template/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"}
)

0 comments on commit a59260d

Please sign in to comment.