first push message
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="ir_cron_check_expired_trials" model="ir.cron">
|
||||
<field name="name">Check Expired Trials</field>
|
||||
<field name="model_id" ref="model_user_subscription"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.check_expired_trials()</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Email Verification Template -->
|
||||
<record id="email_verification_template" model="mail.template">
|
||||
<field name="name">Trial Signup - Email Verification</field>
|
||||
<field name="model_id" ref="model_user_subscription"/>
|
||||
<field name="subject">Verify your email to start your free trial</field>
|
||||
<field name="email_to">{{ object.user_email }}</field>
|
||||
<field name="body_html" type="html">
|
||||
<![CDATA[
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; font-size: 12px; width: 100%; border-collapse:separate;border-spacing: 0px;">
|
||||
<tr>
|
||||
<td align="center" valign="top" style="padding: 32px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 600px; background-color: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<tr>
|
||||
<td style="padding: 32px; text-align: center;">
|
||||
<h1 style="color: #714B67; margin-bottom: 16px;">Welcome to Odoo Trial!</h1>
|
||||
<p style="font-size: 16px; color: #666; margin-bottom: 24px;">
|
||||
Thank you for signing up for a 15-day free trial.<br/>
|
||||
Please verify your email address to continue.
|
||||
</p>
|
||||
<a t-attf-href="/trial/verify-email?subscription={{ object.id }}&token={{ object.access_token }}"
|
||||
style="display: inline-block; padding: 12px 32px; background-color: #714B67; color: white; text-decoration: none; border-radius: 4px; font-weight: bold; margin: 16px 0;">
|
||||
Verify Email Address
|
||||
</a>
|
||||
<p style="font-size: 14px; color: #999; margin-top: 24px;">
|
||||
Or copy and paste this link in your browser:<br/>
|
||||
<a t-attf-href="/trial/verify-email?subscription={{ object.id }}&token={{ object.access_token }}"
|
||||
style="color: #714B67; word-break: break-all;">
|
||||
/trial/verify-email?subscription={{ object.id }}
|
||||
</a>
|
||||
</p>
|
||||
<p style="font-size: 12px; color: #999; margin-top: 32px; border-top: 1px solid #eee; padding-top: 16px;">
|
||||
This link will expire in 24 hours.<br/>
|
||||
If you didn't request this trial, you can safely ignore this email.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Email Credentials Template -->
|
||||
<record id="email_credentials_template" model="mail.template">
|
||||
<field name="name">Trial Ready - Admin Credentials</field>
|
||||
<field name="model_id" ref="model_user_subscription"/>
|
||||
<field name="subject">Your Odoo instance is ready! - Login credentials inside</field>
|
||||
<field name="email_to">{{ object.user_email }}</field>
|
||||
<field name="body_html" type="html">
|
||||
<![CDATA[
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; font-size: 12px; width: 100%; border-collapse:separate;border-spacing: 0px;">
|
||||
<tr>
|
||||
<td align="center" valign="top" style="padding: 32px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 600px; background-color: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<tr>
|
||||
<td style="padding: 32px;">
|
||||
<h1 style="color: #28a745; margin-bottom: 16px; text-align: center;">
|
||||
🎉 Your Instance is Ready!
|
||||
</h1>
|
||||
<p style="font-size: 16px; color: #666; margin-bottom: 24px;">
|
||||
Great news! Your Odoo instance has been successfully created and is ready to use.
|
||||
</p>
|
||||
|
||||
<table border="1" cellpadding="10" cellspacing="0" style="width: 100%; background-color: #f8f9fa; border-radius: 4px; margin: 24px 0;">
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #e9ecef;">Instance URL:</td>
|
||||
<td>
|
||||
<a t-attf-href="https://{{ object.active_database_id.full_domain }}"
|
||||
style="color: #714B67; font-weight: bold;">
|
||||
https://{{ object.active_database_id.full_domain }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #e9ecef;">Admin Login:</td>
|
||||
<td style="font-family: monospace; background-color: white;">{{ object.active_database_id.admin_login }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #e9ecef;">Password:</td>
|
||||
<td style="font-family: monospace; background-color: white;">{{ object.active_database_id.admin_password }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="background-color: #fff3cd; border-left: 4px solid #ffc107; padding: 16px; margin: 24px 0;">
|
||||
<strong style="color: #856404;">⚠️ Security Notice:</strong>
|
||||
<p style="margin: 8px 0 0 0; color: #856404;">
|
||||
Please change your password immediately after your first login.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; margin: 32px 0;">
|
||||
<a t-attf-href="https://{{ object.active_database_id.full_domain }}"
|
||||
style="display: inline-block; padding: 12px 32px; background-color: #28a745; color: white; text-decoration: none; border-radius: 4px; font-weight: bold;">
|
||||
Launch Your Instance
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="background-color: #d4edda; border: 1px solid #c3e6cb; border-radius: 4px; padding: 16px; margin: 24px 0;">
|
||||
<h3 style="color: #155724; margin-top: 0;">Trial Details:</h3>
|
||||
<ul style="margin: 0; padding-left: 20px; color: #155724;">
|
||||
<li><strong>Duration:</strong> 15 days</li>
|
||||
<li><strong>Start Date:</strong> <t t-esc="object.trial_start_date.strftime('%Y-%m-%d') if object.trial_start_date else 'N/A'"/></li>
|
||||
<li><strong>End Date:</strong> <t t-esc="object.trial_end_date.strftime('%Y-%m-%d') if object.trial_end_date else 'N/A'"/></li>
|
||||
<li><strong>Selected Apps:</strong> <t t-esc="', '.join([app.app_name for app in object.selected_app_ids])"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 14px; color: #999; margin-top: 32px; border-top: 1px solid #eee; padding-top: 16px; text-align: center;">
|
||||
Need help? Contact our support team at support@yourcompany.com
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Payment Receipt Template -->
|
||||
<record id="email_payment_receipt" model="mail.template">
|
||||
<field name="name">Subscription Payment Receipt</field>
|
||||
<field name="model_id" ref="model_user_subscription"/>
|
||||
<field name="subject">Payment Receipt - {{ object.subscription_plan_id.name }}</field>
|
||||
<field name="email_to">{{ object.user_email }}</field>
|
||||
<field name="body_html" type="html">
|
||||
<![CDATA[
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; font-size: 12px; width: 100%; border-collapse:separate;border-spacing: 0px;">
|
||||
<tr>
|
||||
<td align="center" valign="top" style="padding: 32px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 600px; background-color: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<tr>
|
||||
<td style="padding: 32px;">
|
||||
<h1 style="color: #28a745; margin-bottom: 16px; text-align: center;">
|
||||
✓ Payment Successful
|
||||
</h1>
|
||||
<p style="text-align: center; font-size: 16px; color: #666; margin-bottom: 32px;">
|
||||
Thank you for your subscription!
|
||||
</p>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; margin: 24px 0;">
|
||||
<tr>
|
||||
<td style="padding: 12px; background-color: #f8f9fa; border-radius: 4px;">
|
||||
<strong>Receipt Number:</strong> {{ object.payment_reference }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 12px;">
|
||||
<strong>Plan:</strong> {{ object.subscription_plan_id.name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 12px; background-color: #f8f9fa; border-radius: 4px;">
|
||||
<strong>Amount Paid:</strong> ${{ object.subscription_plan_id.price }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 12px;">
|
||||
<strong>Subscription Period:</strong>
|
||||
<t t-if="object.subscription_start_date" t-esc="object.subscription_start_date.strftime('%Y-%m-%d')"/>
|
||||
to
|
||||
<t t-if="object.subscription_end_date" t-esc="object.subscription_end_date.strftime('%Y-%m-%d')"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="text-align: center; margin: 32px 0;">
|
||||
<a t-attf-href="https://{{ object.active_database_id.full_domain }}"
|
||||
style="display: inline-block; padding: 12px 32px; background-color: #714B67; color: white; text-decoration: none; border-radius: 4px; font-weight: bold;">
|
||||
Access Your Instance
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 14px; color: #999; margin-top: 32px; border-top: 1px solid #eee; padding-top: 16px; text-align: center;">
|
||||
This is an automated receipt. Please keep it for your records.<br/>
|
||||
Questions? Contact billing@yourcompany.com
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Trial Plan -->
|
||||
<record id="subscription_plan_trial" model="subscription.plan">
|
||||
<field name="name">Free Trial</field>
|
||||
<field name="plan_code">trial</field>
|
||||
<field name="duration_months">0</field>
|
||||
<field name="price">0.00</field>
|
||||
<field name="is_trial">True</field>
|
||||
<field name="trial_days">15</field>
|
||||
<field name="max_apps">10</field>
|
||||
<field name="max_users">1</field>
|
||||
<field name="max_storage_mb">100</field>
|
||||
<field name="description">15-day free trial with full access to all features</field>
|
||||
<field name="features">10 Apps, 1 User, 100MB Storage, Email Support</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<!-- 3 Months Plan -->
|
||||
<record id="subscription_plan_3months" model="subscription.plan">
|
||||
<field name="name">3 Months Plan</field>
|
||||
<field name="plan_code">3_months</field>
|
||||
<field name="duration_months">3</field>
|
||||
<field name="price">89.99</field>
|
||||
<field name="is_trial">False</field>
|
||||
<field name="max_apps">10</field>
|
||||
<field name="max_users">3</field>
|
||||
<field name="max_storage_mb">500</field>
|
||||
<field name="description">Perfect for short-term projects and testing</field>
|
||||
<field name="features">10 Apps, 3 Users, 500MB Storage, Email Support, Automatic Backups</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<!-- 6 Months Plan -->
|
||||
<record id="subscription_plan_6months" model="subscription.plan">
|
||||
<field name="name">6 Months Plan</field>
|
||||
<field name="plan_code">6_months</field>
|
||||
<field name="duration_months">6</field>
|
||||
<field name="price">159.99</field>
|
||||
<field name="is_trial">False</field>
|
||||
<field name="max_apps">10</field>
|
||||
<field name="max_users">5</field>
|
||||
<field name="max_storage_mb">1024</field>
|
||||
<field name="description">Great for growing businesses</field>
|
||||
<field name="features">10 Apps, 5 Users, 1GB Storage, Priority Support, Automatic Backups</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<!-- 1 Year Plan -->
|
||||
<record id="subscription_plan_1year" model="subscription.plan">
|
||||
<field name="name">1 Year Plan</field>
|
||||
<field name="plan_code">1_year</field>
|
||||
<field name="duration_months">12</field>
|
||||
<field name="price">299.99</field>
|
||||
<field name="is_trial">False</field>
|
||||
<field name="max_apps">10</field>
|
||||
<field name="max_users">10</field>
|
||||
<field name="max_storage_mb">2048</field>
|
||||
<field name="description">Best value - Save 17% compared to monthly billing</field>
|
||||
<field name="features">10 Apps, 10 Users, 2GB Storage, Priority Support, Automatic Backups, 99.9% Uptime SLA</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user