Repository
OCA/community-data-files · module folder · Try on Runboat
Module version
1.0.0
Category
Inventory/Delivery
Folder size
5.17 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/community-data-files
Last tracking update
2026-08-07 09:06:33
Authors
Camptocamp, Odoo Community Association (OCA), Opener B.V.
Maintainers
Camptocamp, Odoo Community Association (OCA), Opener B.V.
Committers
Maksym Yankin, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
l10n_eu_product_adr_dangerous_goods
Description
This addon adds possibility to mark products with dangerous class due to
European Agreement concerning the International Carriage of Dangerous
Goods by Road (ADR)

If your products contain dangerous product or waste you can link the
relevant ADR goods to each product.

Based on the dangerous goods classes and the product quantities or
weights, the picking will show the number of ADR points on the Other
Info tab.

Read more <https://en.wikipedia.org/wiki/ADR_(treaty)> Unece standards
<https://unece.org/transportdangerous-goods/adr-2021-files>

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
adr_class_view_search adr.class search New
adr_class_view_tree adr.class list New
adr_goods_view_form adr.goods form New
adr_goods_view_search adr.goods search New
adr_goods_view_tree adr.goods list New
adr_label_kanban_form adr.label kanban New
adr_label_view_form adr.label form New
adr_label_view_search adr.label search New
adr_packing_instruction_view_search adr.packing.instruction search New
adr_packing_instruction_view_tree adr.packing.instruction list New
product_normal_form_view Dangerous goods settings on variants product.product form Inherits product.product_normal_form_view
product_template_form_view product.template.dangerous.class product.template form Inherits product.product_template_form_view
view_picking_form stock.picking form Inherits stock.view_picking_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (8)

New fields (2)
  • code Char
    required=True
  • name Char
    required=True translate=True
Public methods (0)

No public methods.

New fields (11)
  • active Boolean
    default=True
  • class_id Many2one → adr.class
    comodel_name='adr.class' required=True string='Class'
  • classification_code Char
  • label_ids Many2many → adr.label
    comodel_name='adr.label' help='The labels/placards (see 5.2.2.2 and 5.3.1.7) that have to be affixed to packages, containers, tank-containers, portable tanks, MEGCs and vehicles.)' string='Labels'
  • limited_quantity Float
    digits='Product Unit of Measure'
  • limited_quantity_uom_id Many2one → uom.uom
    string='Limited Quantity UoM' args: 'uom.uom'
  • name Char
    help="Contains, in upper case characters, the name of the substance or article, if the substance or article has been assigned its own specific UN number, or of the generic or n.o.s. entry to which it has been assigned in accordance with the criteria ('decision trees') of Part 2. This name shall be used as the proper shipping name or, when applicable, as part of the proper shipping name (see 3.1.2 for further details on the proper shipping name)." required=True translate=True args: 'Name and description'
  • packing_instruction_ids Many2many → adr.packing.instruction
    comodel_name='adr.packing.instruction' string='Packing Instructions'
  • transport_category Selection
    required=True args: TRANSPORT_CATEGORIES
  • tunnel_restriction_code Selection
    required=True args: TUNNEL_RESTRICTION_CODES
  • un_number Char
    help="Contains the UN number: of the dangerous substance or article if the substance or article has been assigned its own specific UN number; or of the generic or n.o.s. entry to which the dangerous substances or articles not mentioned by name shall be assigned in accordance with the criteria ('decision trees') of Part 2." required=True string='UN Number'
Public methods (0)

No public methods.

New fields (5)
  • class_id Many2one → adr.class
    comodel_name='adr.class' required=True string='Class'
  • code Char
    required=True
  • goods_ids Many2many → adr.goods
    comodel_name='adr.goods' copy=False help='The dangerous goods to which this label is applied' string='ADR Goods'
  • image Binary
    required=True
  • name Char
    required=True translate=True
Public methods (1)
  • unlink(self)
    Restrict removal of labels in use

New fields (2)
  • code Char
    required=True
  • name Char
    translate=True
Public methods (0)

No public methods.

New fields (10)
  • adr_class_id Many2one → adr.class
    related='adr_goods_id.class_id' args: 'adr.class'
  • adr_classification_code Char
    related='adr_goods_id.classification_code'
  • adr_goods_id Many2one → adr.goods
    args: 'adr.goods', 'Dangerous Goods'
  • adr_label_ids Many2many → adr.label
    related='adr_goods_id.label_ids' args: 'adr.label'
  • adr_limited_quantity Float
    related='adr_goods_id.limited_quantity'
  • adr_limited_quantity_uom_id Many2one
    related='adr_goods_id.limited_quantity_uom_id'
  • adr_packing_instruction_ids Many2many → adr.packing.instruction
    related='adr_goods_id.packing_instruction_ids' args: 'adr.packing.instruction'
  • adr_transport_category Selection
    related='adr_goods_id.transport_category'
  • adr_tunnel_restriction_code Selection
    related='adr_goods_id.tunnel_restriction_code'
  • is_dangerous Boolean
    compute='_compute_is_dangerous' help='This product belongs to a dangerous class' inverse='_inverse_is_dangerous' readonly=False store=True
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
    Propagate the template's adr settings when creating variants

New fields (11)
  • adr_class_id Many2one → adr.class
    related='product_variant_ids.adr_goods_id.class_id' args: 'adr.class'
  • adr_classification_code Char
    related='adr_goods_id.classification_code'
  • adr_goods_id Many2one → adr.goods
    readonly=False related='product_variant_ids.adr_goods_id' args: 'adr.goods', 'Dangerous Goods'
  • adr_goods_on_variants Boolean
    compute='_compute_adr_goods_on_variants' help='Indicates whether the adr configuration is different for each variant.'
  • adr_label_ids Many2many → adr.label
    related='product_variant_ids.adr_goods_id.label_ids' args: 'adr.label'
  • adr_limited_quantity Float
    related='product_variant_ids.adr_goods_id.limited_quantity'
  • adr_limited_quantity_uom_id Many2one
    related='product_variant_ids.adr_goods_id.limited_quantity_uom_id'
  • adr_packing_instruction_ids Many2many → adr.packing.instruction
    related='product_variant_ids.adr_goods_id.packing_instruction_ids' args: 'adr.packing.instruction'
  • adr_transport_category Selection
    related='product_variant_ids.adr_goods_id.transport_category'
  • adr_tunnel_restriction_code Selection
    related='product_variant_ids.adr_goods_id.tunnel_restriction_code'
  • is_dangerous Boolean
    help='This product belongs to a dangerous class' readonly=False related='product_variant_ids.is_dangerous'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
    Propagate the template's adr settings on the created variants
  • onchange_is_dangerous(self)
    @api.onchange('is_dangerous')
    Remove the dangerous goods attribute from the product (when is_dangerous is deselected)
  • write(self, values)

New fields (1)
  • adr_points Float
    compute='_compute_adr_points' compute_sudo=True digits='Product Unit of Measure' string='ADR Points'
Public methods (0)

No public methods.

New fields (1)
  • adr_points Float
    compute='_compute_adr_points' digits='Product Unit of Measure' string='ADR Points'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
44 days ago
Last activity
20 days ago
Repository
OCA/community-data-files
Pull request
[16.0][MIG]: l10n eu product adr: Migration to 16.0 (#279)