Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] grap_account_invoice_invoice2data_templates: odoo_fermente: allow Unit name with '.' #79

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fields:
parser: lines
start: Code +Description
end: TVA intracommunautaire
line: ^ *(?P<product_code>\w+-\d+) +(?P<product_name>.*) +(?P<quantity>\d+\.\d+) +(?P<unit_name>[\d+]?[ ]*\w+) +(?P<price_unit>\d+\.\d+) +(?P<discount>\d+\.\d+ +)?(?P<vat_code>\d+\.\d+)% +(?P<price_subtotal>\d+\.\d+)
line: ^ *(?P<product_code>\w+-\d+) +(?P<product_name>.*) +(?P<quantity>\d+\.\d+) +(?P<unit_name>(\d+(\.\d+)?)?[ ]*\w+) +(?P<price_unit>\d+\.\d+) +(?P<discount>\d+\.\d+ +)?(?P<vat_code>\d+\.\d+)% +(?P<price_subtotal>\d+\.\d+)
types:
quantity: float
price_unit: float
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,28 @@ def test_odoo_fermente_01(self):
}
],
)

def test_odoo_fermente_02(self):
self._test_supplier_template(
"odoo_fermente__2024-10-24__BES__VT-24-9534.pdf",
line_qty=6,
expected_values={
"issuer": "Activités du réseau",
"date": datetime(day=24, month=10, year=2024),
"date_due": datetime(day=23, month=11, year=2024),
"invoice_number": "VT/24/9534",
"amount_untaxed": 240.42,
"amount": 253.64,
},
expected_lines=[
{
"product_code": "LOG-000127",
"product_name": "Kaki pomme BIO. Sicile",
"vat_code": "5.5",
"quantity": 2.00,
"price_unit": 14.56,
"discount": 0.0,
"price_subtotal": 29.12,
}
],
)
Loading