Skip to content

Commit

Permalink
[BOT] post-merge updates
Browse files Browse the repository at this point in the history
  • Loading branch information
OCA-git-bot committed Dec 24, 2024
1 parent 0784049 commit 4b32eeb
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 130 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ addon | version | maintainers | summary
[base_business_document_import](base_business_document_import/) | 17.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Provides technical tools to import sale orders or supplier invoices
[base_edi](base_edi/) | 17.0.1.1.0 | [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) | Base module to aggregate EDI features.
[base_facturx](base_facturx/) | 17.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Base module for Factur-X/ZUGFeRD
[base_import_pdf_by_template](base_import_pdf_by_template/) | 17.0.1.2.0 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Base Import Pdf by Template
[base_import_pdf_by_template](base_import_pdf_by_template/) | 17.0.1.2.1 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Base Import Pdf by Template
[base_import_pdf_by_template_account](base_import_pdf_by_template_account/) | 17.0.1.0.1 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Base Import Pdf by Template Account
[edi_voxel_account_invoice_oca](edi_voxel_account_invoice_oca/) | 17.0.1.0.0 | | Sends account invoices to Voxel.
[edi_voxel_oca](edi_voxel_oca/) | 17.0.1.0.1 | | Base module for connecting with Voxel
[pdf_helper](pdf_helper/) | 17.0.1.0.1 | [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Provides helpers to work w/ PDFs
[test_base_import_pdf_by_template](test_base_import_pdf_by_template/) | 17.0.1.1.1 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Test Base Import Pdf by Template
[test_base_import_pdf_by_template](test_base_import_pdf_by_template/) | 17.0.1.1.2 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Test Base Import Pdf by Template

[//]: # (end addons)

Expand Down
167 changes: 83 additions & 84 deletions base_import_pdf_by_template/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Base Import Pdf by Template
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0796ad617b1a274d5219600f57040a70fb99c0e89966b090f634353277e0a935
!! source digest: sha256:8addcfd64553fce37ad3fea33318c4a2dda987b703f8bbb837fb29ac3106d7b2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -52,59 +52,58 @@ is to have the document defined with a specific structure.
Fields to consider completing on template:

- Main Model: model on which the record will be generated.
Example: purchase.order
- Child field: One2many field that will create records from
selected template. Example: Order Lines (purchase.order)
- Auto detect pattern: Define a characteristic pattern of the
document so that it recognizes that it corresponds to the
template we are creating. Need to use regular expression.
Example: (?<=ESA79935607)[Ss]\*
- Header Items: Complete this field if the template has a header
table to extract information lines. Example:
Reference,Quantity,Price
- Company: Set the company that will use the template. If it is
empty, template will apply for all companies set on the
environment.
- Main Model: model on which the record will be generated.
Example: purchase.order
- Child field: One2many field that will create records from
selected template. Example: Order Lines (purchase.order)
- Auto detect pattern: Define a characteristic pattern of the
document so that it recognizes that it corresponds to the
template we are creating. Need to use regular expression.
Example: (?<=ESA79935607)[Ss]\*
- Header Items: Complete this field if the template has a header
table to extract information lines. Example:
Reference,Quantity,Price
- Company: Set the company that will use the template. If it is
empty, template will apply for all companies set on the
environment.

1. Add new lines.

..
- Related model: When adding new line, the section where to locate
the data; "header" which, as its name indicates, refers to the
header of the document and "lines" refers to the structure of
lines or table of the document.
- Related model: When adding new line, the section where to locate
the data; "header" which, as its name indicates, refers to the
header of the document and "lines" refers to the structure of lines
or table of the document.

- Field: Map the field to be completed. Example: product
- Field: Map the field to be completed. Example: product

- Pattern: Optional field to complete. Define pattern of the
document so that it recognizes the place to get the field selected
on PDF template. Need to use regular expression. Example:
([0-9]{7}) [0-7]{1}
- Pattern: Optional field to complete. Define pattern of the document
so that it recognizes the place to get the field selected on PDF
template. Need to use regular expression. Example: ([0-9]{7})
[0-7]{1}

- Value type:
- Value type:

- Fixed: Select this value, if the field mapped will always have
an specific value and not extract the information from
template. In this case Pattern field must be empty.
- Variable: Select variable to get the information from template.
In this case, Pattern field must be completed.
- Fixed: Select this value, if the field mapped will always have an
specific value and not extract the information from template. In
this case Pattern field must be empty.
- Variable: Select variable to get the information from template.
In this case, Pattern field must be completed.

- For Value type "Variable" will appear extra fields to complete:
- For Value type "Variable" will appear extra fields to complete:

- Search value: Indicates the field by which the value obtained in
the PDF will be searched on the system.
- Search value: Indicates the field by which the value obtained in
the PDF will be searched on the system.

- Default value: If the search result is empty for the search value
option, you can set default value to create a record and not
getting error message.
- Default value: If the search result is empty for the search value
option, you can set default value to create a record and not
getting error message.

- Log distint value?: This option is useful when getting prices in
order to compare prices inside system and prices obtained from
PDF. This will create lines with prices obtained from the system
but create log on chatter to see the differences obtained from
PDF.
- Log distint value?: This option is useful when getting prices in
order to compare prices inside system and prices obtained from PDF.
This will create lines with prices obtained from the system but
create log on chatter to see the differences obtained from PDF.

Check demo data to further information.

Expand All @@ -121,49 +120,49 @@ document structure.
Known issues / Roadmap
======================

- Add operator in template lines (= or ilike)
- Simplify auto-detection (defining a text only to search the system
should search the corresponding regular expression).
- Allow compatibility with registration process created from email
alias (for purchase order for example).
- Remove error if some file is not auto-detected template, options:
boolean (default option according to system parameter) to omit error
for not found files or change process to 2 steps, auto-detect and
show lines (each one with respect to a file) with template applied
(similar to dms_auto_classification).
- Create test_base_import_pdf_simple module with sale, purchase and
account dependencies to leave templates created in runboat and tests
more useful for testers.
- Display a more readable error if there is an error in Preview
process, example: wrong pattern. Message: "Please check template
defined, some items are not correctly set".
- Add a progress bar (widget=“gauge”) in the import wizard process,
useful if we import for example sales orders with 20 lines and thus
know the progress.
- Add operator in template lines (= or ilike)
- Simplify auto-detection (defining a text only to search the system
should search the corresponding regular expression).
- Allow compatibility with registration process created from email alias
(for purchase order for example).
- Remove error if some file is not auto-detected template, options:
boolean (default option according to system parameter) to omit error
for not found files or change process to 2 steps, auto-detect and show
lines (each one with respect to a file) with template applied (similar
to dms_auto_classification).
- Create test_base_import_pdf_simple module with sale, purchase and
account dependencies to leave templates created in runboat and tests
more useful for testers.
- Display a more readable error if there is an error in Preview process,
example: wrong pattern. Message: "Please check template defined, some
items are not correctly set".
- Add a progress bar (widget=“gauge”) in the import wizard process,
useful if we import for example sales orders with 20 lines and thus
know the progress.

Compatibility with csv, xls, etc:

- Separate much of the logic to new module base_import_simple that
would contain the logic of templates, type of files (csv, excel, etc)
in the templates and wizard and this module would depend on the other
adding only what relates to PDF.
- The base module should take into account for each template whether
each line is a new record or not, and start line (in case you want to
omit any), only page 1 would be imported.
- The preview smart-btton would serve exactly the same purpose.
- In the case of csv and Excel that each record is a line, the document
will NOT be attached to the record.
- If you indicate that each record is a line the column will be the
key, otherwise you must specify to which line each line of the
template refers.
- In the case of csv it will try to auto-detect the lines and columns
(no need to complicate delimiters configuration).
- The menu "Import PDF" of the favorite menu would become "Import
file", and the allowed file extensions would be those obtained from a
method (it would be extended by other modules that add other formats
such as PDF).
- Add queue_job_base_import_simple module to process everything by
queues (example: Excel with hundreds of lines, each one a record).
- Separate much of the logic to new module base_import_simple that would
contain the logic of templates, type of files (csv, excel, etc) in the
templates and wizard and this module would depend on the other adding
only what relates to PDF.
- The base module should take into account for each template whether
each line is a new record or not, and start line (in case you want to
omit any), only page 1 would be imported.
- The preview smart-btton would serve exactly the same purpose.
- In the case of csv and Excel that each record is a line, the document
will NOT be attached to the record.
- If you indicate that each record is a line the column will be the key,
otherwise you must specify to which line each line of the template
refers.
- In the case of csv it will try to auto-detect the lines and columns
(no need to complicate delimiters configuration).
- The menu "Import PDF" of the favorite menu would become "Import file",
and the allowed file extensions would be those obtained from a method
(it would be extended by other modules that add other formats such as
PDF).
- Add queue_job_base_import_simple module to process everything by
queues (example: Excel with hundreds of lines, each one a record).

Bug Tracker
===========
Expand All @@ -186,10 +185,10 @@ Authors
Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:
- `Tecnativa <https://www.tecnativa.com>`__:

- Víctor Martínez
- Pedro M. Baeza
- Víctor Martínez
- Pedro M. Baeza

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion base_import_pdf_by_template/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Base Import Pdf by Template",
"version": "17.0.1.2.0",
"version": "17.0.1.2.1",
"website": "https://github.com/OCA/edi",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
Loading

0 comments on commit 4b32eeb

Please sign in to comment.