Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 6 Odoo series since 14.0

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.08 MB
Module directory on disk
Code analysis 1 migration note 4 models 7 views 0 HTTP endpoints

Description

Allows managing the "Create..." and "Create and Edit..." options for Many2one and Many2many fields directly from the ir.model form view.

Dependencies

Odoo dependencies
OCA/server-tools:
OCA/web:
odoo/odoo:
- web
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 7

XML IDNameModelTypeStatus
m2x_create_edit_option_form m2x.create.edit.option form view m2x.create.edit.option form New
m2x_create_edit_option_list_base m2x.create.edit.option list view - base m2x.create.edit.option list New
m2x_create_edit_option_list_editable m2x.create.edit.option list view - editable m2x.create.edit.option list Inherits web_m2x_options_manager.m2x_create_edit_option_list_base
m2x_create_edit_option_list_o2m_filter_by_comodel m2x.create.edit.option list view - filter by comodel m2x.create.edit.option list Inherits web_m2x_options_manager.m2x_create_edit_option_list_editable
m2x_create_edit_option_list_o2m_filter_by_model m2x.create.edit.option list view - filter by model m2x.create.edit.option list Inherits web_m2x_options_manager.m2x_create_edit_option_list_editable
m2x_create_edit_option_search m2x.create.edit.option search view m2x.create.edit.option search New
view_model_form_inherit view.model.form.inherit ir.model form Inherits base.view_model_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (3)
  • comodel_field_ids One2many → ir.model.fields
    args: 'ir.model.fields', 'comodel_id'
  • m2x_comodels_option_ids One2many → m2x.create.edit.option
    args: 'm2x.create.edit.option', 'comodel_id'
  • m2x_option_ids One2many → m2x.create.edit.option
    args: 'm2x.create.edit.option', 'model_id'
Public methods (4)
  • button_empty_m2x_comodels_options(self)
  • button_empty_m2x_options(self)
  • button_fill_m2x_comodels_options(self)
  • button_fill_m2x_options(self)

New fields (2)
  • can_have_options Boolean
    compute='_compute_can_have_options' store=True
  • comodel_id Many2one → ir.model
    compute='_compute_comodel_id' index=True store=True args: 'ir.model'
Public methods (1)
  • name_search(self, name='', args=None, operator='ilike', limit=100)
    @api.model

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (9)
  • comodel_id Many2one → ir.model
    related='field_id.comodel_id' store=True string='Comodel' args: 'ir.model'
  • comodel_name Char
    related='field_id.relation' store=True string='Comodel Name'
  • field_id Many2one → ir.model.fields
    domain=[('can_have_options', '=', True)] index=True ondelete='cascade' required=True args: 'ir.model.fields'
  • field_name Char
    related='field_id.name' store=True
  • model_id Many2one → ir.model
    related='field_id.model_id' store=True string='Model' args: 'ir.model'
  • model_name Char
    related='field_id.model' store=True
  • name Char
    compute='_compute_name' store=True
  • option_create Selection
    default='set_false' help="Defines behaviour for 'Create' option:\n* Do nothing: nothing is done\n* Add/Remove: option 'Create' is set to True/False only if not already present in view definition\n* Force Add/Remove: option 'Create' is always set to True/False, overriding any pre-existing option" required=True string='Create Option' args: [('none', 'Do nothing'), ('set_true', 'Add'), ('force_true', 'Force Add'), ('set_false', 'Remove'), ('force_false', 'Force Remove')]
  • option_create_edit Selection
    default='set_false' help="Defines behaviour for 'Create & Edit' option:\n* Do nothing: nothing is done\n* Add/Remove: option 'Create & Edit' is set to True/False only if not already present in view definition\n* Force Add/Remove: option 'Create & Edit' is always set to True/False, overriding any pre-existing option" required=True string='Create & Edit Option' args: [('none', 'Do nothing'), ('set_true', 'Add'), ('force_true', 'Force Add'), ('set_false', 'Remove'), ('force_false', 'Force Remove')]
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • get(self, model_name, field_name)
    @api.model
    Returns specific record for ``field_name`` in ``model_name`` :param str model_name: technical model name (i.e. "sale.order") :param str field_name: technical field name (i.e. "partner_id") :return: a ``m2x.create.edit.option`` record :rtype: M2xCreateEditOption
  • unlink(self)
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…