Skip to content

[MIG] l10n_eu_adr_report: Migration to 18.0 - #287

Open
StephaneMangin wants to merge 12 commits into
OCA:18.0from
acsone:18.0-mig-l10n_eu_adr_report
Open

[MIG] l10n_eu_adr_report: Migration to 18.0#287
StephaneMangin wants to merge 12 commits into
OCA:18.0from
acsone:18.0-mig-l10n_eu_adr_report

Conversation

@StephaneMangin

@StephaneMangin StephaneMangin commented Aug 4, 2026

Copy link
Copy Markdown

This pull request introduces the initial implementation of the l10n_eu_adr_report module, which provides ADR-compliant reporting for dangerous goods in Odoo delivery orders.

Here is an output of this report :
DangerousDeliveryReport.pdf

@OCA-git-bot OCA-git-bot added series:18.0 mod:l10n_eu_adr_report Module l10n_eu_adr_report labels Aug 4, 2026
@StephaneMangin
StephaneMangin force-pushed the 18.0-mig-l10n_eu_adr_report branch 6 times, most recently from 4ec978e to 2a27af0 Compare August 4, 2026 21:13
@OCA-git-bot OCA-git-bot added the mod:l10n_eu_product_adr Module l10n_eu_product_adr label Aug 4, 2026
@StephaneMangin
StephaneMangin force-pushed the 18.0-mig-l10n_eu_adr_report branch 5 times, most recently from c7ff364 to b3f2df2 Compare August 6, 2026 09:11
@OCA-git-bot OCA-git-bot removed the mod:l10n_eu_product_adr Module l10n_eu_product_adr label Aug 6, 2026
@StephaneMangin
StephaneMangin force-pushed the 18.0-mig-l10n_eu_adr_report branch 3 times, most recently from e4f5ec6 to c4c8568 Compare August 6, 2026 09:37
@StephaneMangin
StephaneMangin marked this pull request as ready for review August 6, 2026 09:44
@StephaneMangin
StephaneMangin force-pushed the 18.0-mig-l10n_eu_adr_report branch from c4c8568 to 5a28b4a Compare August 10, 2026 09:38
The dangerous.goods.handler wizard was dropped from l10n_eu_product_adr,
so it is brought into this module, which is its only consumer, and mapped
onto the current ADR data model.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@StephaneMangin
StephaneMangin force-pushed the 18.0-mig-l10n_eu_adr_report branch from 5a28b4a to 5aa9fbe Compare August 10, 2026 09:39
@rrebollo

Copy link
Copy Markdown
Contributor

Your description seems to indicate this is a new contribution, but the commit history points to a migration. So which one is it?

@rrebollo rrebollo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good contribution. Please consider my suggestions.
Would you be so kind to review my #290 in return?

data = data or {}
docs = self.env["stock.picking"].browse(docids)
wizard = self.env["dangerous.goods.handler"].create(
{"picking_ids": [(6, 0, docs.ids)]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to use Command

lines = wizard.prepare_DG_data()
docargs = {
"doc_ids": docs.ids,
"doc_model": "stock.picking",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"doc_model": "stock.picking",
"doc_model": docs._name,

<tr>
<td />
<td class="wide-col"><span t-esc="line['class']" /> ( ) </td>
<td t-esc="line['qty_amount']" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<td t-esc="line['qty_amount']" />
<td t-out="line['qty_amount']" />

<td />
<td class="wide-col"><span t-esc="line['class']" /> ( ) </td>
<td t-esc="line['qty_amount']" />
<td t-esc="line['product_weight']" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<td t-esc="line['product_weight']" />
<td t-out="line['product_weight']" />

# Copyright 2020 Iryna Vyshnevska (Camptocamp)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

from itertools import groupby

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be done using grouped?

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

Labels

mod:l10n_eu_adr_report Module l10n_eu_adr_report series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants