16.0 backport einvoice address - #1379
Open
njeudy wants to merge 2 commits into
Open
Conversation
…ess (BT-34/BT-49) Backport of the 18.0 xpaths reading URIUniversalCommunication/URIID with schemeID 0225 on both trade parties. l10n_fr_einvoicing_import relies on parsed_inv[...]['einvoice_address'] to fill the directory line fields on the imported vendor bill and to route it to the purchase journal bound to the company directory line; without them the whole routing is a no-op.
Backport of the second commit of OCA#1354: xml_root.nsmap carries a None key when the Factur-X file declares a default namespace, which makes every xpath lookup fail. Ask factur-x for the namespace map of the detected flavor instead.
Contributor
|
Hi @alexis-via, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #1354 to 16.0 (both commits, no other change).
Parse the electronic address of both trade parties, read from
URIUniversalCommunication/URIID[@schemeID='0225'], intoparsed_inv['partner']['einvoice_address'](seller) andparsed_inv['company']['einvoice_address'](buyer).This is what the French e-invoicing reform needs on incoming bills: the
buyer address identifies the directory line the invoice was sent to,
which is how the receiver binds the bill to a company directory line and
routes it to the right purchase journal. Without it that whole routing is
a silent no-op.
The second commit is required for the first one to work on real-world
files:
xml_root.nsmapcarries aNonekey when the Factur-X filedeclares a default namespace, which makes every xpath lookup fail. The
namespace map is now asked to factur-x for the detected flavor.
Tested on a 16.0 database with the Akretion
fr-einvoicingstackbackported to 16.0: the same Factur-X file imported on 16.0 and on an
18.0 reference gives the same vendor bill, field for field, including the
purchase journal bound to the company directory line.