|
| 1 | +=============== |
| 2 | +Product Profile |
| 3 | +=============== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:f04f87cc48c1940f6a787ce702e91fbe42ce1cf2e9a1d585b34b17b966fc1dcb |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Production/Stable |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/product-attribute/tree/18.0/product_profile |
| 21 | + :alt: OCA/product-attribute |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_profile |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=18.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module provides easier products configuration (in one click). It |
| 32 | +allows to configure a product template with only one field. |
| 33 | + |
| 34 | + |image1| |
| 35 | + |
| 36 | +**Main use case**: a lot of modules are installed (mrp, purchase, sale, |
| 37 | +pos) and products configuration becomes harder for end users: too many |
| 38 | +fields to take care of. |
| 39 | + |
| 40 | +You are concerned that at any time a product might be not configured |
| 41 | +correctly: this module is your friend. |
| 42 | + |
| 43 | +Thanks to this module, a lot of complexity becomes hidden (default |
| 44 | +behavior) to the end user and usability is optimal. |
| 45 | + |
| 46 | +It eases as well the data migration by only specifying the profile field |
| 47 | +instead of all fields which depend on it. |
| 48 | + |
| 49 | +Note: This module is meant to be used by skilled people in database |
| 50 | +fields creation within the ERP framework. |
| 51 | + |
| 52 | +Additional feature: a default value can be attached to a profile (see § |
| 53 | +Configuration, part 3) |
| 54 | + |
| 55 | +.. |image1| image:: https://raw.githubusercontent.com/OCA/product-attribute/18.0/product_profile/static/img/field.png |
| 56 | + |
| 57 | +**Table of contents** |
| 58 | + |
| 59 | +.. contents:: |
| 60 | + :local: |
| 61 | + |
| 62 | +Configuration |
| 63 | +============= |
| 64 | + |
| 65 | +1. Create your own profile here: Sales > Configuration > Product > |
| 66 | + Product Profiles |
| 67 | + |
| 68 | + |Product Profile List View| |
| 69 | + |
| 70 | + |New Product Profile| |
| 71 | + |
| 72 | +2. Extend "product.profile" model to add fields from product.template, |
| 73 | + either in normal mode or default mode (see note section below). These |
| 74 | + fields should be identical to their original fields **(especially |
| 75 | + "required" field attribute)**. |
| 76 | + |
| 77 | + .. code:: python |
| 78 | +
|
| 79 | + class ProductProfile(models.Model): |
| 80 | + """ Require dependency on sale, purchase and point_of_sale modules |
| 81 | + """ |
| 82 | +
|
| 83 | + _inherit = "product.profile" |
| 84 | +
|
| 85 | + def _get_types(self): |
| 86 | + return [("product", "Stockable Product"), |
| 87 | + ("consu", 'Consumable'), |
| 88 | + ("service", "Service")] |
| 89 | +
|
| 90 | + sale_ok = fields.Boolean( |
| 91 | + string="Can be Sold", |
| 92 | + help="Specify if the product can be selected in a sales order line.") |
| 93 | + purchase_ok = fields.Boolean( |
| 94 | + string="Can be Purchased") |
| 95 | + available_in_pos = fields.Boolean() |
| 96 | +
|
| 97 | +3. Insert data (xml or csv) and define values for each field defined |
| 98 | + above for each configuration scenario |
| 99 | + |
| 100 | +Note : You might want to declare profile fields as defaults. To do this, |
| 101 | +just prefix the field with "profile_default". |
| 102 | + |
| 103 | + .. code:: python |
| 104 | +
|
| 105 | + class ProductProfile(models.Model): |
| 106 | + profile_default_categ_id = fields.Many2one( |
| 107 | + "product.category", |
| 108 | + string="Default category", |
| 109 | + ) |
| 110 | + profile_default_tag_ids = fields.Many2many( |
| 111 | + comodel_name="product.template.tag", |
| 112 | + string="Tags", |
| 113 | + ) |
| 114 | +
|
| 115 | +Default fields only influence the records the first time they are set. - |
| 116 | +if the profile is modified, changes are not propagated to all the |
| 117 | +records that have this profile - if the record previously had another |
| 118 | +profile, changing profile will not influence default values |
| 119 | + |
| 120 | +.. |Product Profile List View| image:: https://raw.githubusercontent.com/OCA/product-attribute/18.0/product_profile/static/img/list.png |
| 121 | +.. |New Product Profile| image:: https://raw.githubusercontent.com/OCA/product-attribute/18.0/product_profile/static/img/create.png |
| 122 | + |
| 123 | +Usage |
| 124 | +===== |
| 125 | + |
| 126 | +Assign a value to the profile field in the product template form. Then, |
| 127 | +all fields which depend on this profile will be set to the right value |
| 128 | +at once. |
| 129 | + |
| 130 | +If you deselect the profile value, all these fields keep the same value |
| 131 | +and you can change them manually (back to standard behavior). |
| 132 | + |
| 133 | +Profiles are also defined as search filter and group. |
| 134 | + |
| 135 | +Known issues / Roadmap |
| 136 | +====================== |
| 137 | + |
| 138 | +- Streamlined behaviour of default/nondefault fields in every situation |
| 139 | +- More robust/less error-prone functionality for required fields or |
| 140 | + fields implicated in workflows |
| 141 | +- More flexible/configurable behaviour for profile fields (instead of |
| 142 | + only default/nondefault fields) |
| 143 | + |
| 144 | +Bug Tracker |
| 145 | +=========== |
| 146 | + |
| 147 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_. |
| 148 | +In case of trouble, please check there if your issue has already been reported. |
| 149 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 150 | +`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_profile%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 151 | + |
| 152 | +Do not contact contributors directly about support or help with technical issues. |
| 153 | + |
| 154 | +Credits |
| 155 | +======= |
| 156 | + |
| 157 | +Authors |
| 158 | +------- |
| 159 | + |
| 160 | +* Akretion |
| 161 | + |
| 162 | +Contributors |
| 163 | +------------ |
| 164 | + |
| 165 | + |
| 166 | +- Sébastien BEAU < [email protected]> |
| 167 | +- Abdessamad HILALI |
| 168 | + |
| 169 | +- Stefan Rijnhart < [email protected]> |
| 170 | + |
| 171 | +Maintainers |
| 172 | +----------- |
| 173 | + |
| 174 | +This module is maintained by the OCA. |
| 175 | + |
| 176 | +.. image:: https://odoo-community.org/logo.png |
| 177 | + :alt: Odoo Community Association |
| 178 | + :target: https://odoo-community.org |
| 179 | + |
| 180 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 181 | +mission is to support the collaborative development of Odoo features and |
| 182 | +promote its widespread use. |
| 183 | + |
| 184 | +.. |maintainer-bealdav| image:: https://github.com/bealdav.png?size=40px |
| 185 | + :target: https://github.com/bealdav |
| 186 | + :alt: bealdav |
| 187 | +.. |maintainer-sebastienbeau| image:: https://github.com/sebastienbeau.png?size=40px |
| 188 | + :target: https://github.com/sebastienbeau |
| 189 | + :alt: sebastienbeau |
| 190 | +.. |maintainer-kevinkhao| image:: https://github.com/kevinkhao.png?size=40px |
| 191 | + :target: https://github.com/kevinkhao |
| 192 | + :alt: kevinkhao |
| 193 | + |
| 194 | +Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: |
| 195 | + |
| 196 | +|maintainer-bealdav| |maintainer-sebastienbeau| |maintainer-kevinkhao| |
| 197 | + |
| 198 | +This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/18.0/product_profile>`_ project on GitHub. |
| 199 | + |
| 200 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments