Search 1.9 billion lines of Odoo code on GitHub

product_profile

Author: Akretion, Odoo Community Association (OCA)
License: AGPL-3
Branch: 8.0
Repository: Change2improve/product-attribute
Dependencies: base_setup, and product
Languages: HTML (117, 10.8%), PO File (557, 51.6%), Python (243, 22.5%), XML (72, 6.7%), and reStructuredText (90, 8.3%)
Other branches: 12.0, and 14.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

<img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg"> <a name="product-profile"></a> <h2>Product Profile</h2> <p>This module provides easier products configuration (in one click). It allows to configure a product template with only one field.</p> <img alt="static/description/field.png" src="static/description/field.png" /> <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> <a name="configuration"></a> <h2>Configuration</h2> <ol class="arabic simple"> <li>Create your own profile here: Sales &gt; Configuration &gt; Product Categories and Attributes &gt; Product Profiles</li> </ol> <img alt="static/description/list.png" src="static/description/list.png" /> <ol class="arabic simple" start="2"> <li>To have more fields available to attach to this profile you must define these fields in the model 'product.profile' in your own module If the field name (and its type) is the same than those in 'product.template' then values of these will be populated automatically in 'product.template' Example of fields declaration in your own module:</li> </ol> <p><a href="#id1"><span class="problematic" id="id2">``</span></a><a href="#id3"><span class="problematic" id="id4">`</span></a>python</p> <dl class="docutils"> <dt>class ProductProfile(models.Model):</dt> <dd><p class="first">&quot;&quot;&quot; Require dependency on sale, purchase and point_of_sale modules &quot;&quot;&quot;</p> <p>_inherit = 'product.profile'</p> <dl class="docutils"> <dt>def _get_types(self):</dt> <dd><dl class="first last docutils"> <dt>return [('product', 'Stockable Product'),</dt> <dd>('consu', 'Consumable'), ('service', 'Service')]</dd> </dl> </dd> <dt>sale_ok = fields.Boolean(</dt> <dd>string='Can be Sold', help=&quot;Specify if the product can be selected in a sales order line.&quot;)</dd> <dt>purchase_ok = fields.Boolean(</dt> <dd>string='Can be Purchased')</dd> </dl> <p class="last">available_in_pos = fields.Boolean()</p> </dd> </dl> <p><a href="#id5"><span class="problematic" id="id6">``</span></a><a href="#id7"><span class="problematic" id="id8">`</span></a></p> <ol class="arabic simple" start="3"> <li>Second behavior: you might want to add a default behavior to these fields: in this case use prefix 'profile_default_' for your field name in 'product.profile' model.</li> </ol> <p><a href="#id9"><span class="problematic" id="id10">``</span></a><a href="#id11"><span class="problematic" id="id12">`</span></a>python</p> <dl class="docutils"> <dt>class ProductProfile(models.Model):</dt> <dd><p class="first">... profile_default_categ_id = fields.Many2one(</p> <blockquote> 'product.category', string='Default category')</blockquote> <dl class="last docutils"> <dt>profile_default_route_ids = fields.Many2many(</dt> <dd><p class="first">'stock.location.route', string=u'Default Routes', domain=&quot;[('product_selectable', '=', True)]&quot;, help=&quot;Depending on the modules installed, this will allow &quot;</p> <blockquote class="last"> &quot;you to define the route of the product: &quot; &quot;whether it will be bought, manufactured, MTO/MTS,...&quot;)</blockquote> </dd> </dl> </dd> </dl> <p><a href="#id13"><span class="problematic" id="id14">``</span></a><a href="#id15"><span class="problematic" id="id16">`</span></a></p> <blockquote> In this case 'categ_id' field (from product.template) is populated with 'profile_default_categ_id' value but can be updated manually by the user. Careful: each time you change profile, the default value is also populated whatever the previous value. Custom value is only keep if don't change the profile.</blockquote> <ol class="arabic simple" start="4"> <li>Insert data (xml or csv) and define values for each field defined above for each configuration scenario</li> </ol> <a name="usage"></a> <h2>Usage</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="bug-tracker"></a> <h2>Bug Tracker</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 feedback <a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_profile%0Aversion:%201.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">here</a>.</p> <a name="credits"></a> <h2>Credits</h2> <a name="contributors"></a> <h3>Contributors</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> </ul> <a name="iconography"></a> <h3>Iconography</h3> <p><a class="reference external" href="https://www.iconfinder.com/icondesigner">https://www.iconfinder.com/icondesigner</a></p> <a name="maintainer"></a> <h3>Maintainer</h3> <a class="reference external image-reference" href="http://odoo-community.org"><img alt="Odoo Community Association" src="http://odoo-community.org/logo.png" /></a> <p>This module is maintained by the OCA.</p> <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>To contribute to this module, please visit <a class="reference external" href="http://odoo-community.org">http://odoo-community.org</a>.</p>