Skip to content

16.0 backport einvoice address - #1379

Open
njeudy wants to merge 2 commits into
OCA:16.0from
Alusage:16.0-backport-einvoice-address
Open

16.0 backport einvoice address#1379
njeudy wants to merge 2 commits into
OCA:16.0from
Alusage:16.0-backport-einvoice-address

Conversation

@njeudy

@njeudy njeudy commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

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'], into
parsed_inv['partner']['einvoice_address'] (seller) and
parsed_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.nsmap carries a None key when the Factur-X file
declares 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-einvoicing stack
backported 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.

njeudy added 2 commits July 29, 2026 14:09
…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.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot added series:16.0 mod:account_invoice_import_facturx Module account_invoice_import_facturx labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:account_invoice_import_facturx Module account_invoice_import_facturx series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants