[MIG] website_rma: Migration to 15.0

This commit is contained in:
Nikolaus Weingartmair
2022-08-22 12:07:49 +02:00
parent 5de1e006f5
commit 7e26733c8d
6 changed files with 36 additions and 57 deletions

View File

@@ -3,21 +3,24 @@
{ {
"name": "Return Merchandise Authorization Management - Website Form", "name": "Return Merchandise Authorization Management - Website Form",
"summary": "Return Merchandise Authorization (RMA)", "summary": "Return Merchandise Authorization (RMA)",
"version": "14.0.1.0.0", "version": "15.0.1.0.0",
"development_status": "Production/Stable", "development_status": "Production/Stable",
"category": "RMA", "category": "RMA",
"website": "https://github.com/OCA/rma", "website": "https://github.com/OCA/rma",
"author": "Tecnativa, Odoo Community Association (OCA)", "author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["ernestotejeda"], "maintainers": ["ernestotejeda"],
"license": "AGPL-3", "license": "AGPL-3",
"depends": ["rma", "website_form"], "depends": ["rma", "website"],
"data": [ "data": [
"data/ir_model_data.xml", "data/ir_model_data.xml",
"views/assets.xml",
"views/request_rma_form.xml", "views/request_rma_form.xml",
"views/res_config_settings_views.xml", "views/res_config_settings_views.xml",
"views/website_rma_portal_templates.xml", "views/website_rma_portal_templates.xml",
"views/website_templates.xml", "views/website_templates.xml",
"data/website_data.xml", "data/website_data.xml",
], ],
"assets": {
"web.assets_frontend": ["/website_rma/static/src/js/website_rma.js"],
"web.assets_tests": ["/website_rma/static/src/js/website_rma.tour.js"],
},
} }

View File

@@ -5,10 +5,10 @@ import json
from odoo import http from odoo import http
from odoo.http import request from odoo.http import request
from odoo.addons.website_form.controllers.main import WebsiteForm from odoo.addons.website.controllers import form
class WebsiteForm(WebsiteForm): class WebsiteForm(form.WebsiteForm):
def insert_record(self, request, model, values, custom, meta=None): def insert_record(self, request, model, values, custom, meta=None):
res = super().insert_record(request, model, values, custom, meta) res = super().insert_record(request, model, values, custom, meta)
# Add the customer to the followers, the same as when creating # Add the customer to the followers, the same as when creating

View File

@@ -2,12 +2,10 @@
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda <!-- Copyright 2020 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo> <odoo>
<data>
<record id="request_rma_thanks_page" model="website.page"> <record id="request_rma_thanks_page" model="website.page">
<field name="url">/requestrma-thank-you</field> <field name="url">/requestrma-thank-you</field>
<field name="website_indexed" eval="False" /> <field name="website_indexed" eval="False" />
<field name="website_published">True</field> <field name="website_published">True</field>
<field name="view_id" ref="request_rma_thanks_page_view" /> <field name="view_id" ref="request_rma_thanks_page_view" />
</record> </record>
</data>
</odoo> </odoo>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="website_rma_assets_frontend" inherit_id="website.assets_frontend">
<xpath expr="script[last()]" position="after">
<script
type="text/javascript"
src="/website_rma/static/src/js/website_rma.tour.js"
/>
<script
type="text/javascript"
src="/website_rma/static/src/js/website_rma.js"
/>
</xpath>
</template>
</odoo>

View File

@@ -38,7 +38,7 @@
</section> </section>
<div class="request_rma_container"> <div class="request_rma_container">
<form <form
action="/website_form/" action="/website/form/"
method="post" method="post"
data-model_name="rma" data-model_name="rma"
data-success_page="/requestrma-thank-you" data-success_page="/requestrma-thank-you"
@@ -120,6 +120,8 @@
for="description" for="description"
>Description</label> >Description</label>
<div class="col-lg-7 col-md-8"> <div class="col-lg-7 col-md-8">
<!-- prettier-ignore -->
<textarea <textarea
class="form-control o_website_form_input" class="form-control o_website_form_input"
name="description" name="description"
@@ -148,9 +150,6 @@
id="oe_structure_website_rma_form_request_2" id="oe_structure_website_rma_form_request_2"
/> />
</div> </div>
<div class="col-lg-4">
<t t-call="website.company_description" />
</div>
</div> </div>
</div> </div>
<div <div
@@ -188,9 +187,6 @@
We will get back to you shortly. We will get back to you shortly.
</p> </p>
</div> </div>
<div class="col-lg-4">
<t t-call="website.company_description" />
</div>
</div> </div>
</div> </div>
<div <div

View File

@@ -2,24 +2,24 @@
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda <!-- Copyright 2020 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo> <odoo>
<template <template
id="contact_us_request_rma" id="contact_us_request_rma"
name="Request RMA" name="Request RMA"
inherit_id="website.contactus" inherit_id="website.contactus"
> >
<xpath
expr="//t[@t-call='website.company_description']/../../div[hasclass('col-lg-7')]" <xpath expr="//div[@id='wrap']" position="inside">
position="inside"
>
<div class="oe_structure">
<section class="s_text_block"> <section class="s_text_block">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-12 bg-300"> <div class="col-lg-12 bg-300">
<p style="margin-top: 1rem;"> <p style="margin-top: 1rem;">
You can request an RMA <strong> You can request an RMA
<strong>
<a href="/requestrma">here</a> <a href="/requestrma">here</a>
</strong> if you do not </strong>
if you do not
know the sales order from which it was made. know the sales order from which it was made.
If you know the sales order, go to it and click on the corresponding button. If you know the sales order, go to it and click on the corresponding button.
</p> </p>
@@ -27,7 +27,6 @@
</div> </div>
</div> </div>
</section> </section>
</div>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>