mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[OU-ADD] rma: Add migration script.
TT37300
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Return Merchandise Authorization Management",
|
"name": "Return Merchandise Authorization Management",
|
||||||
"summary": "Return Merchandise Authorization (RMA)",
|
"summary": "Return Merchandise Authorization (RMA)",
|
||||||
"version": "15.0.1.0.0",
|
"version": "15.0.1.0.1",
|
||||||
"development_status": "Production/Stable",
|
"development_status": "Production/Stable",
|
||||||
"category": "RMA",
|
"category": "RMA",
|
||||||
"website": "https://github.com/OCA/rma",
|
"website": "https://github.com/OCA/rma",
|
||||||
|
|||||||
99
rma/migrations/15.0.1.0.0/noupdate_changes.xml
Normal file
99
rma/migrations/15.0.1.0.0/noupdate_changes.xml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8' ?>
|
||||||
|
<odoo>
|
||||||
|
<record id="mail_template_rma_notification" model="mail.template">
|
||||||
|
<field name="email_from">{{object.user_id.email_formatted}}</field>
|
||||||
|
<field name="partner_to">{{object.partner_id.id}}</field>
|
||||||
|
<field
|
||||||
|
name="subject"
|
||||||
|
>{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }})</field>
|
||||||
|
<field name="report_name">{{(object.name or '')}}</field>
|
||||||
|
<field name="lang">{{object.partner_id.lang}}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Dear
|
||||||
|
<t t-out="object.partner_id.name" />
|
||||||
|
<t t-if="object.partner_id.parent_id">
|
||||||
|
<t t-out="object.partner_id.parent_id.name" />
|
||||||
|
</t>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Here is the RMA
|
||||||
|
<strong>
|
||||||
|
<t t-out="object.name" />
|
||||||
|
</strong>
|
||||||
|
from
|
||||||
|
<t t-out="object.company_id.name" />
|
||||||
|
.
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Do not hesitate to contact us if you have any question.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="mail_template_rma_receipt_notification" model="mail.template">
|
||||||
|
<field name="email_from">{{object.user_id.email_formatted }}</field>
|
||||||
|
<field name="partner_to">{{object.partner_id.id}}</field>
|
||||||
|
<field
|
||||||
|
name="subject"
|
||||||
|
>{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }}) products received</field>
|
||||||
|
<field name="report_name">{{(object.name or '')}}</field>
|
||||||
|
<field name="lang">{{object.partner_id.lang}}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Dear
|
||||||
|
<t t-out="object.partner_id.name" />
|
||||||
|
<t t-if="object.partner_id.parent_id">
|
||||||
|
<t t-out="object.partner_id.parent_id.name" />
|
||||||
|
</t>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
The products for your RMA
|
||||||
|
<strong>
|
||||||
|
<t t-out="object.name" />
|
||||||
|
</strong>
|
||||||
|
from
|
||||||
|
<t t-out="object.company_id.name" />
|
||||||
|
have been received in our warehouse.
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Do not hesitate to contact us if you have any question.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="mail_template_rma_draft_notification" model="mail.template">
|
||||||
|
<field name="email_from">{{object.user_id.email_formatted}}</field>
|
||||||
|
<field name="partner_to">{{object.partner_id.id}}</field>
|
||||||
|
<field
|
||||||
|
name="subject"
|
||||||
|
>{{object.company_id.name}} Your RMA has been succesfully created (Ref {{object.name or 'n/a' }})</field>
|
||||||
|
<field name="report_name">{{(object.name or '')}}</field>
|
||||||
|
<field name="lang">{{object.partner_id.lang}}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Dear
|
||||||
|
<t t-out="object.partner_id.name" />
|
||||||
|
<t t-if="object.partner_id.parent_id">
|
||||||
|
<t t-out="object.partner_id.parent_id.name" />
|
||||||
|
</t>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
You've succesfully placed your RMA
|
||||||
|
<strong>
|
||||||
|
<t t-out="object.name" />
|
||||||
|
</strong>
|
||||||
|
on
|
||||||
|
<t t-out="object.company_id.name" />
|
||||||
|
. Our team will check it and will validate it as soon as possible.
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Do not hesitate to contact us if you have any question.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
18
rma/migrations/15.0.1.0.0/post-migration.py
Normal file
18
rma/migrations/15.0.1.0.0/post-migration.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from openupgradelib import openupgrade
|
||||||
|
|
||||||
|
|
||||||
|
@openupgrade.migrate()
|
||||||
|
def migrate(env, version):
|
||||||
|
openupgrade.load_data(env.cr, "rma", "migrations/15.0.1.0.0/noupdate_changes.xml")
|
||||||
|
openupgrade.delete_record_translations(
|
||||||
|
env.cr,
|
||||||
|
"rma",
|
||||||
|
[
|
||||||
|
"mail_template_rma_notification",
|
||||||
|
"mail_template_rma_receipt_notification",
|
||||||
|
"mail_template_rma_draft_notification",
|
||||||
|
],
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user