From efb0464833c379d3fd1f222c3d1485b6fe2100f8 Mon Sep 17 00:00:00 2001
From: Alex Vining
Date: Tue, 20 Sep 2022 10:28:14 -0400
Subject: [PATCH] [MIG] rma_sale: Migration to 15.0
---
rma_sale/README.rst | 10 +++++-----
rma_sale/__manifest__.py | 9 +++++++--
rma_sale/i18n/rma_sale.pot | 20 +-------------------
rma_sale/models/rma.py | 3 ++-
rma_sale/models/sale.py | 3 ++-
rma_sale/static/description/index.html | 6 +++---
rma_sale/tests/test_rma_sale.py | 4 ++--
rma_sale/views/assets.xml | 16 ----------------
rma_sale/views/sale_portal_template.xml | 18 +++++++++---------
rma_sale/wizard/sale_order_rma_wizard.py | 1 -
10 files changed, 31 insertions(+), 59 deletions(-)
delete mode 100644 rma_sale/views/assets.xml
diff --git a/rma_sale/README.rst b/rma_sale/README.rst
index 07a21163..1f3b8076 100644
--- a/rma_sale/README.rst
+++ b/rma_sale/README.rst
@@ -14,13 +14,13 @@ Return Merchandise Authorization Management - Link with Sales
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github
- :target: https://github.com/OCA/rma/tree/14.0/rma_sale
+ :target: https://github.com/OCA/rma/tree/15.0/rma_sale
:alt: OCA/rma
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-rma_sale
+ :target: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/145/14.0
+ :target: https://runbot.odoo-community.org/runbot/145/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -79,7 +79,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -124,6 +124,6 @@ Current `maintainer `__:
|maintainer-ernestotejeda|
-This module is part of the `OCA/rma `_ project on GitHub.
+This module is part of the `OCA/rma `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 4ab4bbee..ab99826d 100644
--- a/rma_sale/__manifest__.py
+++ b/rma_sale/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Return Merchandise Authorization Management - Link with Sales",
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
- "version": "14.0.2.1.0",
+ "version": "15.0.1.0.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
@@ -13,7 +13,6 @@
"depends": ["rma", "sale_stock"],
"data": [
"security/ir.model.access.csv",
- "views/assets.xml",
"views/report_rma.xml",
"views/rma_views.xml",
"views/sale_views.xml",
@@ -21,4 +20,10 @@
"views/res_config_settings_views.xml",
"wizard/sale_order_rma_wizard_views.xml",
],
+ "assets": {
+ "web.assets_frontend": [
+ "/rma_sale/static/src/js/rma_portal_form.js",
+ "/rma_sale/static/src/scss/rma_sale.scss",
+ ],
+ },
}
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index 39fce400..b722c99b 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -204,14 +204,8 @@ msgid "Description"
msgstr ""
#. module: rma_sale
-#: model:ir.model.fields,field_description:rma_sale.field_res_company__display_name
-#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__display_name
-#: model:ir.model.fields,field_description:rma_sale.field_rma__display_name
-#: model:ir.model.fields,field_description:rma_sale.field_sale_order__display_name
-#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line__display_name
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__display_name
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__display_name
-#: model:ir.model.fields,field_description:rma_sale.field_stock_move__display_name
msgid "Display Name"
msgstr ""
@@ -230,14 +224,8 @@ msgid "Full page RMA creation"
msgstr ""
#. module: rma_sale
-#: model:ir.model.fields,field_description:rma_sale.field_res_company__id
-#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__id
-#: model:ir.model.fields,field_description:rma_sale.field_rma__id
-#: model:ir.model.fields,field_description:rma_sale.field_sale_order__id
-#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line__id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__id
-#: model:ir.model.fields,field_description:rma_sale.field_stock_move__id
msgid "ID"
msgstr ""
@@ -247,14 +235,8 @@ msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
#. module: rma_sale
-#: model:ir.model.fields,field_description:rma_sale.field_res_company____last_update
-#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings____last_update
-#: model:ir.model.fields,field_description:rma_sale.field_rma____last_update
-#: model:ir.model.fields,field_description:rma_sale.field_sale_order____last_update
-#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line____last_update
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard____last_update
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard____last_update
-#: model:ir.model.fields,field_description:rma_sale.field_stock_move____last_update
msgid "Last Modified on"
msgstr ""
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 7446ca2c..0b1bc5d1 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -105,8 +105,9 @@ class Rma(models.Model):
def _prepare_refund_line(self, line_form):
"""Add line data"""
- super()._prepare_refund_line(line_form)
+ res = super()._prepare_refund_line(line_form)
line = self.sale_line_id
if line:
line_form.discount = line.discount
line_form.sequence = line.sequence
+ return res
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index 3c15ad7b..609ba13d 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -86,13 +86,14 @@ class SaleOrder(models.Model):
"""Search for possible RMA refunds and link them to the order. We
don't want to link their sale lines as that would unbalance the
qtys to invoice wich isn't correct for this case"""
- super()._get_invoiced()
+ res = super()._get_invoiced()
for order in self:
refunds = order.sudo().rma_ids.mapped("refund_id")
if not refunds:
continue
order.invoice_ids += refunds
order.invoice_count = len(order.invoice_ids)
+ return res
class SaleOrderLine(models.Model):
diff --git a/rma_sale/static/description/index.html b/rma_sale/static/description/index.html
index 46d15790..43411b5a 100644
--- a/rma_sale/static/description/index.html
+++ b/rma_sale/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to link a sales order to an RMA.
This can be done by creating an RMA from scratch and selecting the sales
order, creating one or more RMAs from a sales order form view or from a sales
@@ -430,7 +430,7 @@ number greater than the order line product quantity.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.