Author: |
IT-Projects LLC, Eugene Molotov |
License: |
Other OSI approved licence |
Branch: |
14.0-ported |
Repository: |
em230418/saas-addons |
Dependencies: |
product,
and
sale |
Languages: |
Python (66, 31.9%),
XML (95, 45.9%),
and
reStructuredText (46, 22.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-prepare_before_port,
14.0-saas_backups,
and
15.0 |
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 "Users" with variants "Anually" and "Monthly" with different prices.
Other saas-related products can define <cite>product.template</cite> record and make variants by assigning
"Subscribtion: Annually" and "Subscribtion: Monthly" attribute values.</p>
<p>In python it looks like this:</p>
<pre>
<code lang="python">template = env["product.template"].create({"name": "Test SaaS Product"})
template_attribute_line = env["product.template.attribute.line"].create({
"product_tmpl_id": template.id,
"attribute_id": env.ref("saas_product.product_attribute_subscription").id,
"value_ids": [(6, 0, [
env.ref("saas_product.product_attribute_value_subscription_anually").id,
env.ref("saas_product.product_attribute_value_subscription_monthly").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>