TIP: You can type at any time to perform a new search.
Product Attribute Model Link
product_attribute_model_link · OCA/product-attribute
- Repository
- OCA/product-attribute · module folder · Try on Runboat
- Module version
- 1.0.1
- Category
- Product
- Folder size
- 0.12 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/product-attribute
- Last tracking update
- 2026-08-07 08:09:19
- Authors
- Odoo Community Association (OCA), Cetmix
- Maintainers
- Odoo Community Association (OCA), Cetmix
- Committers
- Weblate, OCA-git-bot, oca-ci, Ivan Sokolov, angelinaanaki
Code Analysis ⓘ
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_attribute_model_link_form |
product.attribute.model.link.form | product.attribute | form | Inherits product.product_attribute_view_form |
view_linked_record_wizard_form |
linked.record.wizard.form | linked.record.wizard | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (3)
New fields (1)
-
linked_record_refReferenceselection='_select_target_model'string='Linked Record'
-
action_save_linked_record(self)Action to save the linked record
New fields (8)
-
apply_to_products_on_createBooleanhelp='If enabled when a new attribute value is created it will be automatically added to all existing products that use this attribute. Attention! You must completely understand possible consequences and use this option with care!' -
create_from_attribute_valuesBooleanhelp='If enabled when a new attribute value is added to the attribute a new record will be created in the linked model. Attention! The only value passed explicitly on creation will be the linked field containing the new attribute value name. You must ensure that this would be enough for new record creation. Otherwise an exception will be raised. If a digital field is used a conversion attempt will be done. If conversion fails an exception might be raised.' -
delete_when_attribute_value_is_deletedBooleanhelp="When enabled if an attribute value is deleted linked record will be deleted too. Use with extreme care! This option is available only if 'Create from Attribute Values' option is enabled." -
domainChardefault='[]'help='If configured only records matching the domain will be used for attribute value creation. Warning: updating domain will not affect existing attribute values!'string='Domain (optional)' -
linked_field_idMany2one → ir.model.fieldsdomain="[('store', '=', True), ('relation', '=', False), ('model_id', '=', linked_model_id)]"help='Field of the selected model that will be used for the attribute value names. Can be any field except for related or computed non-stored ones. Digital field values will be converted to Char automatically. Warning: changing or removing existing value will not affect existing attribute values!' args: 'ir.model.fields', 'Linked field' -
linked_model_idMany2one → ir.modeldomain="[('transient', '=', False)]"help='Model which records will be used for the attribute values. Cannot be a transient model. Warning: changing or removing existing value will not affect existing attribute values!' args: 'ir.model', 'Linked model' -
modify_from_attribute_valuesBooleanhelp="If enabled when an attribute value is renamed linked field value in the linked model will be updated accordingly. If a digital field is used a conversion attempt will be done. If conversion fails an exception might be raised. This option is available only if 'Create from Attribute Values' option is enabled." -
res_model_nameCharrelated='linked_model_id.model'string='Model'
-
add_attribute_value_from_linked_record(self)Action to open a wizard for the linked record. :return: Action dictionary to open the wizard. -
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
New fields (1)
-
linked_record_refReferenceselection='_selection_target_model'string='Linked record'
-
action_open_linked_record_wizard(self)Action to open a wizard for the linked record. :return: Action dictionary to open the wizard. -
convert_attribute_value(self, value, linked_field)Convert attribute value name to the appropriate data type based on the linked field's type. :param value: Value to be converted. :return: Converted value or the original value if no conversion is needed. -
create(self, vals_list)@api.model_create_multiOverride to create records based on attribute values. :param vals_list: List of dictionaries containing attribute values for creating records. :return: Created records. :raise: ValidationError if conversion fails for a field. -
unlink(self)Delete records and associated linked records based on specified conditions. :return: Result of the unlink operation. -
write(self, vals)Override to modify the linked records with given values. :param vals: Dictionary of values to be updated. :return: Result of the write operation. :raise: ValidationError if conversion fails for a field.