From 12e642f2982dbc2f8a2e6536a0e012bfe0a6803c Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Tue, 23 Jul 2024 17:07:25 +0200 Subject: [PATCH] [REM] supplier : Paume de pain --- .../readme/DESCRIPTION.rst | 1 - .../readme/ROADMAP.rst | 5 ++ .../templates/paume_de_pain.yml | 51 ------------------- .../tests/__init__.py | 1 - .../tests/test_paume_de_pain.py | 32 ------------ 5 files changed, 5 insertions(+), 85 deletions(-) delete mode 100644 grap_account_invoice_invoice2data_templates/templates/paume_de_pain.yml delete mode 100644 grap_account_invoice_invoice2data_templates/tests/test_paume_de_pain.py diff --git a/grap_account_invoice_invoice2data_templates/readme/DESCRIPTION.rst b/grap_account_invoice_invoice2data_templates/readme/DESCRIPTION.rst index baa2f74..721d353 100644 --- a/grap_account_invoice_invoice2data_templates/readme/DESCRIPTION.rst +++ b/grap_account_invoice_invoice2data_templates/readme/DESCRIPTION.rst @@ -26,7 +26,6 @@ This module contains invoice2data templates for GRAP company. - Jean Hervé - Markal - Papilles Sauvages -- Paume de Pain - Pural - Relais Local - Relais Vert diff --git a/grap_account_invoice_invoice2data_templates/readme/ROADMAP.rst b/grap_account_invoice_invoice2data_templates/readme/ROADMAP.rst index 48193da..8b279fa 100644 --- a/grap_account_invoice_invoice2data_templates/readme/ROADMAP.rst +++ b/grap_account_invoice_invoice2data_templates/readme/ROADMAP.rst @@ -12,6 +12,11 @@ * Facture avec des TVA manquantes. (Compliqué de parser un tableau avec un champ obligatoire qui n'est pas tout le temps mis.) +* Paume de Pain : + * Prédédemment réalisé, voir : https://github.com/grap/grap-odoo-business-supplier-invoice/pull/67 + * Le template a changé. + * Facture reprenant plusieurs BL. + * Pronatura : * Pas de code produit. * Certains lignes de PO génère 2 lignes de factures. diff --git a/grap_account_invoice_invoice2data_templates/templates/paume_de_pain.yml b/grap_account_invoice_invoice2data_templates/templates/paume_de_pain.yml deleted file mode 100644 index d37a27c..0000000 --- a/grap_account_invoice_invoice2data_templates/templates/paume_de_pain.yml +++ /dev/null @@ -1,51 +0,0 @@ -issuer: Paume de Pain - -keywords: - - "FR 82 817 759 558" - -fields: - vat: - parser: static - value: "FR82817759558" - amount: - parser: regex - type: float - regex: Total TTC +(\d+\.\d+) - amount_untaxed: - parser: regex - type: float - regex: Total HT +(\d+\.\d+) - invoice_number: - parser: regex - regex: N° (FAC-\w+) - date: - parser: regex - type: date - regex: FAC-\w+\n +(\d{2}\/\d{2}\/\d{4}) - date_due: - parser: regex - type: date - regex: Émis le (\d{2}\/\d{2}\/\d{4}) - vat_code_055: - parser: static - value: "5.5%" - lines: - parser: lines - start: Désignation - end: Total HT - line: ^ +(?P\w+-\d+) +(?P.*) +(?P5.5%) +(?P\d+(\.\d+)?) +(?P\d+\.\d+) € \/\w+ +(?P\d+\.\d+) € - types: - quantity: float - price_unit: float - price_subtotal: float - -options: - currency: EUR - date_formats: - - '%d/%m/%Y' - decimal_separator: '.' - replace: - # Standardize the decimal separator. ('1,24' -> '1.24') - - [',', '.'] - # Remove the thousands separator. ('1 234.56' -> '1234.56') - - ['(\d+) (\d{3}\.\d{2})', '\g<1>\g<2>'] diff --git a/grap_account_invoice_invoice2data_templates/tests/__init__.py b/grap_account_invoice_invoice2data_templates/tests/__init__.py index dcfc9ff..0d3b59a 100644 --- a/grap_account_invoice_invoice2data_templates/tests/__init__.py +++ b/grap_account_invoice_invoice2data_templates/tests/__init__.py @@ -27,7 +27,6 @@ from . import test_jean_herve from . import test_markal from . import test_papilles_sauvages -from . import test_paume_de_pain from . import test_pural from . import test_relais_local from . import test_relais_vert_1 diff --git a/grap_account_invoice_invoice2data_templates/tests/test_paume_de_pain.py b/grap_account_invoice_invoice2data_templates/tests/test_paume_de_pain.py deleted file mode 100644 index 0c98399..0000000 --- a/grap_account_invoice_invoice2data_templates/tests/test_paume_de_pain.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop) -# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from datetime import datetime - -from .test_module import TestModule - - -class TestPaumeDePain(TestModule): - def test_paume_de_main_01(self): - self._test_supplier_template( - "paume-de-pain__2023-10-01__FAC-905.pdf", - line_qty=8, - expected_values={ - "issuer": "Paume de Pain", - "date": datetime(day=1, month=10, year=2023), - "date_due": datetime(day=3, month=10, year=2023), - "invoice_number": "FAC-905", - "amount_untaxed": 1291.72, - "amount": 1362.77, - }, - expected_lines=[ - { - "product_code": "ART-008", - "product_name": "Petit épeautre", - "vat_code": "5.5%", - "quantity": 15.5, - "price_unit": 10.34, - "price_subtotal": 160.27, - } - ], - )