Search 1.9 billion lines of Odoo code on GitHub

mrp_bom_attribute_match

Author: Ilyas, Ooops, Odoo Community Association (OCA)
License: AGPL-3
Branch: 15.0-mig-mrp_bom_attribute_match
Repository: camptocamp/manufacture
Dependencies: mrp
Languages: HTML (386, 28.8%), PO File (163, 12.2%), Python (655, 49.0%), XML (28, 2.1%), and reStructuredText (106, 7.9%)
Other branches: 14.0-fix-mrp_unbuild_valuation_layer_link, 15.0-add-mrp-workcenter-category, 15.0-add-operation-ref, 15.0-add-production-split, 15.0-add-workorder-ref, merge-branch-2873-15.0.0.10.0, merge-branch-2873-15.0.0.11.0, merge-branch-2873-15.0.0.8.0, merge-branch-2873-15.0.0.8.1, merge-branch-2873-15.0.0.9.0, merge-branch-2873-bsdec-184-add_red_path-6622623c, merge-branch-2873-bsdec-196-bom_propagation_variant-6622623c, merge-branch-2873-bsdec-196-bom_propagation_variant-eb099eab, merge-branch-2873-bsdec-218-lock_workorder_planning-a5be773a, merge-branch-2965-15.0.0.4.0, merge-branch-2965-15.0.0.4.1, merge-branch-2965-15.0.0.4.2, merge-branch-2965-15.0.1.0.0, merge-branch-2965-15.0.1.0.1, merge-branch-2965-15.0.1.0.2, merge-branch-2965-15.0.1.0.3, merge-branch-2965-15.0.1.0.4, merge-branch-2965-15.0.1.0.5, merge-branch-2965-15.0.1.1.0, merge-branch-2965-2654-1eafe757, merge-branch-2965-2654-948b7282, merge-branch-2965-2655-27c150ce, merge-branch-2965-2655-89f73965, merge-branch-2965-2655-b659a414, merge-branch-2965-2655-f0896f35, merge-branch-2965-2675-983c7f6e, merge-branch-2965-2688-016b0388, merge-branch-2965-2735-3b80b0d4, merge-branch-2965-2735-8142ba98, merge-branch-2965-2735-9013583a, merge-branch-2965-2756-0a75aadd, merge-branch-2965-2756-c4068aab, merge-branch-2965-2756-c4f307fb, merge-branch-2965-2756-e2002883, merge-branch-2965-2773-30cbd1cb, merge-branch-2965-bssbg-2702-09e64f2d, merge-branch-2965-remove-pendings-0bd6a299, merge-branch-2965-remove-pendings-88c80e03, merge-branch-3095-15.0.0.6.0, merge-branch-3095-15.0.0.7.0, merge-branch-3095-15.0.0.8.0, merge-branch-3095-15.0.0.8.1, merge-branch-3095-15.0.0.8.2, merge-branch-3095-259-708ea653, merge-branch-3095-259-d4756a2b, and merge-branch-3095-338-cf260938
Other repositories: Change2improve/manufacture, Daniel-CA/manufacture, Darknroses/manufacture, Escodoo/manufacture, ForgeFlow/manufacture, Gabinete-Digital/manufacture, Jarsa-dev/manufacture, Jarsa/manufacture, OCA/manufacture, Tecnativa/manufacture, akretion/manufacture, alfredoavanzosc/manufacture, aurestic/manufacture, brain-tec/manufacture, enmingc/manufacture, grindtildeath/manufacture, kmee/manufacture, lbelorgey/manufacture, mymage/manufacture, and ursais/manufacture

<h1 class="title">BOM Attribute Match</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/manufacture/tree/14.0/mrp_bom_attribute_match"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_bom_attribute_match"><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/129/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module addresses the BoM case where the product to manufacture has one attribute with tens or hundreds of values (usually attribute &quot;color&quot;, eg: &quot;Configurable Desk&quot; can be produced in 900 different colors).</p> <p>Creating a dynamic BoM currently requires adding one BoM line for each attribute value to match component variant with attribute value (eg: component &quot;Desk board (Green)&quot; to be applied to variant &quot;Green&quot;).</p> <p>This has 3 downsides:</p> <ul class="simple"> <li>BoM lines proliferation (more error prone)</li> <li>Difficult to update in case a new attribute value (new color paint) is added</li> <li>Difficult to update in case base component changes.</li> </ul> <p>This module allows to use a product template as component in BoM lines, automatically matching component variant to use in MO line with the attribute value selected for manufacture.</p> <p>Eg: Product template &quot;Desk Board&quot; is added to BoM line for product &quot;Configurable Desk&quot;; match is made on attribute &quot;Color&quot;. In MO, if product to manufacture is &quot;Configurable Desk (Steel, Pink)&quot;, MO line will have component &quot;Desk Board (Pink)&quot;.</p> <p>Using the same BoM, if product to manufacture is &quot;Configurable Desk (Steel, Yellow)&quot;, MO line will have component &quot;Desk Board (Yellow)&quot;.</p> <p>The flow is valid also if the Component (Product Template) has more than one attribute matching the product to manufacture; in this case, on MO line the component variant will be the one matching multiple attribute values for the product to manufacture.</p> <p>Various checks are in place to make sure this flow is not disrupted:</p> <ul> <li><p class="first">user cannot add a product in field &quot;Component (Product Template)&quot; which:</p> <blockquote> <p>does not have matching attributes with product to manufacture</p> <p>has a different variant-generating attribute than the product to manufacture</p> </blockquote> </li> <li><p class="first">Adding a new variant-generating attribute to a product used as &quot;Component (Product Template)&quot; raises an error if the attribute is not included in all the products to manufacture where component is referenced.</p> </li> <li><p class="first">Removing an attribute used for BoM attribute matching from product to manufacture raises an error.</p> </li> <li><p class="first">On a BoM line with Component (Product Template) set, an attribute value of attributes referenced in &quot;Match on attribute&quot; field cannot be used in field &quot;Apply to variant&quot;.</p> </li> <li><p class="first">If attribute value for matching attribute in manufactured product is not present in component (product template), the BoM line is skipped in MO.</p> </li> </ul> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#usage" id="id1">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id3">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id4">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li> </ul> </li> </ul> </div> <a name="usage"></a> <h2><a class="toc-backref" href="#id1">Usage</a></h2> <p>Using this module you can have dynamic components of a BOM. It will allow you to have only 1 line in the BOM if you have hundreds of attribute values for manufacturing product and hundreds of attributes values of component (material).</p> <p>How to use</p> <blockquote> <ol class="arabic simple"> <li>Create a product to produce e.g. Desk.</li> <li>Set 1 attribute (e.g. Color). And select possible values for it.</li> <li>Create a component product (material) e.g. Plastic.</li> <li>Set 1 attribute (Color). And select possible values for it.</li> <li>Create a BOM.</li> <li>Select a manufacturing product Desk.</li> <li>Add a BOM line. Select Component (product template) Plastic.</li> <li>You will see Color attribute appeared in the Apply On Attribute field.</li> <li>Save the BOM.</li> <li>Create Manufacturing Order. Select Desk with e.g. Red color to produce and BOM you created.</li> <li>You will see in the component list Plastic added with corresponding (red) color.</li> </ol> </blockquote> <p>Consider, that to use this feature component must have only 1 attribute. And a values of this attribute of a manufacturing product should be available for a component.</p> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/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/manufacture/issues/new?body=module:%20mrp_bom_attribute_match%0Aversion:%2014.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="#id3">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id4">Authors</a></h3> <ul class="simple"> <li>Ilyas</li> <li>Ooops</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id5">Contributors</a></h3> <ul class="simple"> <li>Ooops404 &lt;<a class="reference external" href="https://ooops404.com">https://ooops404.com</a>&gt;<ul> <li>Ilyas</li> </ul> </li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id6">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>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/14.0/mrp_bom_attribute_match">OCA/manufacture</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>