Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 3 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 14 Odoo series since 6.1

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

Security findings
Grave / minor (static analysis)
Required by
0
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.21 MB
Module directory on disk
Code analysis 1 migration note 6 models 2 views 0 HTTP endpoints

Description

This module allows to associate a sequence to the product reference. The reference (default code) is unique (SQL constraint) and required.

You can optionally specify different sequences for different product categories.

Dependencies

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

Code analysis

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

Views touched 2

XML IDNameModelTypeStatus
product_category_form_view product.category.form - product_sequence product.category form Inherits product.product_category_form_view
res_config_settings_view_form res.config.settings.view.form.inherit.product res.config.settings form Inherits product.res_config_settings_view_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 6

New fields (0)

No new fields.

Public methods (1)
  • get_category_sequence_id(self, category=False)
    @api.model

New fields (2)
  • code_prefix Char
    help='Prefix used to generate the internal reference for products created with this category. If blank the default sequence will be used.' string='Prefix for Product Internal Reference'
  • sequence_id Many2one → ir.sequence
    comodel_name='ir.sequence' copy=False help='This field contains the information related to the numbering of the journal entries of this journal.' readonly=True string='Product Sequence'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (1)
  • default_code Char
    default='/' help="Set to '/' and save if you want a new internal reference to be proposed." tracking=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)
    To assign a new internal reference, just write '/' on the field. Note this is up to the user, if the product category is changed, she/he will need to write '/' on the internal reference to force the re-assignment.

New fields (0)

No new fields.

Public methods (1)
  • copy(self, default=None)
    Let an explicitly given internal reference reach the new variant. Odoo restores a ``default_code`` passed in ``default`` at the end of ``create()``, but only as long as the new template does not have one yet. As this module gives every new variant a number from the sequence, that is never the case and the given reference would be dropped. So hand it over to ``_prepare_variant_values()`` instead, which also avoids drawing a sequence number that nothing would ever use.

New fields (1)
  • use_parent_categories_to_determine_prefix Boolean
    help='Use parent categories to determine the prefix if the category has no settings for the prefix.' string='Use parent categories to determine the prefix'
Public methods (0)

No public methods.

New fields (1)
  • use_parent_categories_to_determine_prefix Boolean
    readonly=False related='company_id.use_parent_categories_to_determine_prefix'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…