Product Profile
product_profile · OCA/product-attribute
-
Security25/25No findings
-
Activity20/25Last human commit 11 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 8 Odoo series since 8.0
Heuristic over the facts below, not an audit · How it's computed
Description
This module provides easier products configuration (in one click). It allows to configure a product template with only one field.
Main use case: a lot of modules are installed (mrp, purchase, sale, pos) and products configuration becomes harder for end users: too many fields to take care of.
You are concerned that at any time a product might be not configured correctly: this module is your friend.
Thanks to this module, a lot of complexity becomes hidden (default behavior) to the end user and usability is optimal.
It eases as well the data migration by only specifying the profile field instead of all fields which depend on it.
Note: This module is meant to be used by skilled people in database fields creation within the ERP framework.
Additional feature: a default value can be attached to a profile (see § Configuration, part 3)
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 4
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_profile_tree_view |
product.profile | list | New | |
product_template_form_view |
product.template | form | Inherits product.product_template_form_view | |
product_template_search_view |
product.template | search | Inherits product.product_template_search_view | |
view_general_configuration |
res.config.settings | form | Inherits sale.res_config_settings_view_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
No new fields.
Public methods (2)-
create(self, vals_list)@api.model_create_multi -
write(self, vals)
No new fields.
Public methods (1)-
get_view(self, view_id=None, view_type='form', **options)@api.model
-
explanationTexthelp='An explanation on the selected profile\n(not synchronized with product.template fields)'required=True -
nameCharhelp='Profile name displayed on product template\n(not synchronized with product.template fields)'required=True -
sequenceIntegerhelp='Defines the order of the entries of profile_id field\n(not synchronized with product.template fields)' -
typeSelectiondefault='consu'help="See 'detailed_type' field in product.template"required=Trueselection=[('consu', 'Consumable'), ('service', 'Service')]
-
check_useless_key_in_vals(self, vals, key)@api.modelIf replacing values are the same than in db, we remove them. Use cases: 1/ if in edition mode you switch a field from value A to value B and then go back to value A then save form, field is in vals whereas it shouldn't. 2/ if profile data are in csv file there are processed each time module containing csv is loaded we remove field from vals to minimize impact on products -
get_view(self, view_id=None, view_type='form', **options)@api.modelAdd a warning to the form view which is otherwise auto-generated -
write(self, vals)Profile update can impact products: we take care to propagate ad hoc changes. If on the profile at least one field has changed, re-apply its values on relevant products
-
profile_explanationTextreadonly=Truerelated='profile_id.explanation' -
profile_idMany2one → product.profilecomodel_name='product.profile'string='Profile'
-
get_view(self, view_id=None, view_type='form', **options)@api.modelfields_view_get comes from Model (not AbstractModel)
-
group_product_profileBooleanhelp='Display fields computed by product profile module.\nFor debugging purpose see menu\nSales > Configuration \n> Products\n> Product Profiles'implied_group='product_profile.group_product_profile_user'string='Display Product Profile fields'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
