Skip to content

Commit

Permalink
[FIX] test_base_import_pdf_by_template: Improve pattern
Browse files Browse the repository at this point in the history
Related to pypdf 5.1.0 and line breaks

https://pypdf.readthedocs.io/en/latest/meta/CHANGELOG.html
  • Loading branch information
victoralmau committed Dec 3, 2024
1 parent 4dac712 commit afaa240
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,17 @@
<field name="related_model">lines</field>
<field name="field_id" ref="account.field_account_move_line__quantity" />
<field name="column">1</field>
<field name="pattern">(^\d{1,3}\n)[0-9]{1,2}</field>
<field name="pattern">\[[A-Z\d]+[_|-][A-Z\d]+\] [a-zA-Záí]* ([0-9]{1,3})</field>
<field name="value_type">variable</field>
</record>
<record id="invoice_tecnativa_price_unit" model="base.import.pdf.template.line">
<field name="template_id" ref="invoice_tecnativa" />
<field name="related_model">lines</field>
<field name="field_id" ref="account.field_account_move_line__price_unit" />
<field name="column">2</field>
<field name="pattern">(^\d{1,3}\.(?!00)\d{2}\n)</field>
<field
name="pattern"
>\[[A-Z\d]+[_|-][A-Z\d]+\] [a-zA-Záí]* [0-9]{1,3} ([0-9]{1,3}.[0-9]{2})</field>
<field name="value_type">variable</field>
<field name="log_distinct_value" eval="True" />
</record>
Expand Down

0 comments on commit afaa240

Please sign in to comment.