Skip to content
Health
90/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 3 months ago
  • Required by15/25
    1 module depends on it
  • Maturity25/25
    In 12 Odoo series since 8.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.68 MB
Module directory on disk
Code analysis 0 migration notes 4 models 7 views 0 HTTP endpoints

Description

This module allows to import NUTS locations.

Creates four new fields in Partner object, one per NUTS level

  • NUTS L1: Country level
  • NUTS L2: Normally state or big region level
  • NUTS L3: Normally substate or state level
  • NUTS L4: Normally small region or province level

This module allows to set the flag Not updatable in a NUTS region so that it gets no more updated nor deleted by the import wizard.

Usually NUTS regions have to stay updated with the real ones, but the user may want to update a region's field (name, parent, ...) or create a new ones. With this module, flagging such records as Not updatable prevents them from being overwritten or deleted by the import wizard.

Dependencies

Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
l10n_it_location_nuts

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 7

XML IDNameModelTypeStatus
nuts_import_form NUTS import nuts.import form New
res_partner_nuts_form NUTS Items form res.partner.nuts form New
res_partner_nuts_tree NUTS Items tree res.partner.nuts list New
view_country_form NUTS fields res.country form Inherits base.view_country_form
view_partner_form_nuts Partner form with NUTS res.partner form Inherits base.view_partner_form
view_res_partner_filter_nuts Partner search with NUTS res.partner Inherits base.view_res_partner_filter
view_res_partner_nuts_filter NUTS search filters res.partner.nuts search New

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (0)

No new fields.

Public methods (2)
  • action_partner_nuts(self)
  • import_update_partner_nuts(self)

New fields (1)
  • state_level Integer
    help='Level for the state NUTS category.'
Public methods (0)

No public methods.

New fields (5)
  • allowed_nut_ids Many2many → res.partner.nuts
    compute='_compute_allowed_nuts' string='Allowed nuts' args: 'res.partner.nuts'
  • nuts1_id Many2one → res.partner.nuts
    comodel_name='res.partner.nuts' domain="[('level', '=', 1), ('id', 'in', allowed_nut_ids)]" string='NUTS L1'
  • nuts2_id Many2one → res.partner.nuts
    comodel_name='res.partner.nuts' domain="[('level', '=', 2), ('id', 'in', allowed_nut_ids)]" string='NUTS L2'
  • nuts3_id Many2one → res.partner.nuts
    comodel_name='res.partner.nuts' domain="[('level', '=', 3), ('id', 'in', allowed_nut_ids)]" string='NUTS L3'
  • nuts4_id Many2one → res.partner.nuts
    comodel_name='res.partner.nuts' domain="[('level', '=', 4), ('id', 'in', allowed_nut_ids)]" string='NUTS L4'
Public methods (1)
  • onchange_state_id_base_location_nuts(self)
    @api.onchange('state_id')

New fields (9)
  • child_ids One2many → res.partner.nuts
    comodel_name='res.partner.nuts' inverse_name='parent_id' string='Children'
  • code Char
    required=True
  • country_id Many2one → res.country
    comodel_name='res.country' required=True
  • level Integer
    required=True
  • name Char
    required=True translate=True
  • not_updatable Boolean
  • parent_id Many2one → res.partner.nuts
    comodel_name='res.partner.nuts' ondelete='restrict'
  • parent_path Char
    index=True
  • state_id Many2one → res.country.state
    comodel_name='res.country.state'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…