Web M2X Options Manager
web_m2x_options_manager · OCA/web
Health
80/100
good
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity25/25In 6 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
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
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE ir_model_fields SET can_have_options = CASE WHEN ttype in ('many2many', 'many2one') THEN true ELSE false END` - re-check the table/column names still match after upgrading. (2 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Allows managing the "Create..." and "Create and Edit..." options for Many2one
and Many2many fields directly from the ir.model form view.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_idsOne2many → ir.model.fieldsargs: 'ir.model.fields', 'comodel_id' -
m2x_comodels_option_idsOne2many → m2x.create.edit.optionargs: 'm2x.create.edit.option', 'comodel_id' -
m2x_option_idsOne2many → m2x.create.edit.optionargs: 'm2x.create.edit.option', 'model_id'
-
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_optionsBooleancompute='_compute_can_have_options'store=True -
comodel_idMany2one → ir.modelcompute='_compute_comodel_id'index=Truestore=True args: 'ir.model'
-
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_idMany2one → ir.modelrelated='field_id.comodel_id'store=Truestring='Comodel' args: 'ir.model' -
comodel_nameCharrelated='field_id.relation'store=Truestring='Comodel Name' -
field_idMany2one → ir.model.fieldsdomain=[('can_have_options', '=', True)]index=Trueondelete='cascade'required=True args: 'ir.model.fields' -
field_nameCharrelated='field_id.name'store=True -
model_idMany2one → ir.modelrelated='field_id.model_id'store=Truestring='Model' args: 'ir.model' -
model_nameCharrelated='field_id.model'store=True -
nameCharcompute='_compute_name'store=True -
option_createSelectiondefault='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=Truestring='Create Option' args: [('none', 'Do nothing'), ('set_true', 'Add'), ('force_true', 'Force Add'), ('set_false', 'Remove'), ('force_false', 'Force Remove')] -
option_create_editSelectiondefault='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=Truestring='Create & Edit Option' args: [('none', 'Do nothing'), ('set_true', 'Add'), ('force_true', 'Force Add'), ('set_false', 'Remove'), ('force_false', 'Force Remove')]
-
create(self, vals_list)@api.model_create_multi -
get(self, model_name, field_name)@api.modelReturns 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…