The _prepare_edi_vals_to_export functions on account.move and
account.move.line must be moved to account from account_edi.
Account_edi_ubl_cii does not depend on account_edi anymore,
and needs them.
closesodoo/odoo#131801
Signed-off-by: Josse Colpaert <jco@odoo.com>
Since the dependency to account_edi has been removed from l10n_mx_edi
and knowing we plan to remove completely the account_edi module and
since it's the single localization needing an EDI on payments, all this
code can be removed.
Task: 3069324
Part-of: odoo/odoo#128395
PURPOSE
Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.
SPECIFICATIONS
Account_edi and various l10n submodules hold some custom code to generate and
handle EDI attachments. It is used to add attachments linked using AccountMove
specific 'edi_document_ids' field when sending emails based on templates.
Currently MailTemplate is overridden in accounting modules to hold code related
to AccountMove and AccountEdiDocument attachments manipulation. This is linked
to EDI and report naming, not mail specific. This should therefore not be
implemented at template level, but in those specific models.
For that purpose we introduce a method in MailThread that allow to handle
attachments when being in a template context. An override in account_edi
allows to implement its specific behavior.
By the way an old docstring in l10n_it_edi that was quite unrelated to the
override is also removed, as it was more confusing than helping.
Task-2792146 (Mail: Move model-dependent code from composer / template)
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106658
The xml we generate for factur-x is no longer compliant with all
the latest standards. With these changes, we are providing the tools
to make it work once again and make sure it is validated by the
factur-x and zugferd validators in all aspect (PDFA/3, XMP, XML)
It should also be valid to be sent to Chorus pro if applicable.
This adds a mapping to the UNECE unit of measure codes for uom, that
are required for factur-x.
It will also calculate a category for each taxes as such:
- If the tax is an export from EU to outside EU, G.
- If the supplier and customer are both in EU but different country,
K
- If both are in EU, in the same country but the tax amount is 0, E
- Otherwise, it will be S.
See https://unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5305.htm
opw-2714544
closesodoo/odoo#90105
X-original-commit: e1bfb363bccd7b84f660d1e6c5b1e4d4fe02d398
Signed-off-by: Laurent Smet <las@odoo.com>
Added edi.documents representing an electronic document for a move and an edi.format.
A format can be asynchronous if it needs to call a web-service to generate the document, it will then be generated by the CRON (otherwise it's generated in post).
The formats can support payments if needed (can be generated immediately or by the CRON).
Added support for errors and related views.
Setting defaults format on a journal can be done automatically (based on a hook).
Added tests : xml comparaison with diff and helpers to test a EDI import/export
--task: 2247368
- account_edi is the base module to manage EDIs. It manages the generic worflow of import/export and defines the methods for import/export that should be overridden by each types of EDI (in different modules).
- On export, the files are added as attachment and can be embeded into pdf (format specific).
- On export, the exported format are set on the journal to allow different settings based on journal (different companies, countries, etc).
- On import, depending on the import method (from message_post or upload button in invoice tree view) a new invoice is created or an existing one is updated (only allowed draft invoices with no invoice lines).
- Adapted factur-x