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

[14.0] Add lines management to create multiline invoices #608

Closed
wants to merge 1 commit into from

Conversation

MTantin
Copy link

@MTantin MTantin commented Jun 8, 2022

Multiline invoice creation is not supported yet.

I propose those modifications to accept multiline creation.

Invoice2data library accept format (with parser or not) to extract invoice line by line with regex.
the result is stored in "lines" field as json list.
I iterate over this list to prepare data for account_invoice_import submodule.

@OCA-git-bot
Copy link
Contributor

Hi @alexis-via,
some modules you are maintaining are being modified, check this out!

@MTantin MTantin force-pushed the 14.0 branch 5 times, most recently from 1b85565 to 3730e50 Compare June 14, 2022 09:27
…reate multiline invoices

[14.0][account_invoice_import_invoice2data] Add tests for multiline products management
@bosd
Copy link
Contributor

bosd commented Jul 8, 2022

Thanks for this PR. We're working on the same functionality.
See PR: #573
However, mine does not include tests. Bu thas more doc's and fields.
Would you like to contribute your code to that pr? Or leave a review?

@bosd
Copy link
Contributor

bosd commented Jul 8, 2022

Oops, made the same comment on your previous PR.
Why did you open a new one?

@bosd
Copy link
Contributor

bosd commented Jul 11, 2022

Import is failling as there is no known template found for Gandi.
Can you share your template file?

@MTantin
Copy link
Author

MTantin commented Jul 20, 2022

Here is our template for Gandi's invoices

# -*- coding: utf-8 -*-
issuer: Gandi
fields:
  amount: Total \(EUR\)\s+(-?\d+,?\.?\d+)
  amount_untaxed: Sous-total\s+(-?\d+,?\.?\d+)
  date: Facture\s+n\°\s+(\d{8})
  invoice_number: Facture\s+n\°\s+(\d+)
  vat: TVA ([a-zA-Z]{2}\d+)
  partner_name: Gandi
  siren: SIRET\s+(\d{3}\s*\d{3}\s*\d{3})
  lines:
    parser: lines
    start: Produit\s+Description\s+Propriétaire\s+Taxes\s+Prix
    end: Répartition
    line: (?P<name>.+)\s{2,}(?P<taxes>\d+)%\s{2,}(?P<price_unit>-?\d+,\d+)\s+€
    types:
      price_unit: float
      taxes: float
keywords:
  - Gandi SAS
  - SIRET 423 093 459 00042
options:
  currency: EUR
  date_formats:
      - '%Y%m%d'
  languages:
    - fr
  decimal_separator: ','

@github-actions
Copy link

github-actions bot commented Dec 4, 2022

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 4, 2022
@github-actions github-actions bot closed this Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants