[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",
"summary": "Return Merchandise Authorization (RMA)",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["ernestotejeda"],
"license": "AGPL-3",
"depends": ["rma", "website_form"],
"depends": ["rma", "website"],
"data": [
"data/ir_model_data.xml",
"views/assets.xml",
"views/request_rma_form.xml",
"views/res_config_settings_views.xml",
"views/website_rma_portal_templates.xml",
"views/website_templates.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.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):
res = super().insert_record(request, model, values, custom, meta)
# Add the customer to the followers, the same as when creating

View File

@@ -2,12 +2,10 @@
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data>
<record id="request_rma_thanks_page" model="website.page">
<field name="url">/requestrma-thank-you</field>
<field name="website_indexed" eval="False" />
<field name="website_published">True</field>
<field name="view_id" ref="request_rma_thanks_page_view" />
</record>
</data>
<record id="request_rma_thanks_page" model="website.page">
<field name="url">/requestrma-thank-you</field>
<field name="website_indexed" eval="False" />
<field name="website_published">True</field>
<field name="view_id" ref="request_rma_thanks_page_view" />
</record>
</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>
<div class="request_rma_container">
<form
action="/website_form/"
action="/website/form/"
method="post"
data-model_name="rma"
data-success_page="/requestrma-thank-you"
@@ -120,6 +120,8 @@
for="description"
>Description</label>
<div class="col-lg-7 col-md-8">
<!-- prettier-ignore -->
<textarea
class="form-control o_website_form_input"
name="description"
@@ -148,9 +150,6 @@
id="oe_structure_website_rma_form_request_2"
/>
</div>
<div class="col-lg-4">
<t t-call="website.company_description" />
</div>
</div>
</div>
<div
@@ -177,20 +176,17 @@
<div class="row">
<div class="col-lg-8">
<div class="alert alert-success" role="status">
Your request has been sent successfully.
<button
Your request has been sent successfully.
<button
type="button"
class="close"
data-dismiss="alert"
>&amp;times;</button>
</div>
</div>
<p>
We will get back to you shortly.
</p>
</div>
<div class="col-lg-4">
<t t-call="website.company_description" />
</div>
</div>
</div>
<div

View File

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