Skip to content

[Master] - Slice 641591: EUDR Certificate Capture for Items - #11217

Open
v-rohangarg20 wants to merge 13 commits into
mainfrom
features/Slice-641591-EUDR-Certificate-Capture-for-Items
Open

[Master] - Slice 641591: EUDR Certificate Capture for Items#11217
v-rohangarg20 wants to merge 13 commits into
mainfrom
features/Slice-641591-EUDR-Certificate-Capture-for-Items

Conversation

@v-rohangarg20

@v-rohangarg20 v-rohangarg20 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#641591

Issue

EUDR certificate information could not be captured and carried with item and lot tracking data. As a result, users could not reliably maintain the certificate reference needed for EUDR traceability across purchasing, sales, posted receipt lines, and the EUDR sales invoice report.

Cause

The Sustainability and EUDR data model and document flows did not expose a certificate field for items or propagate that information consistently when item tracking and lot information were created or transferred through purchase and sales documents. The related report and permissions also did not include the complete certificate-capture flow.

Solution

  • Added EUDR certificate capture for items and lot information.
  • Added the EUDR commodity and tracking support required to retain the certificate through purchase and sales transactions.
  • Exposed the certificate on the relevant item, lot, purchase receipt, and posted sales pages.
  • Included the certificate in the EUDR sales invoice report.
  • Updated Sustainability object permissions for the EUDR report and codeunit.
  • Fixed item tracking lookups by declaring ItemTrackingCode in all relevant procedures, including AssignEUDRItemTrackingCode.

@v-rohangarg20
v-rohangarg20 requested a review from a team September 8, 2026 13:34
@v-rohangarg20
v-rohangarg20 requested a review from a team as a code owner September 8, 2026 13:34
@github-actions github-actions Bot added the Team: SCM GitHub request for SCM area label Sep 8, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Sep 8, 2026
@v-rohangarg20
v-rohangarg20 force-pushed the features/Slice-641591-EUDR-Certificate-Capture-for-Items branch from 6f3ce28 to 948c447 Compare September 8, 2026 13:42
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Inventory/Item/Item.Table.al Outdated
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Inventory/Item/Item.Table.al Outdated
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al Outdated
Comment thread src/Layers/W1/BaseApp/Inventory/Tracking/EUDRLotInformationMgt.Codeunit.al Outdated
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
@v-rohangarg20
v-rohangarg20 force-pushed the features/Slice-641591-EUDR-Certificate-Capture-for-Items branch 2 times, most recently from f9e6140 to 69386f7 Compare September 8, 2026 13:56
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
@v-rohangarg20
v-rohangarg20 force-pushed the features/Slice-641591-EUDR-Certificate-Capture-for-Items branch from 69386f7 to d20bb6e Compare September 8, 2026 14:19
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al
Comment thread src/Layers/W1/BaseApp/Inventory/Tracking/EUDRLotInformationMgt.Codeunit.al Outdated
Comment thread src/Layers/W1/BaseApp/Sales/History/EUDRSalesInvoice.Report.al Outdated
Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
@v-rohangarg20

Copy link
Copy Markdown
Contributor Author

Did we agree on that we're including EUDR to W1? Or it's a local feature?

We’ve moved it to the Sustainability app.

Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 4

Recommendation: Accept

What this PR does

The latest commits fix the remaining compile blocker in the EUDR item tracking lookup. The helper now declares and uses ItemTrackingCode for the filtered lookup, the selected record, and the error text.

The full change adds an EUDR flag and commodity on items, stores EUDR certificate data on lot information, carries EUDR state to purchase and sales document history, and prints lot certificate details on a dedicated sales invoice. The sales and purchase item-assignment subscribers use existing events that run after standard item values are assigned, so the copied EUDR state is captured at the right point when the item changes.

Status of previous suggestions
ID Title Status Author response
S1 Use posted EUDR state for invoices Addressed Still addressed; the current diff stores EUDR state on document and posted lines and uses the posted line state for invoice lot output.
S2 Cover setup and invoice output Addressed Still addressed; the tests cover setup, line transfer, posting, and report dataset output.
S3 Declare item tracking code before use Addressed The latest commits declare ItemTrackingCode in AssignEUDRItemTrackingCode and use it consistently.
S4 Grant access to new EUDR objects Addressed Still addressed; the permission set grants execute access to the new EUDR codeunit and report.
New observations (commits since round 3)

None. The new commits only fix the prior compile issue and clean up the item tracking lookup variable use.

Risk assessment and necessity

Risk: Medium. The feature touches item tracking setup, lot certificate data, purchase and sales posted-line state, and printed invoice output. The latest change is narrow and lowers risk by removing the unresolved compile problem; CI was still running at review time, with no completed failing check visible.

Necessity: The change is needed so users can mark EUDR-relevant items, keep certificate data per lot, and print certificate information per invoiced lot. Without it, users do not have an in-app path for this certificate capture and invoice output flow.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11217 round=4 by=alexei-dobriansky at=2026-09-10T07:14:47Z lastSha=0b6bd0fae8452dfe30ff7e706f9f02b8fb5eac3b reviewKey=64c76666571336ab1a07e3c7416f5874ec9deeebb3023531b76419b3770908c4 suggestions=S1@5e8411bf:addressed,S2@eec2ef07:addressed,S3@0c496376:addressed,S4@a48d62a0:addressed parentRound=3

Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
Comment thread src/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al
Comment thread src/Apps/W1/Sustainability/app/src/EUDR/EUDRSalesInvoice.Report.al
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 5

Recommendation: Accept

What this PR does

The latest commits change only the test code: they add missing test initialization, payment-information setup, general posting setup for item tracking posting, and stable date values for the page test.

The full feature still adds an EUDR flag and commodity on items, stores certificate data on lot information, carries the EUDR state to purchase and sales document history, and prints lot certificate details on a dedicated sales invoice. The base application publishers used by the subscribers exist and run after standard item values are assigned; posted-line transfer uses the matching field numbers, and the report reads the posted line state before loading lot certificate rows.

Status of previous suggestions
ID Title Status Author response
S1 Use posted EUDR state for invoices Addressed Still addressed; invoice output uses the posted sales invoice line state and not the current item state.
S2 Cover setup and invoice output Addressed Still addressed; the tests cover setup, line transfer, posting, lot data, and report dataset output.
S3 Declare item tracking code before use Addressed Still addressed; the item tracking lookup now declares and uses the tracking-code record.
S4 Grant access to new EUDR objects Addressed Still addressed; the permission set includes the new EUDR codeunit and report.
New observations (commits since round 4)

None. The new commits only strengthen the test setup and do not introduce a new production-code issue.

Risk assessment and necessity

Risk: Medium. The feature touches item tracking setup, lot certificate data, posted purchase and sales line state, and invoice report output. The latest round changed tests only; completed visible checks were successful, with some long-running unit-test buckets still in progress.

Necessity: The change is needed so users can mark EUDR-relevant items, keep certificate information per lot, and print certificate details per invoiced lot. The scope matches that feature without replacing the default invoice report.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11217 round=5 by=alexei-dobriansky at=2026-09-11T13:22:47Z lastSha=27fdc2a2b2e14b80df4845fe380f90a0ff8a58a4 reviewKey=14dcbace014c463bba0b85bbda2aec7c0be3adc02ba626fb95896548c08d28a5 suggestions=S1@5e8411bf:addressed,S2@eec2ef07:addressed,S3@0c496376:addressed,S4@a48d62a0:addressed parentRound=4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Ownership: Manual Preserve the manually selected team ownership Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants