Search 1.9 billion lines of Odoo code on GitHub

saas_product

Author: IT-Projects LLC, Eugene Molotov
License: Other OSI approved licence
Branch: 15.0
Repository: em230418/saas-addons
Dependencies: product, and sale
Languages: Python (67, 31.8%), XML (95, 45.0%), and reStructuredText (49, 23.2%)
Other branches: 12.0-backports, 13.0, 13.0-prepare-to-port, 13.0-prepare-to-port2, 13.0-saas_apps_signup, 13.0-saas_hai, 14.0, 14.0-ported, 14.0-prepare_before_port, and 14.0-saas_backups
Other repositories: Enigma228322/saas-addons, it-projects-llc/saas-addons, and phlema/saas-addons

<a class="reference external image-reference" href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg"> </a> <a name="saas-product"></a> <h2>SaaS: Product</h2> <p>This technical module helps to create saas-related products.</p> <p>As example this module has product &quot;Users&quot; with variants &quot;Anually&quot; and &quot;Monthly&quot; with different prices. Other saas-related products can define <cite>product.template</cite> record and make variants by assigning &quot;Subscribtion: Annually&quot; and &quot;Subscribtion: Monthly&quot; attribute values.</p> <p>In python it looks like this:</p> <pre> <code lang="python">template = env[&quot;product.template&quot;].create({&quot;name&quot;: &quot;Test SaaS Product&quot;}) template_attribute_line = env[&quot;product.template.attribute.line&quot;].create({ &quot;product_tmpl_id&quot;: template.id, &quot;attribute_id&quot;: env.ref(&quot;saas_product.product_attribute_subscription&quot;).id, &quot;value_ids&quot;: [(6, 0, [ env.ref(&quot;saas_product.product_attribute_value_subscription_anually&quot;).id, env.ref(&quot;saas_product.product_attribute_value_subscription_monthly&quot;).id, ])] }) annually_value_id = template_attribute_line.product_template_value_ids[0] monthly_value_id = template_attribute_line.product_template_value_ids[1] product_annually = template._get_variant_for_combination(annually_value_id) product_monthly = template._get_variant_for_combination(monthly_value_id)</code> </pre> <a name="credits"></a> <h3>Credits</h3> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li><a class="reference external" href="https://it-projects.info/team/em230418">Eugene Molotov</a>:</li> </ul> <a name="sponsors"></a> <h4>Sponsors</h4> <ul class="simple"> <li><a class="reference external" href="https://it-projects.info">IT-Projects LLC</a></li> </ul> <a name="maintainers"></a> <h4>Maintainers</h4> <ul> <li><p class="first"><a class="reference external" href="https://it-projects.info">IT-Projects LLC</a></p> <blockquote> <p>To get a guaranteed support you are kindly requested to purchase the module at <a class="reference external" href="https://apps.odoo.com/apps/modules/14.0/saas_product/">odoo apps store</a>.</p> <p>Thank you for understanding!</p> <p><a class="reference external" href="https://www.it-projects.info/team">IT-Projects Team</a></p> </blockquote> </li> </ul> <a name="further-information"></a> <h3>Further information</h3> <p>Demo: <a class="reference external" href="http://runbot.it-projects.info/demo/saas-addons/14.0">http://runbot.it-projects.info/demo/saas-addons/14.0</a></p> <p>HTML Description: <a class="reference external" href="https://apps.odoo.com/apps/modules/14.0/saas_product/">https://apps.odoo.com/apps/modules/14.0/saas_product/</a></p> <p>Usage instructions: <a class="reference external" href="doc/index.rst">doc/index.rst</a></p> <p>Changelog: <a class="reference external" href="doc/changelog.rst">doc/changelog.rst</a></p> <p>Notifications on updates: <a class="reference external" href="https://github.com/it-projects-llc/saas-addons/commits/14.0/saas_product.atom">via Atom</a>, <a class="reference external" href="https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/saas-addons/commits/14.0/saas_product.atom">by Email</a></p> <p>Tested on Odoo 14.0 9e68ec931d254ba563b4a16afa38b6003336a7cf</p>