Skip to content

feat(nfe): update schemas to PL_010g v1.03 (NT 2026.006 v1.00, NT 2026.008 v1.00) - #176

Merged
rvalyi merged 4 commits into
masterfrom
nfe-pl_010g_v1_03
Dec 5, 2026
Merged

rvalyi merged 4 commits into
masterfrom
nfe-pl_010g_v1_03

Conversation

@rvalyi

@rvalyi rvalyi commented Nov 4, 2026

Copy link
Copy Markdown
Member

Update the NFe schemas from the Fazenda package nº 010g v1.03 (zip contents PL_010g_v1.03), published 26/10/2026, following NT 2026.006 v1.00 and NT 2026.008 v1.00.

Source: https://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=EQhOQMgipXY=

Changed XSDs: DFeTiposBasicos_v1.00.xsd, leiauteNFe_v4.00.xsd (the other files of the package are byte-identical to the committed ones).

Schema changes:

  • DFeTiposBasicos: the TRBSN simple type is dropped; the RTC groups in TCIBS_NFe no longer offer the gIBSCBS/gIBSCBSMono choice, so gIBSCBS becomes a plain optional element; the new TPgtoVinc type models the payment-link information (gPgto/nPag/idTransacao).
  • leiauteNFe: det/prod gains the optional vUnComLiq/vProdLiq sequence (net value without taxes); the ICMS choice gains ICMSPrevistoPagtoAntecip (vICMSPrevisto); total gains vProdLiqTot; infNFe gains the optional gPgtoVinc group; the NFC-e QR-code patterns are only reordered (no semantic change).

Bindings regenerated with xsdata 25.7, CHANGELOG_SCHEMAS.md records the new package, and the metadata in nfe/bindings/v4_0/__init__.py is refreshed.

Fingerprint baseline: the nfe entry is this package. The cte entry is refreshed too, but it is a false positive — the CT-e page text changed while its 47 committed XSDs are byte-identical to the newest package (PL_CTe_400_NT2026.004 RTC_1.00, republicado 16/10/2026), so no CT-e schema change is needed.

Local: pytest tests → 89 passed, 3 skipped; pre-commit hooks pass.

rvalyi and others added 4 commits December 5, 2026 12:44
Update the NFe schemas from the Fazenda package nº 010g v1.03 (zip contents
PL_010g_v1.03), published 26/10/2026 (ref. NT 2026.006 v1.00 and
NT 2026.008 v1.00).

Source: https://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=EQhOQMgipXY=

Changed schemas: DFeTiposBasicos_v1.00.xsd, leiauteNFe_v4.00.xsd.

Notable schema changes:
- DFeTiposBasicos: the TRBSN simple type is dropped and the RTC groups in
  TCIBS_NFe no longer offer the gIBSCBS/gIBSCBSMono choice, so gIBSCBS becomes
  a plain optional element; the new TPgtoVinc type models the payment-link
  information (gPgto/nPag/idTransacao);
- leiauteNFe: det/prod gains the optional vUnComLiq/vProdLiq sequence (net
  value without taxes), the ICMS choice gains ICMSPrevistoPagtoAntecip
  (vICMSPrevisto), total gains vProdLiqTot, infNFe gains the optional gPgtoVinc
  group, and the NFC-e QR-code patterns are reordered (no semantic change).

Regenerate the bindings with xsdata 25.7 and refresh the fingerprint baseline
(the nfe page change is this package; the cte entry is a page-text only change,
its 47 XSDs are byte-identical to the committed ones).
CHANGELOG_SCHEMAS.md now carries, for the PL_010g package, the date from
which production validates it (production_live_from 2026-12-14, moved from
16/11/2026 by the SVRS notice of 12/11/2026) and whether XML valid under
PL_010f stays valid (additive: true).

additive is read mechanically: the package only drops the unused TRBSN
simple type and the gIBSCBSMono alternative of TTribNFCe, a type the NF-e
layout does not reference (it uses TTribNFe), so no instance of the
previous layout is rejected.

generate_bindings.py parses the two new fields and injects
PRODUCTION_LIVE_FROM, ADDITIVE and NOTES in the binding __init__.py
header, refreshed here with --metadata-only (no binding code changed).
Both listing pages changed since the last capture. The NF-e page now lists
the 010h package (same hash the 010h branch recorded), and the CT-e page
gained the 11/11/2026 republications of NT 2026.004 and the new NT 2026.005
RTC-SN package, which the CT-e schema work will pick up separately.

The fingerprint test only runs on Python 3.13, so this is the value that job
compares against.
@rvalyi
rvalyi force-pushed the nfe-pl_010g_v1_03 branch from 8f4cf7e to f9bd5d1 Compare December 5, 2026 15:46
@rvalyi
rvalyi merged commit 4fb4e26 into master Dec 5, 2026
7 checks passed
@ak-git-bot
ak-git-bot deleted the nfe-pl_010g_v1_03 branch December 5, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants