Search 1.9 billion lines of Odoo code on GitHub

product_profile

Author: Akretion, Odoo Community Association (OCA)
License: AGPL-3
Branch: 12.0
Repository: Change2improve/product-attribute
Dependencies: product, sale, and sale_management
Languages: HTML (118, 7.2%), PO File (951, 58.3%), Python (317, 19.4%), XML (81, 5.0%), and reStructuredText (165, 10.1%)
Other branches: 14.0, and 8.0
Other repositories: 020cui/product-attribute, 2FM/product-attribute, AITIC/product-attribute, AbrahamTrey/product-attribute, AgustinPighin/product-attribute, AladroLiderit/product-attribute, Alfa-90/product-attribute, Antiun/product-attribute, Billolha/product-attribute, BitStab/product-attribute, CB-Gran-Canaria/product-attribute, CGenie/product-attribute, Callino/product-attribute, ClearCorp/oca-product-attribute, Colorlessgold/product-attribute, Conectel/product-attribute, Daniel-CA/product-attribute, Darknroses/product-attribute, DjaitaiKoffi/product-attribute, Dobtor-OCA/product-attribute, Domatix/product-attribute, DucTruongKomit/product-attribute, EBII/product-attribute, ERPLibre/product-attribute, ElvenStudio/product-attribute, Endika/product-attribute, ForgeFlow/product-attribute, GGamblin/product-attribute, GSLabIt/product-attribute, Gabinete-Digital/product-attribute, Gofekra/product-attribute, GrupoAlvamex/product-attribute, Guobower/OCA-product-attribute, HarshalBhoir/product-attribute, HazemKhaled/product-attribute, Ingeos/product-attribute, Jarsa/product-attribute, JayVora-SerpentCS/product-attribute, Jeisonpernia/product-attribute, JibenCL/product-attribute, Joaco1980/product-attribute, JoanMarin/product-attribute, JuanjoA/product-attribute, KasperDeclercq/product-attribute, KolushovAlexandr/product-attribute, LL-Akeera/product-attribute, LasLabs/product-attribute, LevelPrime/product-attribute, MadsackMediaStore/product-attribute, Martronic-SA/product-attribute, MathBenTech/product-attribute, Mefistous/product-attribute, Menestrels/product-attribute, MjAbuz/product-attribute, NL66278/product-attribute, NaSol/product-attribute, NachoAlesLopez/product-attribute, NeatNerdPrime/product-attribute, Nikul-Chaudhary/product-attribute, Numigi/odoo-product-attribute, OCA-MUK/product-attribute, OCA/product-attribute, ORETEK/product-attribute, Odoo-Italia-Associazione/product-attribute, OutillageStEtienne/product-attribute, PCatinean/product-attribute, PESOL/product-attribute, PlanetaTIC/product-attribute, PortalFl0w/product-attribute, Rad0van/product-attribute, RosleStores/product-attribute, Saharaintergroup/product-attribute, SanteLibre/product-attribute, SequarSrl/product-attribute, SeuMarco/product-attribute, SportPursuit/product-attribute, Studio73/product-attribute, TDu/product-attribute, TRESCLOUD/product-attribute, Tecnativa/product-attribute, Tonow-c2c/product-attribute, Vauxoo/product-attribute, VbossEkat/product-attribute, VisiionSolucionesTecnologicas/product-attribute, aacceess75/product-attribute, aaltinisik/product-attribute, acsone/product-attribute, agrista/odoo-product-attribute, agyamuta/product-attribute, akretion/product-attribute, algiopensource/product-attribute, altexcorp/product-attribute, amendoncabh/product-attribute, andhit-r/product-attribute, andreampiovesana/product-attribute, andrius-preimantas/product-attribute, anhvu-sg/product-attribute, ansinaesmejor/product-attribute, apachesep/product-attribute, apertoso/product-attribute, apetbiz/product-attribute, archetipo/product-attribute, arun-art06/product-attribute, aryajimbaran/product-attribute, aurestic/product-attribute, avoinsystems/product-attribute, ayamonem/product-attribute, bealdav/product-attribute, bertontin/product-attribute, binovo/product-attribute, bisnesmart/product-attribute, bistaray/product-attribute, bitodoo/product-attribute, bizzappdev/product-attribute, bizzappdevteam/product-attribute, bmya/product-attribute, bodi000/product-attribute, boolit-team/product-attribute, brain-tec/product-attribute, brainbeanapps/product-attribute, brocoloco/product-attribute, camptocamp/product-attribute, chenjingxiong/product-attribute, cnfengyuan/product-attribute, conroyke56/product-attribute, coopiteasy/product-attribute, cubells/product-attribute, cybernexus/product-attribute, damcar/product-attribute, damdam-s/product-attribute, danieldeyris/product-attribute, dansanti/product-attribute, daramousk/product-attribute, davimartins9/product-attribute, diagramsoftware/product-attribute, diggy128/product-attribute, digitalsatori/product-attribute, domcolas/product-attribute, dong-z/product-attribute, drashtigotecha/product-attribute, dreispt/product-attribute, dresstao/product-attribute, druidoo-dev/product-attribute, eLBati/product-attribute, ecosoft-odoo/product-attribute, edsnet/product-attribute, eezee-it/product-attribute, ehsu0407/product-attribute, emagdalenaC2i/product-attribute, ernestotejeda/product-attribute, erp-sysvine/product-attribute, esantos-octagono/product-attribute, esousy/product-attribute, espo-tony/product-attribute, estraka/product-attribute, eversatis/product-attribute, exosoftware/oca-product-attribute, factorlibre/product-attribute, fanha99/product-attribute, feketemihai/product-attribute, filoquin/product-attribute, foah/product-attribute, fr33co/product-attribute, fshah-initos/product-attribute, gabriele-baldessari/product-attribute, garzadekoster/product-attribute, gfcapalbo/product-attribute, gfwalters/product-attribute, gonxi/product-attribute, grant-thornton/product-attribute, grap/product-attribute, grindtildeath/product-attribute, gurneyalex/product-attribute, gustavovalverde/product-attribute, gustitammam/product-attribute, haroldtamo/product-attribute, hbrunn/product-attribute, hibou-io/oca-product-attribute, hprasetyou/product-attribute, hurrinico/product-attribute, i-vyshnevska/product-attribute, iamyeonhan/product-attribute, ilyasProgrammer/product-attribute, imremazsar/product-attribute, incaser/product-attribute, initOS/product-attribute, it-projects-llc/product-attribute, itmyit/product-attribute, jasonlc1478/product-attribute, jhumfer/product-attribute, jimmyec/product-attribute, jjscarafia/product-attribute, joergfederspiel/product-attribute, joseluisbossio/product-attribute, jvpascual/product-attribute, jweste/product-attribute, kevinkhao/product-attribute, kholioeg/product-attribute, kittiu/product-attribute, kmee/product-attribute, kos94ok-3D/product-attribute, kvaldivia/product-attribute, leemannd/product-attribute, legalsylvain/product-attribute, lfreeke/product-attribute, lideritjnma/product-attribute, maiolif/product-attribute, maljac/product-attribute, marionumza/product-attribute, misern2/product-attribute, mohamedhagag/product-attribute, molandtoxx/product-attribute, mongramosjr/product-attribute, ncir-rami/product-attribute, nick2474/product-attribute, niulinlnc/product-attribute, noorealam96/product-attribute, nouhl/product-attribute, ntsirintanis/product-attribute, nzroof/product-attribute, odoobgorg/OCA-product-attribute, odoospace/product-attribute, oerp-canada/product-attribute, omalbastin/product-attribute, one2pret/product-attribute, open-synergy/product-attribute, osiell/product-attribute, osvalr/product-attribute, ovnicraft/product-attribute, p-tombez/product-attribute, phuctranerp/product-attribute, popcomputadores-desenv/product-attribute, presenceverte/product-attribute, pscloud/product-attribute, puchisco/product-attribute, pythoner-3k/product-attribute, qasimfaheem7/product-attribute, qtheuret/product-attribute, quentinDupont/product-attribute, raizs/product-attribute, rdeheele/product-attribute, redblow/product-attribute, rmfondi/product-attribute, rossasa/product-attribute, royalline1/product-attribute, rsullivan2704/product-attribute, rubencabrera/product-attribute, rven/product-attribute, sacodoo/product-attribute, safecoms/product-attribute, samsagaz/product-attribute, sanube/product-attribute, sc4you/product-attribute, sebastiken/product-attribute, sendalpegat/product-attribute, sergio-teruel/product-attribute, sergiocorato/product-attribute, sewisoft/product-attribute, shepilov-vladislav/product-attribute, simahawk/product-attribute, simplifysolutions/product-attribute, sitthykun/product-attribute, smurf-U/product-attribute, sodexis/product-attribute, solvosci/product-attribute, sudhir-erpharbor/product-attribute, sunflowerit/product-attribute, sunshineLhj/product-attribute, sylvainvh/product-attribute, takinobori/oca-product-attribute, takobi-online/product-attribute, tangaraj/product-attribute, tbaden/product-attribute, tegin/product-attribute, tfossoulw/product-attribute, tjuola/product-attribute, tonygalmiche/product-attribute, uktc87504/product-attribute, unitek-solusi/OCA-product-attribute, unwasted/product-attribute, urbmend26/product-attribute, ursais/product-attribute, usmcgwg/product-attribute, valley51/product-attribute, valmarnet/product-attribute, vasanthsodexis/product-attribute, vatsalaxis/product-attribute, vdedyukhin/product-attribute, versada/product-attribute, veryberry/product-attribute, vialaurea/OCA-product-attribute, vinclar/product-attribute, visztani/product-attribute, wahello/product-attribute, westlyou/product-attribute, willmakenoise/product-attribute, wrhansen/product-attribute, x0rzkov/odoo-product-attribute, xt0ph/product-attribute, xtendoo-corporation/product-attribute, xtof-osd/product-attribute, y2gsmith/product-attribute, yasmanycastillo/product-attribute, yelizariev/product-attribute, yostashiro/product-attribute, ypapouin/product-attribute, yuriqp/product-attribute, zeroheure/product-attribute, zeroincombenze/product-attribute, zhuyangbin/product-attribute, and zlf4535/product-attribute

<h1 class="title">Product Profile</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/product-attribute/tree/12.0/product_profile"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_profile"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/135/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module provides easier products configuration (in one click). It allows to configure a product template with only one field.</p> <blockquote> <div class="figure"> <img alt="profile field on product" src="https://raw.githubusercontent.com/OCA/product-attribute/12.0/product_profile/static/img/field.png" style="width: 600px;" /> </div> </blockquote> <p><strong>Main use case</strong>: 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.</p> <p>You are concerned that at any time a product might be not configured correctly: this module is your friend.</p> <p>Thanks to this module, a lot of complexity becomes hidden (default behavior) to the end user and usability is optimal.</p> <p>It eases as well the data migration by only specifying the profile field instead of all fields which depend on it.</p> <p>Note: This module is meant to be used by skilled people in database fields creation within the ERP framework.</p> <p>Additional feature: a default value can be attached to a profile (see § Configuration, part 3)</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li> <li><a class="reference internal" href="#usage" id="id2">Usage</a></li> <li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li> <li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id5">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id6">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li> </ul> </li> </ul> </div> <a name="configuration"></a> <h2><a class="toc-backref" href="#id1">Configuration</a></h2> <ol class="arabic"> <li><p class="first">Create your own profile here: Sales &gt; Configuration &gt; Product &gt; Product Profiles</p> <div class="figure"> <img alt="profile list" src="https://raw.githubusercontent.com/OCA/product-attribute/12.0/product_profile/static/img/list.png" style="width: 600px;" /> </div> </li> <li><p class="first">Extend &quot;product.profile&quot; model to add fields from product.template, either in normal mode or default mode (see note section below). These fields should be identical to their original fields <strong>(especially &quot;required&quot; field attribute)</strong>.</p> <pre> <code lang="python">class ProductProfile(models.Model): &quot;&quot;&quot; Require dependency on sale, purchase and point_of_sale modules &quot;&quot;&quot; _inherit = 'product.profile' def _get_types(self): return [('product', 'Stockable Product'), ('consu', 'Consumable'), ('service', 'Service')] sale_ok = fields.Boolean( string='Can be Sold', help=&quot;Specify if the product can be selected in a sales order line.&quot;) purchase_ok = fields.Boolean( string='Can be Purchased') available_in_pos = fields.Boolean()</code> </pre> </li> <li><p class="first">Insert data (xml or csv) and define values for each field defined above for each configuration scenario</p> </li> </ol> <p>Note : You might want to declare profile fields as defaults. To do this, just prefix the field with &quot;profile_default&quot;.</p> <blockquote> <pre> <code lang="python">class ProductProfile(models.Model): profile_default_categ_id = fields.Many2one( 'product.category', string='Default category') profile_default_route_ids = fields.Many2many( 'stock.location.route', string=u'Default Routes', domain=&quot;[('product_selectable', '=', True)]&quot;, help=&quot;Depending on the modules installed, this will allow &quot; &quot;you to define the route of the product: &quot; &quot;whether it will be bought, manufactured, MTO/MTS,...&quot;)</code> </pre> </blockquote> <p>Default fields only influence the records the first time they are set. - if the profile is modified, changes are not propagated to all the records that have this profile - if the record previously had another profile, changing profile will not influence default values</p> <a name="usage"></a> <h2><a class="toc-backref" href="#id2">Usage</a></h2> <p>Assign a value to the profile field in the product template form. Then, all fields which depend on this profile will be set to the right value at once.</p> <p>If you deselect the profile value, all these fields keep the same value and you can change them manually (back to standard behavior).</p> <p>Install <strong>Product Profile Example</strong> module to see a use case in action.</p> <p>Profiles are also defined as search filter and group.</p> <a name="known-issues-roadmap"></a> <h2><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h2> <ul class="simple"> <li>Streamlined behaviour of default/nondefault fields in every situation</li> <li>More robust/less error-prone functionality for required fields or fields implicated in workflows</li> <li>More flexible/configurable behaviour for profile fields (instead of only default/nondefault fields)</li> </ul> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id4">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/product-attribute/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_profile%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id5">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id6">Authors</a></h3> <ul class="simple"> <li>Akretion</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id7">Contributors</a></h3> <ul class="simple"> <li>David BEAL &lt;<a class="reference external" href="mailto:david.beal&#64;akretion.com">david.beal&#64;akretion.com</a>&gt;</li> <li>Sébastien BEAU &lt;<a class="reference external" href="mailto:sebastien.beau&#64;akretion.com">sebastien.beau&#64;akretion.com</a>&gt;</li> <li>Abdessamad HILALI &lt;<a class="reference external" href="mailto:abdessamad.hilali&#64;akretion.com">abdessamad.hilali&#64;akretion.com</a>&gt;</li> <li>Kevin Khao &lt;<a class="reference external" href="mailto:kevin.khao&#64;akretion.com">kevin.khao&#64;akretion.com</a>&gt;</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id8">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p> <p><a class="reference external" href="https://github.com/bealdav"><img alt="bealdav" src="https://github.com/bealdav.png?size=40px" /></a> <a class="reference external" href="https://github.com/sebastienbeau"><img alt="sebastienbeau" src="https://github.com/sebastienbeau.png?size=40px" /></a> <a class="reference external" href="https://github.com/kevinkhao"><img alt="kevinkhao" src="https://github.com/kevinkhao.png?size=40px" /></a></p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/12.0/product_profile">OCA/product-attribute</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>