- Introduced `saas.plan` model to define subscription plans with limits and pricing. - Created `saas.restaurant` model to manage restaurant tenants, including database provisioning and subscription management. - Implemented views for managing SaaS plans and restaurant tenants, including tree and form views. - Added security access rights for the new models. - Developed a backup management view for database backups. - Updated menu structure to include new SaaS management options. - Added Docker and deployment configurations for PostgreSQL, Redis, and Odoo services. - Included scaling guide and backup scripts for production environments. - Enhanced theme with new images and layout adjustments.
62 lines
2.2 KiB
XML
62 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Tree View -->
|
|
<record id="view_saas_plan_tree" model="ir.ui.view">
|
|
<field name="name">saas.plan.tree</field>
|
|
<field name="model">saas.plan</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="SaaS Plans">
|
|
<field name="name"/>
|
|
<field name="max_pos"/>
|
|
<field name="max_users"/>
|
|
<field name="price_monthly"/>
|
|
<field name="price_yearly"/>
|
|
<field name="active"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form View -->
|
|
<record id="view_saas_plan_form" model="ir.ui.view">
|
|
<field name="name">saas.plan.form</field>
|
|
<field name="model">saas.plan</field>
|
|
<field name="arch" type="xml">
|
|
<form string="SaaS Plan">
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_edit_only"/>
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Starter"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group string="Limits">
|
|
<field name="max_pos"/>
|
|
<field name="max_users"/>
|
|
</group>
|
|
<group string="Pricing">
|
|
<field name="price_monthly" widget="monetary"/>
|
|
<field name="price_yearly" widget="monetary"/>
|
|
<field name="active"/>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Action -->
|
|
<record id="action_saas_plan" model="ir.actions.act_window">
|
|
<field name="name">Subscription Plans</field>
|
|
<field name="res_model">saas.plan</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<!-- Menuitem -->
|
|
<menuitem id="menu_saas_plan"
|
|
name="Subscription Plans"
|
|
parent="menu_saas_configuration"
|
|
action="action_saas_plan"
|
|
sequence="10"/>
|
|
</odoo>
|