Date: Sat, 12 Dec 2020 10:21:44 -0500
Subject: [PATCH 17/55] [IMP] *rma*: some improvements
---
rma_sale/wizard/sale_order_rma_wizard.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index e20bc97c..cd0b922b 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -53,6 +53,8 @@ class SaleOrderRmaWizard(models.TransientModel):
def create_and_open_rma(self):
self.ensure_one()
rma = self.create_rma()
+ if not rma:
+ return
for rec in rma:
rec.action_confirm()
action = self.env.ref("rma.rma_action").read()[0]
@@ -114,6 +116,7 @@ class SaleOrderLineRmaWizard(models.TransientModel):
@api.onchange("product_id")
def onchange_product_id(self):
self.picking_id = False
+ self.uom_id = self.product_id.uom_id
@api.depends("picking_id")
def _compute_move_id(self):
From 90964175ad032f67475b00e37c584be5fd1c8d01 Mon Sep 17 00:00:00 2001
From: david
Date: Thu, 17 Dec 2020 17:04:05 +0100
Subject: [PATCH 18/55] [FIX] rma_sale: product in multiple lines
If there are several stock moves with the same product in the picking we
won't be able to make the RMA
---
rma_sale/__manifest__.py | 2 +-
rma_sale/i18n/es.po | 5 +++++
rma_sale/i18n/nl.po | 8 +++++++-
rma_sale/i18n/pt_BR.po | 5 +++++
rma_sale/i18n/rma_sale.pot | 5 +++++
rma_sale/i18n/ro.po | 12 +++++++++---
rma_sale/models/sale.py | 5 ++++-
rma_sale/views/sale_portal_template.xml | 6 ++++++
rma_sale/wizard/sale_order_rma_wizard.py | 4 +++-
9 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index c63d3bdb..7bb2e2bf 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": "13.0.1.0.0",
+ "version": "13.0.1.1.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/i18n/es.po b/rma_sale/i18n/es.po
index f599abd7..95b9f981 100644
--- a/rma_sale/i18n/es.po
+++ b/rma_sale/i18n/es.po
@@ -289,6 +289,11 @@ msgstr "Solicitar RMAs"
msgid "Requested operation"
msgstr "Operación solicitada"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
msgid "Sale Order"
diff --git a/rma_sale/i18n/nl.po b/rma_sale/i18n/nl.po
index c78abb5b..94152c56 100644
--- a/rma_sale/i18n/nl.po
+++ b/rma_sale/i18n/nl.po
@@ -56,7 +56,8 @@ msgstr ""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
-msgid ""
+msgid ""
+""
msgstr ""
#. module: rma_sale
@@ -283,6 +284,11 @@ msgstr "aangevraagde RMA's"
msgid "Requested operation"
msgstr "Verzochte handeling"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
msgid "Sale Order"
diff --git a/rma_sale/i18n/pt_BR.po b/rma_sale/i18n/pt_BR.po
index 9e259eb1..c3643041 100644
--- a/rma_sale/i18n/pt_BR.po
+++ b/rma_sale/i18n/pt_BR.po
@@ -284,6 +284,11 @@ msgstr "Requisição de RMAs"
msgid "Requested operation"
msgstr "Operação Requisitada"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
msgid "Sale Order"
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index 24e9f61e..2d37b23e 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -277,6 +277,11 @@ msgstr ""
msgid "Requested operation"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
msgid "Sale Order"
diff --git a/rma_sale/i18n/ro.po b/rma_sale/i18n/ro.po
index 405e3dd2..7a6a3383 100644
--- a/rma_sale/i18n/ro.po
+++ b/rma_sale/i18n/ro.po
@@ -57,10 +57,11 @@ msgstr " Anulat"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
-msgid ""
+msgid ""
+""
msgstr ""
-" "
+" "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
@@ -289,6 +290,11 @@ msgstr "Cereri retur"
msgid "Requested operation"
msgstr "Operație solicitată"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
msgid "Sale Order"
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index d2b58601..bfc14243 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -36,6 +36,7 @@ class SaleOrder(models.Model):
{
"product_id": data["product"].id,
"quantity": data["quantity"],
+ "sale_line_id": data["sale_line_id"].id,
"uom_id": data["uom"].id,
"picking_id": data["picking"] and data["picking"].id,
},
@@ -83,7 +84,7 @@ class SaleOrderLine(models.Model):
self.ensure_one()
return self.move_ids.filtered(
lambda r: (
- self.product_id == r.product_id
+ self == r.sale_line_id
and r.state == "done"
and not r.scrapped
and r.location_dest_id.usage == "customer"
@@ -114,6 +115,7 @@ class SaleOrderLine(models.Model):
"quantity": qty,
"uom": move.product_uom,
"picking": move.picking_id,
+ "sale_line_id": self,
}
)
else:
@@ -123,6 +125,7 @@ class SaleOrderLine(models.Model):
"quantity": self.qty_delivered,
"uom": self.product_uom,
"picking": False,
+ "sale_line_id": self,
}
)
return data
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index 3bd5b1c8..14d36396 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -100,6 +100,12 @@
t-attf-name="#{data_index}-product_id"
t-att-value="data['product'].id"
/>
+
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index cd0b922b..537c72e7 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -111,6 +111,7 @@ class SaleOrderLineRmaWizard(models.TransientModel):
operation_id = fields.Many2one(
comodel_name="rma.operation", string="Requested operation",
)
+ sale_line_id = fields.Many2one(comodel_name="sale.order.line",)
description = fields.Text()
@api.onchange("product_id")
@@ -124,7 +125,8 @@ class SaleOrderLineRmaWizard(models.TransientModel):
if record.picking_id:
record.move_id = record.picking_id.move_lines.filtered(
lambda r: (
- r.sale_line_id.product_id == record.product_id
+ r.sale_line_id == record.sale_line_id
+ and r.sale_line_id.product_id == record.product_id
and r.sale_line_id.order_id == record.order_id
)
)
From 33c456a2946bd01b87460a5a39bb029beae1f851 Mon Sep 17 00:00:00 2001
From: Ernesto Tejeda
Date: Thu, 10 Dec 2020 12:02:30 -0500
Subject: [PATCH 19/55] [FIX] rma_sale: Request RMA from SO without picking
from portal
---
rma_sale/views/sale_portal_template.xml | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index 14d36396..c61f1e4f 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -131,14 +131,12 @@
-
-
+
+
+
+
Date: Mon, 16 Nov 2020 17:26:06 +0100
Subject: [PATCH 20/55] [IMP] rma_sale: prepare kits integration
When a sale line has a phantom product (mrp kits) the RMA would not be
possible as the wizard couldn't pair the components moves with the
product in the line. With this approach, we can at least return the
spare components of the original kit line.
We also need some hooks to intervine in the main methods, like in
invoicing.
---
rma_sale/controllers/sale_portal.py | 2 +-
rma_sale/models/rma.py | 22 ++++++++++++++
rma_sale/models/sale.py | 39 ++++++++++++++++---------
rma_sale/views/sale_portal_template.xml | 14 +++++----
4 files changed, 57 insertions(+), 20 deletions(-)
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index 70403a80..7ea70a3a 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -40,7 +40,7 @@ class CustomerPortal(CustomerPortal):
wizard = wizard_obj.with_context(active_id=order_id).create(
{"line_ids": line_vals, "location_id": location_id}
)
- rma = wizard.sudo().create_rma()
+ rma = wizard.sudo().create_rma(from_portal=True)
for rec in rma:
rec.origin += _(" (Portal)")
# Add the user as follower of the created RMAs so they can
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 4fc540c1..70c0dfcd 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -25,6 +25,7 @@ class Rma(models.Model):
comodel_name="sale.order.line", compute="_compute_allowed_move_ids",
)
move_id = fields.Many2one(domain="[('id', 'in', allowed_move_ids)]")
+ sale_line_id = fields.Many2one(related="move_id.sale_line_id",)
allowed_product_ids = fields.Many2many(
comodel_name="product.product", compute="_compute_allowed_product_ids",
)
@@ -83,3 +84,24 @@ class Rma(models.Model):
if self.order_id:
invoice_form.invoice_user_id = self.order_id.user_id
return res
+
+ def _get_refund_line_price_unit(self):
+ """Get the sale order price unit"""
+ if self.sale_line_id:
+ return self.sale_line_id.price_unit
+ return super()._get_refund_line_price_unit()
+
+ def _get_refund_line_product(self):
+ """To be overriden in a third module with the proper origin values
+ in case a kit is linked with the rma """
+ if not self.sale_line_id:
+ return super()._get_refund_line_product()
+ return self.sale_line_id.product_id
+
+ def _prepare_refund_line(self, line_form):
+ """Add line data"""
+ super()._prepare_refund_line(line_form)
+ line = self.sale_line_id
+ if line:
+ line_form.discount = line.discount
+ line_form.sequence = line.sequence
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index bfc14243..fa91e86c 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -1,7 +1,7 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo import _, fields, models
+from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
@@ -22,6 +22,16 @@ class SaleOrder(models.Model):
for record in self:
record.rma_count = mapped_data.get(record.id, 0)
+ def _prepare_rma_wizard_line_vals(self, data):
+ """So we can extend the wizard easily"""
+ return {
+ "product_id": data["product"].id,
+ "quantity": data["quantity"],
+ "sale_line_id": data["sale_line_id"].id,
+ "uom_id": data["uom"].id,
+ "picking_id": data["picking"] and data["picking"].id,
+ }
+
def action_create_rma(self):
self.ensure_one()
if self.state not in ["sale", "done"]:
@@ -30,17 +40,7 @@ class SaleOrder(models.Model):
)
wizard_obj = self.env["sale.order.rma.wizard"]
line_vals = [
- (
- 0,
- 0,
- {
- "product_id": data["product"].id,
- "quantity": data["quantity"],
- "sale_line_id": data["sale_line_id"].id,
- "uom_id": data["uom"].id,
- "picking_id": data["picking"] and data["picking"].id,
- },
- )
+ (0, 0, self._prepare_rma_wizard_line_vals(data))
for data in self.get_delivery_rma_data()
]
wizard = wizard_obj.with_context(active_id=self.id).create(
@@ -76,6 +76,19 @@ class SaleOrder(models.Model):
data += line.prepare_sale_rma_data()
return data
+ @api.depends("rma_ids.refund_id")
+ def _get_invoiced(self):
+ """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()
+ 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)
+
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
@@ -98,7 +111,7 @@ class SaleOrderLine(models.Model):
def prepare_sale_rma_data(self):
self.ensure_one()
product = self.product_id
- if self.product_id.type != "product":
+ if self.product_id.type not in ["product", "consu"]:
return {}
moves = self.get_delivery_move()
data = []
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index c61f1e4f..b1ee9ef7 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -131,12 +131,14 @@
-
-
-
-
+
+
Date: Mon, 1 Mar 2021 18:54:56 +0100
Subject: [PATCH 21/55] [IMP] rma_sale: portal ux
When the user selects an operation, the comment shows up so the customer
doesn't forget to enter his comments
---
rma_sale/static/src/js/rma_portal_form.js | 45 +++++++++++++++++++++++
rma_sale/views/assets.xml | 4 ++
rma_sale/views/sale_portal_template.xml | 2 +-
3 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 rma_sale/static/src/js/rma_portal_form.js
diff --git a/rma_sale/static/src/js/rma_portal_form.js b/rma_sale/static/src/js/rma_portal_form.js
new file mode 100644
index 00000000..e904d44a
--- /dev/null
+++ b/rma_sale/static/src/js/rma_portal_form.js
@@ -0,0 +1,45 @@
+/* Copyright 2021 Tecnativa - David Vidal
+ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
+
+odoo.define("rma_sale.animation", function(require) {
+ "use strict";
+
+ var sAnimation = require("website.content.snippets.animation");
+
+ // In the customer portal when a RMA operation is selected show the comments
+ // selector so the user doesn't miss the chance to add his comments
+ sAnimation.registry.rma_operation_portal = sAnimation.Class.extend({
+ selector: ".rma-operation",
+ start: function() {
+ this.id = this.el.name.replace("-operation_id", "");
+ this.$comment = $("#comment-" + this.id);
+ this.$comment_input = $("[name='" + this.id + "-description']");
+ var _this = this;
+ this.$el.on("change", function() {
+ _this._onChangeOperationId();
+ });
+ },
+ _show_comment: function() {
+ if (this.$comment) {
+ this.$comment.removeClass("show");
+ this.$comment.addClass("show");
+ if (this.$comment_input) {
+ this.$comment_input.focus();
+ }
+ }
+ },
+ _hide_comment: function() {
+ if (this.$comment) {
+ this.$comment.removeClass("show");
+ }
+ },
+ _onChangeOperationId: function() {
+ // Toggle comment on or off if an operation is requested
+ if (this.$el && this.$el.val()) {
+ this._show_comment();
+ } else {
+ this._hide_comment();
+ }
+ },
+ });
+});
diff --git a/rma_sale/views/assets.xml b/rma_sale/views/assets.xml
index e946398f..53633488 100644
--- a/rma_sale/views/assets.xml
+++ b/rma_sale/views/assets.xml
@@ -2,6 +2,10 @@
+
---
Date: Fri, 6 Nov 2020 16:56:02 +0100
Subject: [PATCH 22/55] [IMP] rma, rma_sale: shipping address
Allow to set the desired shipping address where the goods must be
returned after the RMA is processed.
---
rma_sale/__manifest__.py | 2 +-
rma_sale/controllers/sale_portal.py | 7 +++-
rma_sale/i18n/es.po | 21 ++++++++++
rma_sale/i18n/nl.po | 21 ++++++++++
rma_sale/i18n/pt_BR.po | 21 ++++++++++
rma_sale/i18n/rma_sale.pot | 21 ++++++++++
rma_sale/i18n/ro.po | 21 ++++++++++
rma_sale/views/sale_portal_template.xml | 42 +++++++++++++++++++
rma_sale/wizard/sale_order_rma_wizard.py | 14 +++++++
.../wizard/sale_order_rma_wizard_views.xml | 5 +++
10 files changed, 173 insertions(+), 2 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 7bb2e2bf..4e2b0802 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": "13.0.1.1.0",
+ "version": "13.0.1.2.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index 7ea70a3a..b587abcc 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -27,6 +27,7 @@ class CustomerPortal(CustomerPortal):
wizard_obj = request.env["sale.order.rma.wizard"]
# Set wizard line vals
mapped_vals = {}
+ partner_shipping_id = post.pop("partner_shipping_id", False)
for name, value in post.items():
row, field_name = name.split("-", 1)
mapped_vals.setdefault(row, {}).update({field_name: value})
@@ -38,7 +39,11 @@ class CustomerPortal(CustomerPortal):
order = order_obj.browse(order_id).sudo()
location_id = order.warehouse_id.rma_loc_id.id
wizard = wizard_obj.with_context(active_id=order_id).create(
- {"line_ids": line_vals, "location_id": location_id}
+ {
+ "line_ids": line_vals,
+ "location_id": location_id,
+ "partner_shipping_id": partner_shipping_id,
+ }
)
rma = wizard.sudo().create_rma(from_portal=True)
for rec in rma:
diff --git a/rma_sale/i18n/es.po b/rma_sale/i18n/es.po
index 95b9f981..2a950e6b 100644
--- a/rma_sale/i18n/es.po
+++ b/rma_sale/i18n/es.po
@@ -55,6 +55,11 @@ msgstr " Solicitar RMAs"
msgid " Cancel"
msgstr " Cancelar"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Choose a delivery address"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -133,6 +138,11 @@ msgstr ""
"Comente cualquier asunto relevante relacionado con la devolución, como "
"números de serie, descripción del problema, etc"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -290,6 +300,7 @@ msgid "Requested operation"
msgstr "Operación solicitada"
#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
msgid "Sale Line"
msgstr ""
@@ -324,6 +335,11 @@ msgstr "Línea de pedido de venta"
msgid "Select the product quantity and the requested operation"
msgstr "Selecciones la cantidad de producto y la operación solicitada"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
@@ -350,6 +366,11 @@ msgstr ""
"relacionada con el RMA, como números de serie devueltos o una descripción "
"del problema"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
msgid "Wizard"
diff --git a/rma_sale/i18n/nl.po b/rma_sale/i18n/nl.po
index 94152c56..3387ff1a 100644
--- a/rma_sale/i18n/nl.po
+++ b/rma_sale/i18n/nl.po
@@ -54,6 +54,11 @@ msgstr ""
msgid " Cancel"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Choose a delivery address"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -131,6 +136,11 @@ msgstr ""
"Relevante opmerking voor de retour zending zoals; serie nummers, "
"probleemomschrijving, etc"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -285,6 +295,7 @@ msgid "Requested operation"
msgstr "Verzochte handeling"
#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
msgid "Sale Line"
msgstr ""
@@ -319,6 +330,11 @@ msgstr "verkoopregel"
msgid "Select the product quantity and the requested operation"
msgstr "Selecteer het productaantal en de gewenste handeling"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
@@ -344,6 +360,11 @@ msgstr ""
"Gebruik de onderstaande opmerkingen knop om relevante informatie over de RMA "
"in te vullen, zoals serienummer of een omschrijving van het probleem"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
msgid "Wizard"
diff --git a/rma_sale/i18n/pt_BR.po b/rma_sale/i18n/pt_BR.po
index c3643041..0f84fd8e 100644
--- a/rma_sale/i18n/pt_BR.po
+++ b/rma_sale/i18n/pt_BR.po
@@ -54,6 +54,11 @@ msgstr " Requerer RMAs"
msgid " Cancel"
msgstr " Cancelar"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Choose a delivery address"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -130,6 +135,11 @@ msgid ""
"of the issue, etc"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -285,6 +295,7 @@ msgid "Requested operation"
msgstr "Operação Requisitada"
#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
msgid "Sale Line"
msgstr ""
@@ -319,6 +330,11 @@ msgstr "Linha do Pedido de Venda"
msgid "Select the product quantity and the requested operation"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
@@ -341,6 +357,11 @@ msgid ""
"returned serial numbers or a description of the issue"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
msgid "Wizard"
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index 2d37b23e..9a81c5b6 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -51,6 +51,11 @@ msgstr ""
msgid " Cancel"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Choose a delivery address"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -125,6 +130,11 @@ msgid ""
"of the issue, etc"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -278,6 +288,7 @@ msgid "Requested operation"
msgstr ""
#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
msgid "Sale Line"
msgstr ""
@@ -312,6 +323,11 @@ msgstr ""
msgid "Select the product quantity and the requested operation"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
@@ -334,6 +350,11 @@ msgid ""
"returned serial numbers or a description of the issue"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
msgid "Wizard"
diff --git a/rma_sale/i18n/ro.po b/rma_sale/i18n/ro.po
index 7a6a3383..811dde47 100644
--- a/rma_sale/i18n/ro.po
+++ b/rma_sale/i18n/ro.po
@@ -55,6 +55,11 @@ msgstr " Cerere retur"
msgid " Cancel"
msgstr " Anulat"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Choose a delivery address"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -134,6 +139,11 @@ msgstr ""
"Menționează orice este relevant pentru returnare, cum ar fi numerele de "
"serie, o descriere a problemei etc."
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -291,6 +301,7 @@ msgid "Requested operation"
msgstr "Operație solicitată"
#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
msgid "Sale Line"
msgstr ""
@@ -325,6 +336,11 @@ msgstr "Linie comandă vânzare"
msgid "Select the product quantity and the requested operation"
msgstr "Selectați cantitatea produsului și operațiunea solicitată"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
@@ -350,6 +366,11 @@ msgstr ""
"privire la retur, cum ar fi numerele de serie returnate sau o descriere a "
"problemei"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
msgid "Wizard"
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index 8260b9c7..78de3dc4 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -67,6 +67,48 @@
+
+ Choose a delivery address
+
+
+
Date: Wed, 31 Mar 2021 16:53:42 +0200
Subject: [PATCH 23/55] [FIX] rma_sale: fix wrong values for RMA creation
Lesser fix for creating RMA from website.
Current values will break any custom behaviour because Many2one fields are set using strings instead of integer (IDs).
---
rma_sale/controllers/sale_portal.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index b587abcc..e8eec8e6 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -25,11 +25,16 @@ class CustomerPortal(CustomerPortal):
return request.redirect("/my")
order_obj = request.env["sale.order"]
wizard_obj = request.env["sale.order.rma.wizard"]
+ wizard_line_field_types = {
+ f: d["type"] for f, d in wizard_obj.line_ids.fields_get().items()
+ }
# Set wizard line vals
mapped_vals = {}
partner_shipping_id = post.pop("partner_shipping_id", False)
for name, value in post.items():
row, field_name = name.split("-", 1)
+ if wizard_line_field_types.get(field_name) == "many2one":
+ value = int(value) if value else False
mapped_vals.setdefault(row, {}).update({field_name: value})
# If no operation is filled, no RMA will be created
line_vals = [
From 48cec57368ae0d7e970f2ef94d286ea24405dcc4 Mon Sep 17 00:00:00 2001
From: SilvioGregorini
Date: Tue, 13 Apr 2021 23:41:32 +0200
Subject: [PATCH 24/55] [FIX] rma_sale: fix CacheError in _prepare_rma_values()
Lesser fix for sale.order.line.rma.wizard methods.
When method '_prepare_rma_values' was called upon records where field 'picking_id' was empty, Odoo raised a CacheError when trying to access field 'move_id'.
That happened because computed method '_compute_move_id' was not assigning a proper value to such field when 'picking_id' was empty.
Once the computed method is fixed (by simply assigning 'False' as 'move_id' value when no picking is set), the CacheError is solved.
---
rma_sale/__manifest__.py | 2 +-
rma_sale/wizard/sale_order_rma_wizard.py | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 4e2b0802..f31780f2 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": "13.0.1.2.0",
+ "version": "13.0.1.2.1",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index 77871d00..99270219 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -140,6 +140,8 @@ class SaleOrderLineRmaWizard(models.TransientModel):
and r.sale_line_id.order_id == record.order_id
)
)
+ else:
+ record.move_id = False
@api.depends("order_id")
def _compute_allowed_product_ids(self):
From 12fd6cb814712aa8fa1212d5af8670a33df7bd3e Mon Sep 17 00:00:00 2001
From: david
Date: Thu, 22 Apr 2021 12:16:07 +0200
Subject: [PATCH 25/55] [FIX] rma_sale: recurrent RMA
If a product was already in an RMA in the past, we should be able to
place another RMA in the future.
---
rma_sale/__manifest__.py | 2 +-
rma_sale/models/sale.py | 24 ++++++++++++++++++----
rma_sale/tests/test_rma_sale.py | 36 +++++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index f31780f2..75752cc6 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": "13.0.1.2.1",
+ "version": "13.0.1.2.2",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index fa91e86c..82e8dce6 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -110,6 +110,13 @@ class SaleOrderLine(models.Model):
def prepare_sale_rma_data(self):
self.ensure_one()
+ # Method helper to filter chained moves
+
+ def destination_moves(_move):
+ return _move.mapped("move_dest_ids").filtered(
+ lambda r: r.state in ["partially_available", "assigned", "done"]
+ )
+
product = self.product_id
if self.product_id.type not in ["product", "consu"]:
return {}
@@ -117,11 +124,20 @@ class SaleOrderLine(models.Model):
data = []
if moves:
for move in moves:
+ # Look for chained moves to check how many items we can allow
+ # to return. When a product is re-delivered it should be
+ # allowed to open an RMA again on it.
qty = move.product_uom_qty
- move_dest = move.move_dest_ids.filtered(
- lambda r: r.state in ["partially_available", "assigned", "done"]
- )
- qty -= sum(move_dest.mapped("product_uom_qty"))
+ qty_returned = 0
+ move_dest = destination_moves(move)
+ while move_dest:
+ qty_returned -= sum(move_dest.mapped("product_uom_qty"))
+ move_dest = destination_moves(move_dest)
+ if move_dest:
+ qty += sum(move_dest.mapped("product_uom_qty"))
+ move_dest = destination_moves(move_dest)
+ # If by chance we get a negative qty we should ignore it
+ qty = max(0, sum((qty, qty_returned)))
data.append(
{
"product": product,
diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index c61ccbec..7a22c22b 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -35,6 +35,10 @@ class TestRmaSale(SavepointCase):
cls.order_out_picking.move_lines.quantity_done = 5
cls.order_out_picking.button_validate()
+ def _rma_sale_wizard(self, order):
+ wizard_id = order.action_create_rma()["res_id"]
+ return self.env["sale.order.rma.wizard"].browse(wizard_id)
+
def test_create_rma_with_so(self):
rma_form = Form(self.env["rma"])
rma_form.partner_id = self.partner
@@ -78,3 +82,35 @@ class TestRmaSale(SavepointCase):
rma.reception_move_id.picking_id.action_done()
rma.action_refund()
self.assertEqual(rma.refund_id.user_id, user)
+
+ def test_create_recurrent_rma(self):
+ """An RMA of a product that had an RMA in the past should be possible"""
+ wizard = self._rma_sale_wizard(self.sale_order)
+ rma = self.env["rma"].browse(wizard.create_and_open_rma()["res_id"])
+ rma.reception_move_id.quantity_done = rma.product_uom_qty
+ rma.reception_move_id.picking_id.action_done()
+ wizard = self._rma_sale_wizard(self.sale_order)
+ self.assertEqual(
+ wizard.line_ids.quantity,
+ 0,
+ "There shouldn't be any allowed quantities for RMAs",
+ )
+ delivery_form = Form(
+ self.env["rma.delivery.wizard"].with_context(
+ active_ids=rma.ids, rma_delivery_type="return",
+ )
+ )
+ delivery_form.product_uom_qty = rma.product_uom_qty
+ delivery_wizard = delivery_form.save()
+ delivery_wizard.action_deliver()
+ picking = rma.delivery_move_ids.picking_id
+ picking.move_lines.quantity_done = rma.product_uom_qty
+ picking.action_done()
+ # The product is returned to the customer, so we should be able to make
+ # another RMA in the future
+ wizard = self._rma_sale_wizard(self.sale_order)
+ self.assertEqual(
+ wizard.line_ids.quantity,
+ rma.product_uom_qty,
+ "We should be allowed to return the product again",
+ )
From 8b9dbd38cda3e43baf1d1ccaa4a5d65ff6829b1d Mon Sep 17 00:00:00 2001
From: david
Date: Tue, 4 May 2021 17:29:18 +0200
Subject: [PATCH 26/55] [FIX] rma_sale: take product from move
---
rma_sale/models/sale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index 82e8dce6..7e341e9c 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -140,7 +140,7 @@ class SaleOrderLine(models.Model):
qty = max(0, sum((qty, qty_returned)))
data.append(
{
- "product": product,
+ "product": move.product_id,
"quantity": qty,
"uom": move.product_uom,
"picking": move.picking_id,
From d4d724f7c2244fc88c11a9d4fbb1ce33b9fcd9fc Mon Sep 17 00:00:00 2001
From: david
Date: Mon, 3 May 2021 11:18:38 +0200
Subject: [PATCH 27/55] [FIX] rma_sale: view id
---
rma_sale/i18n/es.po | 4 ++--
rma_sale/i18n/nl.po | 4 ++--
rma_sale/i18n/pt_BR.po | 4 ++--
rma_sale/i18n/rma_sale.pot | 4 ++--
rma_sale/i18n/ro.po | 4 ++--
rma_sale/wizard/sale_order_rma_wizard_views.xml | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/rma_sale/i18n/es.po b/rma_sale/i18n/es.po
index 2a950e6b..5eeff5d3 100644
--- a/rma_sale/i18n/es.po
+++ b/rma_sale/i18n/es.po
@@ -93,7 +93,7 @@ msgid "Sale order "
msgstr "Orden de venta "
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
msgstr "Aceptar"
@@ -115,7 +115,7 @@ msgid "Allowed Product"
msgstr "Producto Permitido"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Cancel"
msgstr "Cancelar"
diff --git a/rma_sale/i18n/nl.po b/rma_sale/i18n/nl.po
index 3387ff1a..efb0a903 100644
--- a/rma_sale/i18n/nl.po
+++ b/rma_sale/i18n/nl.po
@@ -91,7 +91,7 @@ msgid "Sale order "
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
msgstr "Accepteer"
@@ -113,7 +113,7 @@ msgid "Allowed Product"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Cancel"
msgstr "Annuleren"
diff --git a/rma_sale/i18n/pt_BR.po b/rma_sale/i18n/pt_BR.po
index 0f84fd8e..fa15e736 100644
--- a/rma_sale/i18n/pt_BR.po
+++ b/rma_sale/i18n/pt_BR.po
@@ -92,7 +92,7 @@ msgid "Sale order "
msgstr "Pedido de Venda "
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
msgstr "Aceitar"
@@ -114,7 +114,7 @@ msgid "Allowed Product"
msgstr "Produto Autorizado"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Cancel"
msgstr "Cancelar"
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index 9a81c5b6..b9980bf6 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -87,7 +87,7 @@ msgid "Sale order "
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
msgstr ""
@@ -109,7 +109,7 @@ msgid "Allowed Product"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Cancel"
msgstr ""
diff --git a/rma_sale/i18n/ro.po b/rma_sale/i18n/ro.po
index 811dde47..dc68a0da 100644
--- a/rma_sale/i18n/ro.po
+++ b/rma_sale/i18n/ro.po
@@ -94,7 +94,7 @@ msgid "Sale order "
msgstr "Comandă vânzare "
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
msgstr "Acceptă"
@@ -116,7 +116,7 @@ msgid "Allowed Product"
msgstr "Produs permis"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.=sale_order_rma_wizard_form_view
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Cancel"
msgstr "Revocare"
diff --git a/rma_sale/wizard/sale_order_rma_wizard_views.xml b/rma_sale/wizard/sale_order_rma_wizard_views.xml
index 0349b9e4..254c8b2b 100644
--- a/rma_sale/wizard/sale_order_rma_wizard_views.xml
+++ b/rma_sale/wizard/sale_order_rma_wizard_views.xml
@@ -6,7 +6,7 @@
form
new
-
+
sale.order.rma.wizard.form
sale.order.rma.wizard
From 0b66845ad882483e6b4a6b79fff974ecb7b9163b Mon Sep 17 00:00:00 2001
From: david
Date: Thu, 27 May 2021 10:50:42 +0200
Subject: [PATCH 28/55] [FIX] rma_sale: chained returns
Using move_dest_ids we can easily end in an infinite loop situation as
the return of the return of the return ends with some original moves on
in move_dest_ids. We must ensure to drop them to avoid the infinite
loop.
TT29886
---
rma_sale/models/sale.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index 7e341e9c..5d52a417 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -130,12 +130,19 @@ class SaleOrderLine(models.Model):
qty = move.product_uom_qty
qty_returned = 0
move_dest = destination_moves(move)
+ # With the return of the return of the return we could have an
+ # infinite loop, so we should avoid it dropping already explored
+ # move_dest_ids
+ visited_moves = move + move_dest
while move_dest:
qty_returned -= sum(move_dest.mapped("product_uom_qty"))
- move_dest = destination_moves(move_dest)
+ move_dest = destination_moves(move_dest) - visited_moves
if move_dest:
+ visited_moves += move_dest
qty += sum(move_dest.mapped("product_uom_qty"))
- move_dest = destination_moves(move_dest)
+ move_dest = (
+ destination_moves(move_dest) - visited_moves
+ )
# If by chance we get a negative qty we should ignore it
qty = max(0, sum((qty, qty_returned)))
data.append(
From 7fe4109069dcb49590d1c1d739e123095932624a Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Sat, 19 Jun 2021 11:38:57 +0200
Subject: [PATCH 29/55] [FIX] rma: pre-commit
---
rma_sale/models/sale.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index 5d52a417..56bc4ca9 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -140,9 +140,7 @@ class SaleOrderLine(models.Model):
if move_dest:
visited_moves += move_dest
qty += sum(move_dest.mapped("product_uom_qty"))
- move_dest = (
- destination_moves(move_dest) - visited_moves
- )
+ move_dest = destination_moves(move_dest) - visited_moves
# If by chance we get a negative qty we should ignore it
qty = max(0, sum((qty, qty_returned)))
data.append(
From 66c9fc1b7bc0cc166339cda7ff48014124590ca2 Mon Sep 17 00:00:00 2001
From: david
Date: Tue, 22 Jun 2021 13:24:30 +0200
Subject: [PATCH 30/55] [IMP] rma_sale: portal rma request single page view
Now it's possible to configure if the portal RMA request form is loaded
in a popup or in a single page.
In that page, we can add custom blocks (if the website is installed) a
customize the form text.
In this commit, we also add the possibility to extend the form view to allow
custom fields that will show up in the RMA description.
TT29670
---
rma_sale/__manifest__.py | 3 +-
rma_sale/controllers/sale_portal.py | 46 +-
rma_sale/i18n/es.po | 99 +++-
rma_sale/i18n/nl.po | 99 +++-
rma_sale/i18n/pt_BR.po | 99 +++-
rma_sale/i18n/rma_sale.pot | 99 +++-
rma_sale/i18n/ro.po | 99 +++-
rma_sale/models/__init__.py | 3 +-
rma_sale/models/res_company.py | 13 +
rma_sale/models/res_config_settings.py | 11 +
rma_sale/views/res_config_settings_views.xml | 36 ++
rma_sale/views/sale_portal_template.xml | 482 ++++++++++---------
rma_sale/wizard/sale_order_rma_wizard.py | 8 +-
13 files changed, 777 insertions(+), 320 deletions(-)
create mode 100644 rma_sale/models/res_company.py
create mode 100644 rma_sale/models/res_config_settings.py
create mode 100644 rma_sale/views/res_config_settings_views.xml
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 75752cc6..5637c003 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": "13.0.1.2.2",
+ "version": "13.0.2.0.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
@@ -17,6 +17,7 @@
"views/rma_views.xml",
"views/sale_views.xml",
"views/sale_portal_template.xml",
+ "views/res_config_settings_views.xml",
"wizard/sale_order_rma_wizard_views.xml",
],
}
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index e8eec8e6..eb5ab385 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -30,12 +30,18 @@ class CustomerPortal(CustomerPortal):
}
# Set wizard line vals
mapped_vals = {}
+ custom_vals = {}
partner_shipping_id = post.pop("partner_shipping_id", False)
for name, value in post.items():
- row, field_name = name.split("-", 1)
- if wizard_line_field_types.get(field_name) == "many2one":
- value = int(value) if value else False
- mapped_vals.setdefault(row, {}).update({field_name: value})
+ try:
+ row, field_name = name.split("-", 1)
+ if wizard_line_field_types.get(field_name) == "many2one":
+ value = int(value) if value else False
+ mapped_vals.setdefault(row, {}).update({field_name: value})
+ # Catch possible form custom fields to add them to the RMA
+ # description values
+ except ValueError:
+ custom_vals.update({name: value})
# If no operation is filled, no RMA will be created
line_vals = [
(0, 0, vals) for vals in mapped_vals.values() if vals.get("operation_id")
@@ -43,11 +49,19 @@ class CustomerPortal(CustomerPortal):
# Create wizard an generate rmas
order = order_obj.browse(order_id).sudo()
location_id = order.warehouse_id.rma_loc_id.id
+ # Add custom fields text
+ custom_description = ""
+ if custom_vals:
+ custom_description = r" --- "
+ custom_description += r" ".join(
+ ["{}: {}".format(x, y) for x, y in custom_vals.items()]
+ )
wizard = wizard_obj.with_context(active_id=order_id).create(
{
"line_ids": line_vals,
"location_id": location_id,
"partner_shipping_id": partner_shipping_id,
+ "custom_description": custom_description,
}
)
rma = wizard.sudo().create_rma(from_portal=True)
@@ -61,3 +75,27 @@ class CustomerPortal(CustomerPortal):
else:
route = "/my/rmas?sale_id=%d" % order_id
return request.redirect(route)
+
+ @http.route(
+ ["/my/requestrma/"], type="http", auth="public", website=True
+ )
+ def request_sale_rma(self, order_id, access_token=None, **kw):
+ """Request RMA on a single page"""
+ try:
+ order_sudo = self._document_check_access(
+ "sale.order", order_id, access_token=access_token
+ )
+ except (AccessError, MissingError):
+ return request.redirect("/my")
+ if order_sudo.state in ("draft", "sent", "cancel"):
+ return request.redirect("/my")
+ values = {
+ "sale_order": order_sudo,
+ "page_name": "request_rma",
+ "default_url": order_sudo.get_portal_url(),
+ "token": access_token,
+ "partner_id": order_sudo.partner_id.id,
+ }
+ if order_sudo.company_id:
+ values["res_company"] = order_sudo.company_id
+ return request.render("rma_sale.request_rma_single_page", values)
diff --git a/rma_sale/i18n/es.po b/rma_sale/i18n/es.po
index 5eeff5d3..42deca73 100644
--- a/rma_sale/i18n/es.po
+++ b/rma_sale/i18n/es.po
@@ -36,12 +36,12 @@ msgid " have been created."
msgstr " han sido creados."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "×"
msgstr "×"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Request RMAs"
msgstr " Solicitar RMAs"
@@ -51,15 +51,22 @@ msgid " Request RMAs"
msgstr " Solicitar RMAs"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Cancel"
msgstr " Cancelar"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -125,12 +132,12 @@ msgid "Category"
msgstr "Categoría"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
msgstr "Cerrar"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Comment anything relevant to the return, like serial numbers, a description "
"of the issue, etc"
@@ -143,6 +150,16 @@ msgstr ""
msgid "Commercial entity"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -178,7 +195,12 @@ msgid "Created on"
msgstr "Creado el"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Delivery"
msgstr "Entrega"
@@ -198,6 +220,20 @@ msgstr "Descripción"
msgid "Display Name"
msgstr "Nombre mostrado"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -205,7 +241,7 @@ msgid "ID"
msgstr "ID"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
"Si no se establece operación solicitada, el RMA no se procesará correctamente"
@@ -257,13 +293,13 @@ msgstr "Movimiento"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Product"
msgstr "Producto"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Quantity"
msgstr "Cantidad"
@@ -283,19 +319,24 @@ msgstr "Cantidad de RMAs"
msgid "RMA location"
msgstr "Ubicación de RMA"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
msgid "RMAs"
msgstr "RMAs"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
msgstr "Solicitar RMAs"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Requested operation"
msgstr "Operación solicitada"
@@ -331,7 +372,7 @@ msgid "Sales Order Line"
msgstr "Línea de pedido de venta"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Select the product quantity and the requested operation"
msgstr "Selecciones la cantidad de producto y la operación solicitada"
@@ -340,13 +381,23 @@ msgstr "Selecciones la cantidad de producto y la operación solicitada"
msgid "Shipping Address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de existencias"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
msgstr ""
"El límite disminuirá cuando las unidades de otros RMAs sean confirmadas"
@@ -357,7 +408,7 @@ msgid "Unit of Measure"
msgstr "Unidad de medida"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Use the comment button to add relevant information regarding the RMA, like "
"returned serial numbers or a description of the issue"
@@ -366,6 +417,18 @@ msgstr ""
"relacionada con el RMA, como números de serie devueltos o una descripción "
"del problema"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Will be used to return the goods when the RMA is completed"
@@ -377,7 +440,7 @@ msgid "Wizard"
msgstr "Asistente"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You can only return as much product units as you received for this order"
msgstr ""
@@ -385,7 +448,7 @@ msgstr ""
"pedido original"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "You can send a message in every RMA sent"
msgstr "Puede mandar un mensaje en cada RMA enviado"
@@ -396,7 +459,7 @@ msgid "You may only create RMAs from a confirmed or done sale order."
msgstr "Solo puedes crear RMAs desde una orden de venta confirmada o hecha."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You're about to perform an RMA request. Our team will process it an will "
"reach you once it's validated. Keep in mind that:"
diff --git a/rma_sale/i18n/nl.po b/rma_sale/i18n/nl.po
index efb0a903..ac82011d 100644
--- a/rma_sale/i18n/nl.po
+++ b/rma_sale/i18n/nl.po
@@ -35,12 +35,12 @@ msgid " have been created."
msgstr " is aangemaakt."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "×"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Request RMAs"
msgstr ""
@@ -50,15 +50,22 @@ msgid " Request RMAs"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Cancel"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -123,12 +130,12 @@ msgid "Category"
msgstr "Categorie"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
msgstr "Sluiten"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Comment anything relevant to the return, like serial numbers, a description "
"of the issue, etc"
@@ -141,6 +148,16 @@ msgstr ""
msgid "Commercial entity"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -173,7 +190,12 @@ msgid "Created on"
msgstr "Aangemaakt op"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Delivery"
msgstr "Levering"
@@ -193,6 +215,20 @@ msgstr "Omschrijving"
msgid "Display Name"
msgstr "Weergavenaam"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -200,7 +236,7 @@ msgid "ID"
msgstr "ID"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
@@ -251,13 +287,13 @@ msgstr ""
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Product"
msgstr "Product"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Quantity"
msgstr "Aantal"
@@ -277,19 +313,24 @@ msgstr "RMA aantal"
msgid "RMA location"
msgstr "RMA Locatie"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
msgid "RMAs"
msgstr "RMA's"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
msgstr "aangevraagde RMA's"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
#, fuzzy
msgid "Requested operation"
msgstr "Verzochte handeling"
@@ -326,7 +367,7 @@ msgid "Sales Order Line"
msgstr "verkoopregel"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Select the product quantity and the requested operation"
msgstr "Selecteer het productaantal en de gewenste handeling"
@@ -335,13 +376,23 @@ msgstr "Selecteer het productaantal en de gewenste handeling"
msgid "Shipping Address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
msgstr "Voorraad aanpassing"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
msgstr ""
@@ -352,7 +403,7 @@ msgid "Unit of Measure"
msgstr "Grootheid"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Use the comment button to add relevant information regarding the RMA, like "
"returned serial numbers or a description of the issue"
@@ -360,6 +411,18 @@ msgstr ""
"Gebruik de onderstaande opmerkingen knop om relevante informatie over de RMA "
"in te vullen, zoals serienummer of een omschrijving van het probleem"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Will be used to return the goods when the RMA is completed"
@@ -371,7 +434,7 @@ msgid "Wizard"
msgstr "gids"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You can only return as much product units as you received for this order"
msgstr ""
@@ -379,7 +442,7 @@ msgstr ""
"bestelling heeft ontvangen"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
#, fuzzy
msgid "You can send a message in every RMA sent"
msgstr "U kunt een bericht sturen in elke RMA zending"
@@ -391,7 +454,7 @@ msgid "You may only create RMAs from a confirmed or done sale order."
msgstr "U mag alleen een RMA maken van bevestigde of afgehandelde verkopen."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
#, fuzzy
msgid ""
"You're about to perform an RMA request. Our team will process it an will "
diff --git a/rma_sale/i18n/pt_BR.po b/rma_sale/i18n/pt_BR.po
index fa15e736..6979e393 100644
--- a/rma_sale/i18n/pt_BR.po
+++ b/rma_sale/i18n/pt_BR.po
@@ -35,12 +35,12 @@ msgid " have been created."
msgstr " foi criado(a)."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "×"
msgstr "&tempos;"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Request RMAs"
msgstr " Requerer RMAs"
@@ -50,15 +50,22 @@ msgid " Request RMAs"
msgstr " Requerer RMAs"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Cancel"
msgstr " Cancelar"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -124,12 +131,12 @@ msgid "Category"
msgstr "Categoria"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
msgstr "Encerrar"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Comment anything relevant to the return, like serial numbers, a description "
"of the issue, etc"
@@ -140,6 +147,16 @@ msgstr ""
msgid "Commercial entity"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -174,7 +191,12 @@ msgid "Created on"
msgstr "Criado em"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Delivery"
msgstr "Entrega"
@@ -194,6 +216,20 @@ msgstr ""
msgid "Display Name"
msgstr "Exibir Nome"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -201,7 +237,7 @@ msgid "ID"
msgstr "ID"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
@@ -252,13 +288,13 @@ msgstr "Origem da Movimentação"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Product"
msgstr "Produto"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Quantity"
msgstr "Quantidade"
@@ -278,19 +314,24 @@ msgstr "Contagem de RMA"
msgid "RMA location"
msgstr "Localização do RMA"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
msgid "RMAs"
msgstr "RMAs"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
msgstr "Requisição de RMAs"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Requested operation"
msgstr "Operação Requisitada"
@@ -326,7 +367,7 @@ msgid "Sales Order Line"
msgstr "Linha do Pedido de Venda"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Select the product quantity and the requested operation"
msgstr ""
@@ -335,13 +376,23 @@ msgstr ""
msgid "Shipping Address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
msgstr ""
@@ -351,12 +402,24 @@ msgid "Unit of Measure"
msgstr "Unidade de Medida"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Use the comment button to add relevant information regarding the RMA, like "
"returned serial numbers or a description of the issue"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Will be used to return the goods when the RMA is completed"
@@ -368,13 +431,13 @@ msgid "Wizard"
msgstr "Assistente"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You can only return as much product units as you received for this order"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "You can send a message in every RMA sent"
msgstr ""
@@ -387,7 +450,7 @@ msgstr ""
"concluído."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You're about to perform an RMA request. Our team will process it an will "
"reach you once it's validated. Keep in mind that:"
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index b9980bf6..2aa312d4 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -32,12 +32,12 @@ msgid " have been created."
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "×"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Request RMAs"
msgstr ""
@@ -47,15 +47,22 @@ msgid " Request RMAs"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Cancel"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -119,12 +126,12 @@ msgid "Category"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Comment anything relevant to the return, like serial numbers, a description "
"of the issue, etc"
@@ -135,6 +142,16 @@ msgstr ""
msgid "Commercial entity"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -167,7 +184,12 @@ msgid "Created on"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Delivery"
msgstr ""
@@ -187,6 +209,20 @@ msgstr ""
msgid "Display Name"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -194,7 +230,7 @@ msgid "ID"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
@@ -245,13 +281,13 @@ msgstr ""
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Product"
msgstr ""
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Quantity"
msgstr ""
@@ -271,19 +307,24 @@ msgstr ""
msgid "RMA location"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
msgid "RMAs"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
msgstr ""
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Requested operation"
msgstr ""
@@ -319,7 +360,7 @@ msgid "Sales Order Line"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Select the product quantity and the requested operation"
msgstr ""
@@ -328,13 +369,23 @@ msgstr ""
msgid "Shipping Address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
msgstr ""
@@ -344,12 +395,24 @@ msgid "Unit of Measure"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Use the comment button to add relevant information regarding the RMA, like "
"returned serial numbers or a description of the issue"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Will be used to return the goods when the RMA is completed"
@@ -361,13 +424,13 @@ msgid "Wizard"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You can only return as much product units as you received for this order"
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "You can send a message in every RMA sent"
msgstr ""
@@ -378,7 +441,7 @@ msgid "You may only create RMAs from a confirmed or done sale order."
msgstr ""
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You're about to perform an RMA request. Our team will process it an will "
"reach you once it's validated. Keep in mind that:"
diff --git a/rma_sale/i18n/ro.po b/rma_sale/i18n/ro.po
index dc68a0da..31f2b9c4 100644
--- a/rma_sale/i18n/ro.po
+++ b/rma_sale/i18n/ro.po
@@ -36,12 +36,12 @@ msgid " have been created."
msgstr " au fost create."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "×"
msgstr "×"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Request RMAs"
msgstr " Cerere retur"
@@ -51,15 +51,22 @@ msgid " Request RMAs"
msgstr " Cerere retur"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Cancel"
msgstr " Anulat"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
@@ -126,12 +133,12 @@ msgid "Category"
msgstr "Categorie"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
msgstr "Închide"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Comment anything relevant to the return, like serial numbers, a description "
"of the issue, etc"
@@ -144,6 +151,16 @@ msgstr ""
msgid "Commercial entity"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid ""
@@ -178,7 +195,12 @@ msgid "Created on"
msgstr "Creat pe"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Delivery"
msgstr "Livrare"
@@ -198,6 +220,20 @@ msgstr "Descriere"
msgid "Display Name"
msgstr "Nume afișat"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -205,7 +241,7 @@ msgid "ID"
msgstr "ID"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
"Dacă nu este setată nicio operațiune solicitată, cererea de retur nu va fi "
@@ -258,13 +294,13 @@ msgstr "Mișcare origine"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Product"
msgstr "Produs"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Quantity"
msgstr "Cantitate"
@@ -284,19 +320,24 @@ msgstr "Număr cereri retur"
msgid "RMA location"
msgstr "Locație retur"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
msgid "RMAs"
msgstr "Cereri retur"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
msgstr "Cereri retur"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Requested operation"
msgstr "Operație solicitată"
@@ -332,7 +373,7 @@ msgid "Sales Order Line"
msgstr "Linie comandă vânzare"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Select the product quantity and the requested operation"
msgstr "Selectați cantitatea produsului și operațiunea solicitată"
@@ -341,13 +382,23 @@ msgstr "Selectați cantitatea produsului și operațiunea solicitată"
msgid "Shipping Address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr ""
+
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
msgstr "Mișcare stoc"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
msgstr "Limita va scădea atunci când unitățile din alte cereri sunt confirmate"
@@ -357,7 +408,7 @@ msgid "Unit of Measure"
msgstr "Unitate de măsură"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"Use the comment button to add relevant information regarding the RMA, like "
"returned serial numbers or a description of the issue"
@@ -366,6 +417,18 @@ msgstr ""
"privire la retur, cum ar fi numerele de serie returnate sau o descriere a "
"problemei"
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Will be used to return the goods when the RMA is completed"
@@ -377,14 +440,14 @@ msgid "Wizard"
msgstr "Asistent"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You can only return as much product units as you received for this order"
msgstr ""
"Puteți returna doar câte unități de produs ați primit pentru această comandă"
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "You can send a message in every RMA sent"
msgstr "Puteți trimite un mesaj în fiecare cerere de retur trimisă"
@@ -396,7 +459,7 @@ msgstr ""
"Puteți crea retur numai dintr-o comandă de vânzare confirmată sau finalizată."
#. module: rma_sale
-#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You're about to perform an RMA request. Our team will process it an will "
"reach you once it's validated. Keep in mind that:"
diff --git a/rma_sale/models/__init__.py b/rma_sale/models/__init__.py
index 0090dd37..16972d9b 100644
--- a/rma_sale/models/__init__.py
+++ b/rma_sale/models/__init__.py
@@ -1,5 +1,6 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-
+from . import res_company
+from . import res_config_settings
from . import rma
from . import sale
from . import stock_move
diff --git a/rma_sale/models/res_company.py b/rma_sale/models/res_company.py
new file mode 100644
index 00000000..021eea2c
--- /dev/null
+++ b/rma_sale/models/res_company.py
@@ -0,0 +1,13 @@
+# Copyright 2021 Tecnativa - David Vidal
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+from odoo import fields, models
+
+
+class ResCompany(models.Model):
+ _inherit = "res.company"
+
+ show_full_page_sale_rma = fields.Boolean(
+ string="Full page RMA creation",
+ help="From the frontend sale order page go to a single RMA page "
+ "creation instead of the usual popup",
+ )
diff --git a/rma_sale/models/res_config_settings.py b/rma_sale/models/res_config_settings.py
new file mode 100644
index 00000000..dd42c753
--- /dev/null
+++ b/rma_sale/models/res_config_settings.py
@@ -0,0 +1,11 @@
+# Copyright 2021 Tecnativa - David Vidal
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+from odoo import fields, models
+
+
+class ResConfigSettings(models.TransientModel):
+ _inherit = "res.config.settings"
+
+ show_full_page_sale_rma = fields.Boolean(
+ related="company_id.show_full_page_sale_rma", readonly=False,
+ )
diff --git a/rma_sale/views/res_config_settings_views.xml b/rma_sale/views/res_config_settings_views.xml
new file mode 100644
index 00000000..61618781
--- /dev/null
+++ b/rma_sale/views/res_config_settings_views.xml
@@ -0,0 +1,36 @@
+
+
+
+ res.config.settings
+
+
+
+
+
+
+
+
+
+
+
+ When we hit the RMA request button from the portal sale page, open in a single page instead of a popup.
+
+
+
+
+
+
+
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index 78de3dc4..0150d4ab 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -1,4 +1,194 @@
+
+
+
+
+
+ role="button"
+ class="btn btn-secondary btn-block mb8"
+ t-attf-href="/my/requestrma/#{sale_order.id}"
+ >
Request RMAs
+
+
+
+ Request RMAs
+
+
-
+
-
-
-
-
-
-
- You're about to perform an RMA request. Our team will process it an will reach you once it's validated. Keep in mind that:
-
- Select the product quantity and the requested operation
- Use the comment button to add relevant information regarding the RMA, like returned serial numbers or a description of the issue
- If no requested operation is set, the RMA won't be correctly fulfilled
- You can only return as much product units as you received for this order
- The limit will decrease when the units in other RMAs are confirmed
- You can send a message in every RMA sent
-
-
-
-
- Choose a delivery address
-
-
-
-
-
-
-
+
@@ -288,4 +279,49 @@
+
+
+
+
+
+
+
+ RMA request for order
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index 99270219..436bcc8d 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -37,6 +37,9 @@ class SaleOrderRmaWizard(models.TransientModel):
string="Shipping Address",
help="Will be used to return the goods when the RMA is completed",
)
+ custom_description = fields.Text(
+ help="Values coming from portal RMA request form custom fields",
+ )
def create_rma(self, from_portal=None):
self.ensure_one()
@@ -162,6 +165,9 @@ class SaleOrderLineRmaWizard(models.TransientModel):
partner_shipping = (
self.wizard_id.partner_shipping_id or self.order_id.partner_shipping_id
)
+ description = (self.description or "") + (
+ self.wizard_id.custom_description or ""
+ )
return {
"partner_id": self.order_id.partner_id.id,
"partner_invoice_id": self.order_id.partner_invoice_id.id,
@@ -176,5 +182,5 @@ class SaleOrderLineRmaWizard(models.TransientModel):
"product_uom_qty": self.quantity,
"product_uom": self.uom_id.id,
"operation_id": self.operation_id.id,
- "description": self.description,
+ "description": description,
}
From 2cab64f4e7468ba3be9a617f36c9c9cfec57e8da Mon Sep 17 00:00:00 2001
From: Chafique
Date: Fri, 3 Sep 2021 12:42:24 +0200
Subject: [PATCH 31/55] [IMP] rma_sale: black, isort, prettier
---
rma_sale/models/res_config_settings.py | 3 ++-
rma_sale/models/rma.py | 15 ++++++++++-----
rma_sale/models/sale.py | 9 +++++++--
rma_sale/static/src/js/rma_portal_form.js | 12 ++++++------
rma_sale/tests/test_rma_sale.py | 3 ++-
rma_sale/wizard/sale_order_rma_wizard.py | 19 ++++++++++++++-----
6 files changed, 41 insertions(+), 20 deletions(-)
diff --git a/rma_sale/models/res_config_settings.py b/rma_sale/models/res_config_settings.py
index dd42c753..5b809adb 100644
--- a/rma_sale/models/res_config_settings.py
+++ b/rma_sale/models/res_config_settings.py
@@ -7,5 +7,6 @@ class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
show_full_page_sale_rma = fields.Boolean(
- related="company_id.show_full_page_sale_rma", readonly=False,
+ related="company_id.show_full_page_sale_rma",
+ readonly=False,
)
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 70c0dfcd..d3e251b3 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -18,16 +18,21 @@ class Rma(models.Model):
states={"draft": [("readonly", False)]},
)
allowed_picking_ids = fields.Many2many(
- comodel_name="stock.picking", compute="_compute_allowed_picking_ids",
+ comodel_name="stock.picking",
+ compute="_compute_allowed_picking_ids",
)
picking_id = fields.Many2one(domain="[('id', 'in', allowed_picking_ids)]")
allowed_move_ids = fields.Many2many(
- comodel_name="sale.order.line", compute="_compute_allowed_move_ids",
+ comodel_name="sale.order.line",
+ compute="_compute_allowed_move_ids",
)
move_id = fields.Many2one(domain="[('id', 'in', allowed_move_ids)]")
- sale_line_id = fields.Many2one(related="move_id.sale_line_id",)
+ sale_line_id = fields.Many2one(
+ related="move_id.sale_line_id",
+ )
allowed_product_ids = fields.Many2many(
- comodel_name="product.product", compute="_compute_allowed_product_ids",
+ comodel_name="product.product",
+ compute="_compute_allowed_product_ids",
)
product_id = fields.Many2one(domain="[('id', 'in', allowed_product_ids)]")
@@ -93,7 +98,7 @@ class Rma(models.Model):
def _get_refund_line_product(self):
"""To be overriden in a third module with the proper origin values
- in case a kit is linked with the rma """
+ in case a kit is linked with the rma"""
if not self.sale_line_id:
return super()._get_refund_line_product()
return self.sale_line_id.product_id
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index 56bc4ca9..78b65170 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -10,7 +10,10 @@ class SaleOrder(models.Model):
# RMAs that were created from a sale order
rma_ids = fields.One2many(
- comodel_name="rma", inverse_name="order_id", string="RMAs", copy=False,
+ comodel_name="rma",
+ inverse_name="order_id",
+ string="RMAs",
+ copy=False,
)
rma_count = fields.Integer(string="RMA count", compute="_compute_rma_count")
@@ -61,7 +64,9 @@ class SaleOrder(models.Model):
rma = self.rma_ids
if len(rma) == 1:
action.update(
- res_id=rma.id, view_mode="form", views=[],
+ res_id=rma.id,
+ view_mode="form",
+ views=[],
)
else:
action["domain"] = [("id", "in", rma.ids)]
diff --git a/rma_sale/static/src/js/rma_portal_form.js b/rma_sale/static/src/js/rma_portal_form.js
index e904d44a..f407ed47 100644
--- a/rma_sale/static/src/js/rma_portal_form.js
+++ b/rma_sale/static/src/js/rma_portal_form.js
@@ -1,7 +1,7 @@
/* Copyright 2021 Tecnativa - David Vidal
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
-odoo.define("rma_sale.animation", function(require) {
+odoo.define("rma_sale.animation", function (require) {
"use strict";
var sAnimation = require("website.content.snippets.animation");
@@ -10,16 +10,16 @@ odoo.define("rma_sale.animation", function(require) {
// selector so the user doesn't miss the chance to add his comments
sAnimation.registry.rma_operation_portal = sAnimation.Class.extend({
selector: ".rma-operation",
- start: function() {
+ start: function () {
this.id = this.el.name.replace("-operation_id", "");
this.$comment = $("#comment-" + this.id);
this.$comment_input = $("[name='" + this.id + "-description']");
var _this = this;
- this.$el.on("change", function() {
+ this.$el.on("change", function () {
_this._onChangeOperationId();
});
},
- _show_comment: function() {
+ _show_comment: function () {
if (this.$comment) {
this.$comment.removeClass("show");
this.$comment.addClass("show");
@@ -28,12 +28,12 @@ odoo.define("rma_sale.animation", function(require) {
}
}
},
- _hide_comment: function() {
+ _hide_comment: function () {
if (this.$comment) {
this.$comment.removeClass("show");
}
},
- _onChangeOperationId: function() {
+ _onChangeOperationId: function () {
// Toggle comment on or off if an operation is requested
if (this.$el && this.$el.val()) {
this._show_comment();
diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index 7a22c22b..236a5a5f 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -97,7 +97,8 @@ class TestRmaSale(SavepointCase):
)
delivery_form = Form(
self.env["rma.delivery.wizard"].with_context(
- active_ids=rma.ids, rma_delivery_type="return",
+ active_ids=rma.ids,
+ rma_delivery_type="return",
)
)
delivery_form.product_uom_qty = rma.product_uom_qty
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index 436bcc8d..338f1eca 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -75,7 +75,10 @@ class SaleOrderRmaWizard(models.TransientModel):
action["domain"] = [("id", "in", rma.ids)]
elif rma:
action.update(
- res_id=rma.id, view_mode="form", view_id=False, views=False,
+ res_id=rma.id,
+ view_mode="form",
+ view_id=False,
+ views=False,
)
return action
@@ -101,10 +104,13 @@ class SaleOrderLineRmaWizard(models.TransientModel):
domain="[('id', 'in', allowed_product_ids)]",
)
uom_category_id = fields.Many2one(
- comodel_name="uom.category", related="product_id.uom_id.category_id",
+ comodel_name="uom.category",
+ related="product_id.uom_id.category_id",
)
quantity = fields.Float(
- string="Quantity", digits="Product Unit of Measure", required=True,
+ string="Quantity",
+ digits="Product Unit of Measure",
+ required=True,
)
uom_id = fields.Many2one(
comodel_name="uom.uom",
@@ -122,9 +128,12 @@ class SaleOrderLineRmaWizard(models.TransientModel):
)
move_id = fields.Many2one(comodel_name="stock.move", compute="_compute_move_id")
operation_id = fields.Many2one(
- comodel_name="rma.operation", string="Requested operation",
+ comodel_name="rma.operation",
+ string="Requested operation",
+ )
+ sale_line_id = fields.Many2one(
+ comodel_name="sale.order.line",
)
- sale_line_id = fields.Many2one(comodel_name="sale.order.line",)
description = fields.Text()
@api.onchange("product_id")
From 1b470773f91dcabb1191b3c8fc8190621be1ac43 Mon Sep 17 00:00:00 2001
From: Chafique
Date: Thu, 10 Dec 2020 17:59:24 +0100
Subject: [PATCH 32/55] [14.0][MIG] rma_sale module
---
rma_sale/README.rst | 12 +++++++-----
rma_sale/__manifest__.py | 3 ++-
rma_sale/i18n/rma_sale.pot | 20 +++++++++++++++++++-
rma_sale/models/rma.py | 6 +++---
rma_sale/readme/CONTRIBUTORS.rst | 2 ++
rma_sale/security/ir.model.access.csv | 3 +++
rma_sale/static/description/index.html | 7 ++++---
rma_sale/tests/test_rma_sale.py | 6 +++---
rma_sale/wizard/sale_order_rma_wizard.py | 6 +++---
9 files changed, 46 insertions(+), 19 deletions(-)
create mode 100644 rma_sale/security/ir.model.access.csv
diff --git a/rma_sale/README.rst b/rma_sale/README.rst
index 65178c1c..b2d80532 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/13.0/rma_sale
+ :target: https://github.com/OCA/rma/tree/14.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-13-0/rma-13-0-rma_sale
+ :target: https://translation.odoo-community.org/projects/rma-14-0/rma-14-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/13.0
+ :target: https://runbot.odoo-community.org/runbot/145/14.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.
@@ -100,6 +100,8 @@ Contributors
* Pedro M. Baeza
* David Vidal
+* Chafique Delli
+
Maintainers
~~~~~~~~~~~
@@ -121,6 +123,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 5637c003..0e0f628d 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": "13.0.2.0.0",
+ "version": "14.0.1.0.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
@@ -12,6 +12,7 @@
"license": "AGPL-3",
"depends": ["rma", "sale_stock"],
"data": [
+ "security/ir.model.access.csv",
"views/assets.xml",
"views/report_rma.xml",
"views/rma_views.xml",
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index 2aa312d4..39fce400 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 13.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -204,8 +204,14 @@ 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 ""
@@ -224,8 +230,14 @@ 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 ""
@@ -235,8 +247,14 @@ 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 d3e251b3..4ffc5e5f 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -40,9 +40,9 @@ class Rma(models.Model):
def _compute_allowed_picking_ids(self):
domain = [("state", "=", "done"), ("picking_type_id.code", "=", "outgoing")]
for rec in self:
- # if rec.partner_id:
- commercial_partner = rec.partner_id.commercial_partner_id
- domain.append(("partner_id", "child_of", commercial_partner.id))
+ if rec.partner_id:
+ commercial_partner = rec.partner_id.commercial_partner_id
+ domain.append(("partner_id", "child_of", commercial_partner.id))
if rec.order_id:
domain.append(("sale_id", "=", rec.order_id.id))
rec.allowed_picking_ids = self.env["stock.picking"].search(domain)
diff --git a/rma_sale/readme/CONTRIBUTORS.rst b/rma_sale/readme/CONTRIBUTORS.rst
index d4052271..49a9884e 100644
--- a/rma_sale/readme/CONTRIBUTORS.rst
+++ b/rma_sale/readme/CONTRIBUTORS.rst
@@ -3,3 +3,5 @@
* Ernesto Tejeda
* Pedro M. Baeza
* David Vidal
+
+* Chafique Delli
diff --git a/rma_sale/security/ir.model.access.csv b/rma_sale/security/ir.model.access.csv
new file mode 100644
index 00000000..f8a2b32b
--- /dev/null
+++ b/rma_sale/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_sale_order_rma_wizard_user_all,sale.order.rma.wizard.user.all,model_sale_order_rma_wizard,rma.rma_group_user_all,1,1,1,1
+access_sale_order_line_rma_wizard_user_all,sale.order.line.rma.wizard.user.all,model_sale_order_line_rma_wizard,rma.rma_group_user_all,1,1,1,1
diff --git a/rma_sale/static/description/index.html b/rma_sale/static/description/index.html
index 6b4d553a..ffa4f8f4 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 .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -450,6 +450,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
David Vidal
+
Chafique Delli <chafique.delli@akretion.com >
@@ -461,7 +462,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.
Current maintainer :
-
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/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index 236a5a5f..b49c9d47 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -79,7 +79,7 @@ class TestRmaSale(SavepointCase):
order.user_id = user.id
rma.action_confirm()
rma.reception_move_id.quantity_done = rma.product_uom_qty
- rma.reception_move_id.picking_id.action_done()
+ rma.reception_move_id.picking_id._action_done()
rma.action_refund()
self.assertEqual(rma.refund_id.user_id, user)
@@ -88,7 +88,7 @@ class TestRmaSale(SavepointCase):
wizard = self._rma_sale_wizard(self.sale_order)
rma = self.env["rma"].browse(wizard.create_and_open_rma()["res_id"])
rma.reception_move_id.quantity_done = rma.product_uom_qty
- rma.reception_move_id.picking_id.action_done()
+ rma.reception_move_id.picking_id._action_done()
wizard = self._rma_sale_wizard(self.sale_order)
self.assertEqual(
wizard.line_ids.quantity,
@@ -106,7 +106,7 @@ class TestRmaSale(SavepointCase):
delivery_wizard.action_deliver()
picking = rma.delivery_move_ids.picking_id
picking.move_lines.quantity_done = rma.product_uom_qty
- picking.action_done()
+ picking._action_done()
# The product is returned to the customer, so we should be able to make
# another RMA in the future
wizard = self._rma_sale_wizard(self.sale_order)
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index 338f1eca..2ad8274b 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -144,16 +144,16 @@ class SaleOrderLineRmaWizard(models.TransientModel):
@api.depends("picking_id")
def _compute_move_id(self):
for record in self:
+ move_id = False
if record.picking_id:
- record.move_id = record.picking_id.move_lines.filtered(
+ move_id = record.picking_id.move_lines.filtered(
lambda r: (
r.sale_line_id == record.sale_line_id
and r.sale_line_id.product_id == record.product_id
and r.sale_line_id.order_id == record.order_id
)
)
- else:
- record.move_id = False
+ record.move_id = move_id
@api.depends("order_id")
def _compute_allowed_product_ids(self):
From dfb9c2091938a429cb5a72830a6af30fa4f2108a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20BEAU?=
Date: Fri, 22 Oct 2021 14:29:48 +0200
Subject: [PATCH 33/55] [FIX] fix filter rma location based on the sale order
company
---
rma_sale/__manifest__.py | 2 +-
rma_sale/wizard/sale_order_rma_wizard.py | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 0e0f628d..6373270d 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.1.0.0",
+ "version": "14.0.1.0.1",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index 2ad8274b..f129c818 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -9,7 +9,12 @@ class SaleOrderRmaWizard(models.TransientModel):
_description = "Sale Order Rma Wizard"
def _domain_location_id(self):
- rma_loc = self.env["stock.warehouse"].search([]).mapped("rma_loc_id")
+ sale = self.env["sale.order"].browse(self.env.context.get("active_id"))
+ rma_loc = (
+ self.env["stock.warehouse"]
+ .search([("company_id", "=", sale.company_id.id)])
+ .mapped("rma_loc_id")
+ )
return [("id", "child_of", rma_loc.ids)]
order_id = fields.Many2one(
From d4794a3fcead8a6ca7d700ccb4d8dfccd53b2499 Mon Sep 17 00:00:00 2001
From: Pedro Castro Silva
Date: Thu, 28 Oct 2021 00:16:40 +0000
Subject: [PATCH 34/55] Added translation using Weblate (Portuguese)
Currently translated at 100.0% (79 of 79 strings)
Translation: rma-14.0/rma-14.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-rma_sale/pt/
---
rma_sale/i18n/pt.po | 492 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 492 insertions(+)
create mode 100644 rma_sale/i18n/pt.po
diff --git a/rma_sale/i18n/pt.po b/rma_sale/i18n/pt.po
new file mode 100644
index 00000000..da2e0640
--- /dev/null
+++ b/rma_sale/i18n/pt.po
@@ -0,0 +1,492 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * rma_sale
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2021-10-28 02:36+0000\n"
+"Last-Translator: Pedro Castro Silva \n"
+"Language-Team: none\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 4.3.2\n"
+
+#. module: rma_sale
+#: code:addons/rma_sale/controllers/sale_portal.py:0
+#, python-format
+msgid " (Portal)"
+msgstr " (Portal)"
+
+#. module: rma_sale
+#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
+#, python-format
+msgid " has been created."
+msgstr " foi criado(a)."
+
+#. module: rma_sale
+#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
+#, python-format
+msgid " have been created."
+msgstr " foi criado(a)."
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "×"
+msgstr "×"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Request RMAs"
+msgstr " Requerer RMAs"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Request RMAs"
+msgstr " Requerer RMAs"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Cancel"
+msgstr " Cancelar"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Choose a delivery address"
+msgstr " Escolha um endereço de entrega"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
+msgid ""
+msgstr ""
+""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
+msgid "RMA "
+msgstr "RMA "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
+msgid "Requested operation: "
+msgstr "Operação Requerida: "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
+msgid "Requested operation "
+msgstr "Operação Requerida "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
+msgid "Sale order: "
+msgstr "Encomenda de Venda: "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
+msgid "Sale order "
+msgstr "Encomenda de Venda "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
+msgid "Accept"
+msgstr "Aceitar"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_move_ids
+msgid "Allowed Move"
+msgstr "Movimentação Autorizada"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_picking_ids
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_picking_ids
+msgid "Allowed Picking"
+msgstr "Picking Autorizado"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_product_ids
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_product_ids
+msgid "Allowed Product"
+msgstr "Produto Autorizado"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
+msgid "Category"
+msgstr "Categoria"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Close"
+msgstr "Encerrar"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"Comment anything relevant to the return, like serial numbers, a description "
+"of the issue, etc"
+msgstr ""
+"Comente qualquer coisa relevante para a devolução, como números de série, "
+"uma descrição do problema, etc"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr "Entidade comercial"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr "Empresas"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr "Parâmetros de Configuração"
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
+msgid ""
+"Conversion between Units of Measure can only occur if they belong to the "
+"same category. The conversion will be made based on the ratios."
+msgstr ""
+"Conversões entre Unidades de Medida só podem ocorrer se pertencerem à mesma "
+"categoria. A conversão será feita com base nos coeficientes."
+
+#. module: rma_sale
+#: code:addons/rma_sale/models/sale.py:0
+#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
+#, python-format
+msgid "Create RMA"
+msgstr "Criar RMA"
+
+#. module: rma_sale
+#: model:ir.actions.act_window,name:rma_sale.sale_order_create_rma_action
+msgid "Create RMAs"
+msgstr "Criar RMAs"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_uid
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_uid
+msgid "Created by"
+msgstr "Criado por"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_date
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_date
+msgid "Created on"
+msgstr "Criado em"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr "Descrição Personalizada"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Delivery"
+msgstr "Entrega"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__picking_id
+msgid "Delivery order"
+msgstr "Ordem de Entrega"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__description
+msgid "Description"
+msgstr "Descrição"
+
+#. 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 "Nome a Exibir"
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+"A partir da página de pedidos de venda de frontend, vá para uma única página "
+"de RMA em vez do habitual popup"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr "Criação de RMA de página completa"
+
+#. 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 "ID"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
+msgstr ""
+"Se nenhuma operação solicitada for definida, a RMA não será cumprida "
+"corretamente"
+
+#. 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 "Última Modificação em"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_uid
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_uid
+msgid "Last Updated by"
+msgstr "Última Actualização por"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_date
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_date
+msgid "Last Updated on"
+msgstr "Última Actualização em"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__line_ids
+msgid "Lines"
+msgstr "Linhas"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__move_id
+msgid "Move"
+msgstr "Movimento"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__order_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__order_id
+msgid "Order"
+msgstr "Encomenda"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__picking_id
+msgid "Origin Delivery"
+msgstr "Origem da Entrega"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__move_id
+msgid "Origin move"
+msgstr "Origem da Movimentação"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Product"
+msgstr "Produto"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Quantity"
+msgstr "Quantidade"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_rma
+#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
+msgid "RMA"
+msgstr "RMA"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_count
+msgid "RMA count"
+msgstr "Contagem de RMA"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__location_id
+msgid "RMA location"
+msgstr "Localização do RMA"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr "Pedido de RMA de encomenda"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
+msgid "RMAs"
+msgstr "RMAs"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Request RMAs"
+msgstr "Requisição de RMAs"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Requested operation"
+msgstr "Operação Requisitada"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr "Linha de Venda"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
+msgid "Sale Order"
+msgstr "Encomenda de Venda"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_line_rma_wizard
+msgid "Sale Order Line Rma Wizard"
+msgstr "Assistente da Linha de RMA da Encomenda de Venda"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_rma_wizard
+msgid "Sale Order Rma Wizard"
+msgstr "Assistente da RMA da Encomenda de Venda"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order
+msgid "Sales Order"
+msgstr "Encomenda de Venda"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_line
+msgid "Sales Order Line"
+msgstr "Linha de Encomenda de Venda"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Select the product quantity and the requested operation"
+msgstr "Selecione a quantidade de produto e a operação solicitada"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr "Endereço de Envio"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr "Mostrar pedido de RMA do portal numa única página"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr "Pedido de RMA de página única"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_stock_move
+msgid "Stock Move"
+msgstr "Movimento de Stock"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "The limit will decrease when the units in other RMAs are confirmed"
+msgstr "O limite irá diminuir quando as unidades noutras RMAs forem confirmadas"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
+msgid "Unit of Measure"
+msgstr "Unidade de Medida"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"Use the comment button to add relevant information regarding the RMA, like "
+"returned serial numbers or a description of the issue"
+msgstr ""
+"Use o botão de comentário para adicionar informações relevantes sobre a RMA, "
+"como números de série devolvidos ou uma descrição do problema"
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+"Valores provenientes de campos personalizados do formulário de solicitação "
+"de RMA do portal"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+"Quando pressionamos o botão de solicitação de RMA da página de venda do "
+"portal, abrimos numa única página em vez de um popup."
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr "Será usado para devolver a mercadoria quando a RMA for concluída"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
+msgid "Wizard"
+msgstr "Assistente"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"You can only return as much product units as you received for this order"
+msgstr ""
+"Só pode devolver tantas unidades de produto quanto as que recebeu para esta "
+"encomenda"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "You can send a message in every RMA sent"
+msgstr "Você pode enviar uma mensagem em cada RMA enviada"
+
+#. module: rma_sale
+#: code:addons/rma_sale/models/sale.py:0
+#, python-format
+msgid "You may only create RMAs from a confirmed or done sale order."
+msgstr ""
+"Você só pode criar RMAs a partir de uma encomanda de venda confirmada ou "
+"concluída."
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"You're about to perform an RMA request. Our team will process it an will "
+"reach you once it's validated. Keep in mind that:"
+msgstr ""
+"Você está prestes a realizar um pedido de RMA. A nossa equipa irá processá-"
+"lo e entrará em contacto assim que for validado. Tenha presente que:"
From 23e95ca2e07f2d4b4a3110b9f555e48e44c8ce93 Mon Sep 17 00:00:00 2001
From: Francesco Foresti
Date: Tue, 23 Nov 2021 16:52:30 +0000
Subject: [PATCH 35/55] Added translation using Weblate (Italian)
---
rma_sale/i18n/it.po | 467 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 467 insertions(+)
create mode 100644 rma_sale/i18n/it.po
diff --git a/rma_sale/i18n/it.po b/rma_sale/i18n/it.po
new file mode 100644
index 00000000..bc149a5d
--- /dev/null
+++ b/rma_sale/i18n/it.po
@@ -0,0 +1,467 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * rma_sale
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#. module: rma_sale
+#: code:addons/rma_sale/controllers/sale_portal.py:0
+#, python-format
+msgid " (Portal)"
+msgstr ""
+
+#. module: rma_sale
+#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
+#, python-format
+msgid " has been created."
+msgstr ""
+
+#. module: rma_sale
+#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
+#, python-format
+msgid " have been created."
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "×"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Request RMAs"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Request RMAs"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Cancel"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Choose a delivery address"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
+msgid ""
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
+msgid "RMA "
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
+msgid "Requested operation: "
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
+msgid "Requested operation "
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
+msgid "Sale order: "
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
+msgid "Sale order "
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
+msgid "Accept"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_move_ids
+msgid "Allowed Move"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_picking_ids
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_picking_ids
+msgid "Allowed Picking"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_product_ids
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_product_ids
+msgid "Allowed Product"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
+msgid "Cancel"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
+msgid "Category"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Close"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"Comment anything relevant to the return, like serial numbers, a description "
+"of the issue, etc"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
+msgid ""
+"Conversion between Units of Measure can only occur if they belong to the "
+"same category. The conversion will be made based on the ratios."
+msgstr ""
+
+#. module: rma_sale
+#: code:addons/rma_sale/models/sale.py:0
+#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
+#, python-format
+msgid "Create RMA"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.actions.act_window,name:rma_sale.sale_order_create_rma_action
+msgid "Create RMAs"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_uid
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_date
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Delivery"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__picking_id
+msgid "Delivery order"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__description
+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 ""
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+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 ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+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 ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_uid
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_date
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__line_ids
+msgid "Lines"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__move_id
+msgid "Move"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__order_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__order_id
+msgid "Order"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__picking_id
+msgid "Origin Delivery"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__move_id
+msgid "Origin move"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Product"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Quantity"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_rma
+#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
+msgid "RMA"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_count
+msgid "RMA count"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__location_id
+msgid "RMA location"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
+msgid "RMAs"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Request RMAs"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Requested operation"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
+msgid "Sale Order"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_line_rma_wizard
+msgid "Sale Order Line Rma Wizard"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_rma_wizard
+msgid "Sale Order Rma Wizard"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order
+msgid "Sales Order"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_line
+msgid "Sales Order Line"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Select the product quantity and the requested operation"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_stock_move
+msgid "Stock Move"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "The limit will decrease when the units in other RMAs are confirmed"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
+msgid "Unit of Measure"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"Use the comment button to add relevant information regarding the RMA, like "
+"returned serial numbers or a description of the issue"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
+msgid "Wizard"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"You can only return as much product units as you received for this order"
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "You can send a message in every RMA sent"
+msgstr ""
+
+#. module: rma_sale
+#: code:addons/rma_sale/models/sale.py:0
+#, python-format
+msgid "You may only create RMAs from a confirmed or done sale order."
+msgstr ""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"You're about to perform an RMA request. Our team will process it an will "
+"reach you once it's validated. Keep in mind that:"
+msgstr ""
From 5f82d773297afaf667ccca91f2e3801d83c528df Mon Sep 17 00:00:00 2001
From: Samuele Mariani
Date: Thu, 31 Mar 2022 10:42:36 +0000
Subject: [PATCH 36/55] Translated using Weblate (Italian)
Currently translated at 100.0% (79 of 79 strings)
Translation: rma-14.0/rma-14.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-rma_sale/it/
---
rma_sale/i18n/it.po | 160 +++++++++++++++++++++++++-------------------
1 file changed, 91 insertions(+), 69 deletions(-)
diff --git a/rma_sale/i18n/it.po b/rma_sale/i18n/it.po
index bc149a5d..05e79326 100644
--- a/rma_sale/i18n/it.po
+++ b/rma_sale/i18n/it.po
@@ -6,56 +6,58 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2022-04-04 11:05+0000\n"
+"Last-Translator: Samuele Mariani \n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: rma_sale
#: code:addons/rma_sale/controllers/sale_portal.py:0
#, python-format
msgid " (Portal)"
-msgstr ""
+msgstr " (Portale)"
#. module: rma_sale
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
#, python-format
msgid " has been created."
-msgstr ""
+msgstr " è stato creato."
#. module: rma_sale
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
#, python-format
msgid " have been created."
-msgstr ""
+msgstr " è stato creato."
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "×"
-msgstr ""
+msgstr "&volte;"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Request RMAs"
-msgstr ""
+msgstr " Richiesta RMA"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
msgid " Request RMAs"
-msgstr ""
+msgstr " Richiesta RMA"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Cancel"
-msgstr ""
+msgstr " Annulla"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid " Choose a delivery address"
-msgstr ""
+msgstr " Scegli un indirizzo di consegna"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
@@ -63,73 +65,76 @@ msgid ""
""
msgstr ""
+""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid ""
msgstr ""
+""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
msgid "RMA "
-msgstr ""
+msgstr "RMA "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
msgid "Requested operation: "
-msgstr ""
+msgstr "Operazione richiesta: "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
msgid "Requested operation "
-msgstr ""
+msgstr "Operazione richiesta "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
msgid "Sale order: "
-msgstr ""
+msgstr "Ordine di vendita: "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
msgid "Sale order "
-msgstr ""
+msgstr "Ordine di vendita "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
-msgstr ""
+msgstr "Accettare"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_move_ids
msgid "Allowed Move"
-msgstr ""
+msgstr "Movimento consentito"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_picking_ids
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_picking_ids
msgid "Allowed Picking"
-msgstr ""
+msgstr "Trasferimento consentito"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_product_ids
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_product_ids
msgid "Allowed Product"
-msgstr ""
+msgstr "Prodotto consentito"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Cancel"
-msgstr ""
+msgstr "Annulla"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
msgid "Category"
-msgstr ""
+msgstr "Categoria"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
-msgstr ""
+msgstr "Chiudere"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
@@ -137,21 +142,23 @@ msgid ""
"Comment anything relevant to the return, like serial numbers, a description "
"of the issue, etc"
msgstr ""
+"Commenta qualsiasi cosa rilevante per il reso, come numeri di serie, una "
+"descrizione del problema, ecc"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
msgid "Commercial entity"
-msgstr ""
+msgstr "Entità commerciale"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_res_company
msgid "Companies"
-msgstr ""
+msgstr "Aziende"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_res_config_settings
msgid "Config Settings"
-msgstr ""
+msgstr "Impostazioni di Configurazione"
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
@@ -159,50 +166,52 @@ msgid ""
"Conversion between Units of Measure can only occur if they belong to the "
"same category. The conversion will be made based on the ratios."
msgstr ""
+"La conversione tra Unità di Misura può avvenire solo se appartengono alla "
+"stessa categoria. La conversione verrà effettuata in base ai rapporti."
#. module: rma_sale
#: code:addons/rma_sale/models/sale.py:0
#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
#, python-format
msgid "Create RMA"
-msgstr ""
+msgstr "Crea RMA"
#. module: rma_sale
#: model:ir.actions.act_window,name:rma_sale.sale_order_create_rma_action
msgid "Create RMAs"
-msgstr ""
+msgstr "RMA Creati"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_uid
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_uid
msgid "Created by"
-msgstr ""
+msgstr "Creato da"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_date
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_date
msgid "Created on"
-msgstr ""
+msgstr "Creato il"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
msgid "Custom Description"
-msgstr ""
+msgstr "Descrizione personalizzata"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Delivery"
-msgstr ""
+msgstr "Consegna"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__picking_id
msgid "Delivery order"
-msgstr ""
+msgstr "Ordine di consegna"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__description
msgid "Description"
-msgstr ""
+msgstr "Descrizione"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_res_company__display_name
@@ -214,7 +223,7 @@ msgstr ""
#: 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 ""
+msgstr "Nome visualizzato"
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
@@ -223,12 +232,14 @@ msgid ""
"From the frontend sale order page go to a single RMA page creation instead "
"of the usual popup"
msgstr ""
+"Dalla pagina dell'ordine di vendita nel frontend vai alla creazione di una "
+"singola pagina RMA invece del solito popup"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
msgid "Full page RMA creation"
-msgstr ""
+msgstr "Creazione RMA pagina intera"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_res_company__id
@@ -240,12 +251,14 @@ msgstr ""
#: 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 ""
+msgstr "ID"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
+"Se nessuna operazione richiesta è impostata, l'RMA non sarà completato "
+"correttamente"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_res_company____last_update
@@ -257,161 +270,161 @@ msgstr ""
#: 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 ""
+msgstr "Ultima modifica il"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_uid
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_uid
msgid "Last Updated by"
-msgstr ""
+msgstr "Ultimo aggiornamento da"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_date
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_date
msgid "Last Updated on"
-msgstr ""
+msgstr "Ultimo aggiornamento il"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__line_ids
msgid "Lines"
-msgstr ""
+msgstr "Righe"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__move_id
msgid "Move"
-msgstr ""
+msgstr "Spostare"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__order_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__order_id
msgid "Order"
-msgstr ""
+msgstr "Ordine"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__picking_id
msgid "Origin Delivery"
-msgstr ""
+msgstr "Origine consegna"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__move_id
msgid "Origin move"
-msgstr ""
+msgstr "Origine movimento"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Product"
-msgstr ""
+msgstr "Prodotto"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Quantity"
-msgstr ""
+msgstr "Quantità"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_rma
#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
msgid "RMA"
-msgstr ""
+msgstr "RMA"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_count
msgid "RMA count"
-msgstr ""
+msgstr "Conteggio RMA"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__location_id
msgid "RMA location"
-msgstr ""
+msgstr "Ubicazione RMA"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
msgid "RMA request for order"
-msgstr ""
+msgstr "Richiesta RMA per ordine"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
msgid "RMAs"
-msgstr ""
+msgstr "RMA"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
-msgstr ""
+msgstr "Richiesta RMA"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Requested operation"
-msgstr ""
+msgstr "Operazioni richieste"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
msgid "Sale Line"
-msgstr ""
+msgstr "Righe di vendita"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
msgid "Sale Order"
-msgstr ""
+msgstr "Ordine di vendita"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_sale_order_line_rma_wizard
msgid "Sale Order Line Rma Wizard"
-msgstr ""
+msgstr "Procedura guidata riga ordine di vendita Rma"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_sale_order_rma_wizard
msgid "Sale Order Rma Wizard"
-msgstr ""
+msgstr "Procedura guidata ordine di vendita Rma"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_sale_order
msgid "Sales Order"
-msgstr ""
+msgstr "Ordine di vendita"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_sale_order_line
msgid "Sales Order Line"
-msgstr ""
+msgstr "Righe ordine di vendita"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Select the product quantity and the requested operation"
-msgstr ""
+msgstr "Seleziona la quantità prodotto e l'operazione richiesta"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Shipping Address"
-msgstr ""
+msgstr "Indirizzo di spedizione"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid "Show portal RMA request in a single page"
-msgstr ""
+msgstr "Mostra il portale della richiesta RMA in una singola pagina"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid "Single page RMA request"
-msgstr ""
+msgstr "Richiesta RMA a singola pagina"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
-msgstr ""
+msgstr "Movimento delle scorte"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
-msgstr ""
+msgstr "Il limite diminuirà quando le unità in altri RMA saranno confermate"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
msgid "Unit of Measure"
-msgstr ""
+msgstr "Unità di misura"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
@@ -419,11 +432,15 @@ msgid ""
"Use the comment button to add relevant information regarding the RMA, like "
"returned serial numbers or a description of the issue"
msgstr ""
+"Usa il pulsante commento per aggiungere informazioni rilevanti riguardo "
+"l'RMA, come numeri seriali resi o una descrizione dell'errore"
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
msgid "Values coming from portal RMA request form custom fields"
msgstr ""
+"Valori provenienti dai campi personalizzati del modulo di richiesta RMA del "
+"portale"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
@@ -431,33 +448,36 @@ msgid ""
"When we hit the RMA request button from the portal sale page, open in a "
"single page instead of a popup."
msgstr ""
+"Quando premiamo il pulsante di richiesta RMA dalla pagina di vendita del "
+"portale, apriamo in una singola pagina anziché in un popup."
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
msgid "Will be used to return the goods when the RMA is completed"
-msgstr ""
+msgstr "Verrà utilizzato per restituire la merce una volta completato l'RMA"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
msgid "Wizard"
-msgstr ""
+msgstr "Procedura guidata"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid ""
"You can only return as much product units as you received for this order"
msgstr ""
+"Puoi restituire solo le unità di prodotto che hai ricevuto per questo ordine"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "You can send a message in every RMA sent"
-msgstr ""
+msgstr "Puoi inviare un messaggio in ogni RMA inviato"
#. module: rma_sale
#: code:addons/rma_sale/models/sale.py:0
#, python-format
msgid "You may only create RMAs from a confirmed or done sale order."
-msgstr ""
+msgstr "Puoi creare RMA solo da un ordine di vendita confermato o concluso."
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
@@ -465,3 +485,5 @@ msgid ""
"You're about to perform an RMA request. Our team will process it an will "
"reach you once it's validated. Keep in mind that:"
msgstr ""
+"Stai per eseguire una richiesta RMA. Il nostro team lo elaborerà e ti "
+"arriverà una volta convalidato. Tieni presente che:"
From 71dec5c1d83c4ab0c32591b5b5949f56fba41e1f Mon Sep 17 00:00:00 2001
From: Giovanni
Date: Thu, 21 Apr 2022 14:13:48 +0200
Subject: [PATCH 37/55] [FIX] rma_sale: issue opening rma view from wizard +
action permission issues
---
rma_sale/README.rst | 1 +
rma_sale/__manifest__.py | 2 +-
rma_sale/models/sale.py | 2 +-
rma_sale/readme/CONTRIBUTORS.rst | 1 +
rma_sale/static/description/index.html | 1 +
rma_sale/wizard/sale_order_rma_wizard.py | 2 +-
6 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/rma_sale/README.rst b/rma_sale/README.rst
index b2d80532..07a21163 100644
--- a/rma_sale/README.rst
+++ b/rma_sale/README.rst
@@ -101,6 +101,7 @@ Contributors
* David Vidal
* Chafique Delli
+* Giovanni Serra - Ooops
Maintainers
~~~~~~~~~~~
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 6373270d..e486ad43 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.1.0.1",
+ "version": "14.0.1.2.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py
index 78b65170..3c15ad7b 100644
--- a/rma_sale/models/sale.py
+++ b/rma_sale/models/sale.py
@@ -60,7 +60,7 @@ class SaleOrder(models.Model):
def action_view_rma(self):
self.ensure_one()
- action = self.env.ref("rma.rma_action").read()[0]
+ action = self.sudo().env.ref("rma.rma_action").read()[0]
rma = self.rma_ids
if len(rma) == 1:
action.update(
diff --git a/rma_sale/readme/CONTRIBUTORS.rst b/rma_sale/readme/CONTRIBUTORS.rst
index 49a9884e..c93f1606 100644
--- a/rma_sale/readme/CONTRIBUTORS.rst
+++ b/rma_sale/readme/CONTRIBUTORS.rst
@@ -5,3 +5,4 @@
* David Vidal
* Chafique Delli
+* Giovanni Serra - Ooops
diff --git a/rma_sale/static/description/index.html b/rma_sale/static/description/index.html
index ffa4f8f4..46d15790 100644
--- a/rma_sale/static/description/index.html
+++ b/rma_sale/static/description/index.html
@@ -451,6 +451,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
Chafique Delli <chafique.delli@akretion.com >
+Giovanni Serra - Ooops <giovanni@ooops404.com >
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index f129c818..baac18a2 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -75,7 +75,7 @@ class SaleOrderRmaWizard(models.TransientModel):
return
for rec in rma:
rec.action_confirm()
- action = self.env.ref("rma.rma_action").read()[0]
+ action = self.sudo().env.ref("rma.rma_action").read()[0]
if len(rma) > 1:
action["domain"] = [("id", "in", rma.ids)]
elif rma:
From d1cc04a6361771640f86901b02608a570fb10d39 Mon Sep 17 00:00:00 2001
From: david
Date: Thu, 20 Jan 2022 17:01:59 +0100
Subject: [PATCH 38/55] [IMP] rma_sale: avoid submit form in portal if no info
TT33572
---
rma_sale/static/src/js/rma_portal_form.js | 135 +++++++++++++++++-----
1 file changed, 107 insertions(+), 28 deletions(-)
diff --git a/rma_sale/static/src/js/rma_portal_form.js b/rma_sale/static/src/js/rma_portal_form.js
index f407ed47..1bda0788 100644
--- a/rma_sale/static/src/js/rma_portal_form.js
+++ b/rma_sale/static/src/js/rma_portal_form.js
@@ -4,42 +4,121 @@
odoo.define("rma_sale.animation", function (require) {
"use strict";
- var sAnimation = require("website.content.snippets.animation");
+ const publicWidget = require("web.public.widget");
- // In the customer portal when a RMA operation is selected show the comments
- // selector so the user doesn't miss the chance to add his comments
- sAnimation.registry.rma_operation_portal = sAnimation.Class.extend({
- selector: ".rma-operation",
- start: function () {
- this.id = this.el.name.replace("-operation_id", "");
- this.$comment = $("#comment-" + this.id);
- this.$comment_input = $("[name='" + this.id + "-description']");
- var _this = this;
- this.$el.on("change", function () {
- _this._onChangeOperationId();
- });
+ /**
+ * Adds some machinery to the customer portal RMA form:
+ *
+ * - Avoid submitting the form if no qty or operation is reported.
+ * - Show automatically the observations field when the operation is selected
+ * and hide it back with no operation selected.
+ */
+ publicWidget.registry.PortalRmaSale = publicWidget.Widget.extend({
+ selector: "#form-request-rma",
+ events: {
+ "change .rma-operation": "_onChangeOperationId",
+ "change #delivery-rma-qty input": "_onChangeQty",
},
- _show_comment: function () {
- if (this.$comment) {
- this.$comment.removeClass("show");
- this.$comment.addClass("show");
- if (this.$comment_input) {
- this.$comment_input.focus();
+
+ /**
+ * @override
+ */
+ start: function () {
+ const ids = this.$("[name*='-operation_id']")
+ .map(function () {
+ return this.name.replace("-operation_id", "");
+ })
+ .get();
+ this.$submit = $("#form-request-rma button[type='submit']");
+ this.rows_ids = ids;
+ // We'll build an object that will ease the form check. It could be further
+ // extended with additional checks.
+ this.rows = {};
+ _.each(ids, (id) => {
+ this.rows[id] = {
+ $comment: this.$(`#comment-${id}`),
+ $comment_input: this.$(`[name='${id}-description']`),
+ $operation: this.$(`[name='${id}-operation_id']`),
+ $qty: this.$(`[name='${id}-quantity']`),
+ };
+ });
+ this._checkCanSubmit();
+ },
+ /**
+ * @private
+ * @param {Object} row: the form row structure
+ */
+ _show_comment: function (row) {
+ if (row.$comment) {
+ row.$comment.addClass("show");
+ if (row.$comment_input) {
+ row.$comment_input.focus();
}
}
},
- _hide_comment: function () {
- if (this.$comment) {
- this.$comment.removeClass("show");
+ /**
+ * @private
+ * @param {Object} row: the form row structure
+ */
+ _hide_comment: function (row) {
+ if (row.$comment) {
+ row.$comment.removeClass("show");
}
},
- _onChangeOperationId: function () {
- // Toggle comment on or off if an operation is requested
- if (this.$el && this.$el.val()) {
- this._show_comment();
- } else {
- this._hide_comment();
+ /**
+ * We should be able to submit only when an operation is selected and a
+ * quantity entered in a row at least.
+ * @private
+ */
+ _canSubmit: function () {
+ var can_submit = false;
+ for (const id of this.rows_ids) {
+ const row = this.rows[id];
+ if (
+ row &&
+ // Qty greater than 0
+ row.$qty &&
+ row.$qty.val() &&
+ Number(row.$qty.val()) &&
+ // An operation is defined
+ row.$operation &&
+ row.$operation.val()
+ ) {
+ can_submit = true;
+ break;
+ }
}
+ return can_submit;
+ },
+ /**
+ * Checked every time we change the quantity or the operation and at start
+ *
+ * @private
+ * @param {Object} row: the form row structure
+ */
+ _checkCanSubmit: function () {
+ this.$submit.prop("disabled", !this._canSubmit());
+ },
+ /**
+ * @private
+ * @param {InputEvent} ev
+ */
+ _onChangeOperationId: function (ev) {
+ // Toggle comment on or off if an operation is requested
+ const id = ev.currentTarget.name.replace("-operation_id", "");
+ var row = this.rows[id];
+ if (row && row.$operation && row.$operation.val()) {
+ this._show_comment(row);
+ } else {
+ this._hide_comment(row);
+ }
+ this._checkCanSubmit();
+ },
+ /**
+ * @private
+ */
+ _onChangeQty: function () {
+ this._checkCanSubmit();
},
});
});
From 7339f694837dd23774ca437b0ff8e980ca58cef1 Mon Sep 17 00:00:00 2001
From: david
Date: Tue, 22 Mar 2022 14:50:26 +0100
Subject: [PATCH 39/55] [FIX] rma_sale: subscribe portal users to RMA
notifications
TT35269
---
rma_sale/__manifest__.py | 2 +-
rma_sale/controllers/sale_portal.py | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index e486ad43..b3e5c4f8 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.1.2.0",
+ "version": "14.0.2.0.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index eb5ab385..967e12e4 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -67,9 +67,13 @@ class CustomerPortal(CustomerPortal):
rma = wizard.sudo().create_rma(from_portal=True)
for rec in rma:
rec.origin += _(" (Portal)")
- # Add the user as follower of the created RMAs so they can
- # later view them.
+ # Add the user as follower of the created RMAs so they can later view them.
rma.message_subscribe([request.env.user.partner_id.id])
+ # Subscribe the user to the notification subtype so he receives the confirmation
+ # note.
+ rma.message_follower_ids.filtered(
+ lambda x: x.partner_id == request.env.user.partner_id
+ ).subtype_ids += request.env.ref("rma.mt_rma_notification")
if len(rma) == 0:
route = order_sudo.get_portal_url()
else:
From 6528b8e8be5eb47b7382015c26c5af117e286093 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Mon, 16 May 2022 18:14:50 +0200
Subject: [PATCH 40/55] =?UTF-8?q?[FIX]=20rma=20+=20rma=5Fsale:=20Allow=20t?=
=?UTF-8?q?o=20create=20an=20RMA=20to=20a=20user=20with=20access=5Fto?=
=?UTF-8?q?=E2=80=A6ken=20to=20sale=20order=20(no=20user=20created).=20[FI?=
=?UTF-8?q?X]=20rma=20+=20rma=5Fsale:=20Show=20RMA's=20list=20(with=20shar?=
=?UTF-8?q?e=20url)=20to=20a=20user=20with=20access=5Ftoken=20to=20sale=20?=
=?UTF-8?q?order=20(no=20user=20created).?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
rma_sale/__manifest__.py | 2 +-
rma_sale/controllers/sale_portal.py | 12 +++++++++++-
rma_sale/views/sale_portal_template.xml | 2 +-
rma_sale/wizard/sale_order_rma_wizard.py | 17 ++++++++++++++---
4 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index b3e5c4f8..4ab4bbee 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.0.0",
+ "version": "14.0.2.1.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index 967e12e4..50a7d51d 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -1,4 +1,5 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
+# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, http
@@ -64,6 +65,9 @@ class CustomerPortal(CustomerPortal):
"custom_description": custom_description,
}
)
+ user_has_group_portal = request.env.user.has_group(
+ "base.group_portal"
+ ) or request.env.user.has_group("base.group_public")
rma = wizard.sudo().create_rma(from_portal=True)
for rec in rma:
rec.origin += _(" (Portal)")
@@ -76,8 +80,14 @@ class CustomerPortal(CustomerPortal):
).subtype_ids += request.env.ref("rma.mt_rma_notification")
if len(rma) == 0:
route = order_sudo.get_portal_url()
+ elif len(rma) == 1:
+ route = rma._get_share_url() if user_has_group_portal else rma.access_url
else:
- route = "/my/rmas?sale_id=%d" % order_id
+ route = (
+ order._get_share_url()
+ if user_has_group_portal
+ else "/my/rmas?sale_id=%d" % order_id
+ )
return request.redirect(route)
@http.route(
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index 0150d4ab..dcac93a9 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -4,7 +4,7 @@
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index baac18a2..04c30cdf 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -1,7 +1,8 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
+# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo import _, api, fields, models
+from odoo import SUPERUSER_ID, _, api, fields, models
class SaleOrderRmaWizard(models.TransientModel):
@@ -46,11 +47,21 @@ class SaleOrderRmaWizard(models.TransientModel):
help="Values coming from portal RMA request form custom fields",
)
- def create_rma(self, from_portal=None):
+ def create_rma(self, from_portal=False):
self.ensure_one()
+ user_has_group_portal = self.env.user.has_group(
+ "base.group_portal"
+ ) or self.env.user.has_group("base.group_public")
lines = self.line_ids.filtered(lambda r: r.quantity > 0.0)
val_list = [line._prepare_rma_values() for line in lines]
- rma = self.env["rma"].create(val_list)
+ rma_model = (
+ self.env["rma"].with_user(SUPERUSER_ID)
+ if user_has_group_portal
+ else self.env["rma"]
+ )
+ rma = rma_model.create(val_list)
+ if from_portal:
+ rma._add_message_subscribe_partner()
# post messages
msg_list = [
'%s ' % (r.id, r.name)
From f5f142d9389dd8a004d75b92c47f7cecc41c9c77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Wed, 21 Sep 2022 09:39:05 +0200
Subject: [PATCH 41/55] [FIX] rma_sale: Filter done pickings and done moves
TT39089
---
rma_sale/models/rma.py | 2 +-
rma_sale/wizard/sale_order_rma_wizard.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 4ffc5e5f..7446ca2c 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -53,7 +53,7 @@ class Rma(models.Model):
if rec.order_id:
order_move = rec.order_id.order_line.mapped("move_ids")
rec.allowed_move_ids = order_move.filtered(
- lambda r: r.picking_id == self.picking_id
+ lambda r: r.picking_id == self.picking_id and r.state == "done"
).ids
else:
rec.allowed_move_ids = self.picking_id.move_lines.ids
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index 04c30cdf..cc0d3ea1 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -167,6 +167,7 @@ class SaleOrderLineRmaWizard(models.TransientModel):
r.sale_line_id == record.sale_line_id
and r.sale_line_id.product_id == record.product_id
and r.sale_line_id.order_id == record.order_id
+ and r.state == "done"
)
)
record.move_id = move_id
@@ -183,7 +184,9 @@ class SaleOrderLineRmaWizard(models.TransientModel):
line = record.order_id.order_line.filtered(
lambda r: r.product_id == record.product_id
)
- record.allowed_picking_ids = line.mapped("move_ids.picking_id")
+ record.allowed_picking_ids = line.mapped("move_ids.picking_id").filtered(
+ lambda x: x.state == "done"
+ )
def _prepare_rma_values(self):
self.ensure_one()
From 04ff94bf6b1c97ac0508868637412abb35e97ada Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Wed, 21 Sep 2022 09:41:21 +0200
Subject: [PATCH 42/55] [FIX] rma_sale: Set picking_id field to required in
wizard to avoid creating rma if nothing has been delivered yet
TT39089
---
rma_sale/wizard/sale_order_rma_wizard_views.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/rma_sale/wizard/sale_order_rma_wizard_views.xml b/rma_sale/wizard/sale_order_rma_wizard_views.xml
index 254c8b2b..505020b0 100644
--- a/rma_sale/wizard/sale_order_rma_wizard_views.xml
+++ b/rma_sale/wizard/sale_order_rma_wizard_views.xml
@@ -25,7 +25,11 @@
options="{'no_create': True}"
/>
-
+
From efb0464833c379d3fd1f222c3d1485b6fe2100f8 Mon Sep 17 00:00:00 2001
From: Alex Vining
Date: Tue, 20 Sep 2022 10:28:14 -0400
Subject: [PATCH 43/55] [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 .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -463,7 +463,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.
Current maintainer :
-
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/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index b49c9d47..54d4a456 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -1,10 +1,10 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo.tests import Form, SavepointCase
+from odoo.tests import Form, TransactionCase
-class TestRmaSale(SavepointCase):
+class TestRmaSale(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestRmaSale, cls).setUpClass()
diff --git a/rma_sale/views/assets.xml b/rma_sale/views/assets.xml
deleted file mode 100644
index 53633488..00000000
--- a/rma_sale/views/assets.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/rma_sale/views/sale_portal_template.xml b/rma_sale/views/sale_portal_template.xml
index dcac93a9..ff2739e5 100644
--- a/rma_sale/views/sale_portal_template.xml
+++ b/rma_sale/views/sale_portal_template.xml
@@ -66,9 +66,9 @@
-
+
-
+
@@ -93,7 +93,7 @@
-
+
---
-
+
@@ -251,7 +251,7 @@
class="btn btn-sm btn-secondary"
>
-
+
RMA
@@ -286,7 +286,7 @@
- RMA request for order
+ RMA request for order
@@ -315,7 +315,7 @@
diff --git a/rma_sale/wizard/sale_order_rma_wizard.py b/rma_sale/wizard/sale_order_rma_wizard.py
index cc0d3ea1..a55c421d 100644
--- a/rma_sale/wizard/sale_order_rma_wizard.py
+++ b/rma_sale/wizard/sale_order_rma_wizard.py
@@ -124,7 +124,6 @@ class SaleOrderLineRmaWizard(models.TransientModel):
related="product_id.uom_id.category_id",
)
quantity = fields.Float(
- string="Quantity",
digits="Product Unit of Measure",
required=True,
)
From 4dce7e6b53cd9403def7e81106f1ae24632f2329 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Thu, 22 Sep 2022 09:08:27 +0200
Subject: [PATCH 44/55] [FIX] rma_sale: Allow to request a rma from portal
order page only with portal user permission
---
rma_sale/README.rst | 1 +
rma_sale/__manifest__.py | 2 +-
rma_sale/controllers/sale_portal.py | 2 +-
rma_sale/readme/CONTRIBUTORS.rst | 1 +
rma_sale/static/description/index.html | 1 +
rma_sale/tests/test_rma_sale.py | 48 ++++++++++++++++++++++++--
6 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/rma_sale/README.rst b/rma_sale/README.rst
index 1f3b8076..a867b0a7 100644
--- a/rma_sale/README.rst
+++ b/rma_sale/README.rst
@@ -99,6 +99,7 @@ Contributors
* Ernesto Tejeda
* Pedro M. Baeza
* David Vidal
+ * Víctor Martínez
* Chafique Delli
* Giovanni Serra - Ooops
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index ab99826d..ec37b648 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": "15.0.1.0.0",
+ "version": "15.0.1.0.1",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/controllers/sale_portal.py b/rma_sale/controllers/sale_portal.py
index 50a7d51d..05c07dcb 100644
--- a/rma_sale/controllers/sale_portal.py
+++ b/rma_sale/controllers/sale_portal.py
@@ -25,7 +25,7 @@ class CustomerPortal(CustomerPortal):
except (AccessError, MissingError):
return request.redirect("/my")
order_obj = request.env["sale.order"]
- wizard_obj = request.env["sale.order.rma.wizard"]
+ wizard_obj = request.env["sale.order.rma.wizard"].sudo()
wizard_line_field_types = {
f: d["type"] for f, d in wizard_obj.line_ids.fields_get().items()
}
diff --git a/rma_sale/readme/CONTRIBUTORS.rst b/rma_sale/readme/CONTRIBUTORS.rst
index c93f1606..75646b6d 100644
--- a/rma_sale/readme/CONTRIBUTORS.rst
+++ b/rma_sale/readme/CONTRIBUTORS.rst
@@ -3,6 +3,7 @@
* Ernesto Tejeda
* Pedro M. Baeza
* David Vidal
+ * Víctor Martínez
* Chafique Delli
* Giovanni Serra - Ooops
diff --git a/rma_sale/static/description/index.html b/rma_sale/static/description/index.html
index 43411b5a..74d1706f 100644
--- a/rma_sale/static/description/index.html
+++ b/rma_sale/static/description/index.html
@@ -448,6 +448,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
Ernesto Tejeda
Pedro M. Baeza
David Vidal
+Víctor Martínez
Chafique Delli <chafique.delli@akretion.com >
diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index 54d4a456..78e867b5 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -1,13 +1,15 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
+# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase
+from odoo.tests.common import users
class TestRmaSale(TransactionCase):
@classmethod
def setUpClass(cls):
- super(TestRmaSale, cls).setUpClass()
+ super().setUpClass()
cls.res_partner = cls.env["res.partner"]
cls.product_product = cls.env["product.product"]
cls.sale_order = cls.env["sale.order"]
@@ -18,7 +20,10 @@ class TestRmaSale(TransactionCase):
cls.product_2 = cls.product_product.create(
{"name": "Product test 2", "type": "product"}
)
- cls.partner = cls.res_partner.create({"name": "Partner test"})
+ cls.partner = cls.res_partner.create(
+ {"name": "Partner test", "email": "partner@rma"}
+ )
+ cls._partner_portal_wizard(cls, cls.partner)
order_form = Form(cls.sale_order)
order_form.partner_id = cls.partner
with order_form.order_line.new() as line_form:
@@ -35,6 +40,14 @@ class TestRmaSale(TransactionCase):
cls.order_out_picking.move_lines.quantity_done = 5
cls.order_out_picking.button_validate()
+ def _partner_portal_wizard(self, partner):
+ wizard_all = (
+ self.env["portal.wizard"]
+ .with_context(**{"active_ids": [partner.id]})
+ .create({})
+ )
+ wizard_all.user_ids.action_grant_access()
+
def _rma_sale_wizard(self, order):
wizard_id = order.action_create_rma()["res_id"]
return self.env["sale.order.rma.wizard"].browse(wizard_id)
@@ -83,6 +96,37 @@ class TestRmaSale(TransactionCase):
rma.action_refund()
self.assertEqual(rma.refund_id.user_id, user)
+ @users("partner@rma")
+ def test_create_rma_from_so_portal_user(self):
+ order = self.sale_order
+ wizard_obj = (
+ self.env["sale.order.rma.wizard"].sudo().with_context(active_id=order)
+ )
+ operation = self.env["rma.operation"].sudo().search([], limit=1)
+ line_vals = [
+ (
+ 0,
+ 0,
+ {
+ "product_id": order.order_line.product_id.id,
+ "sale_line_id": order.order_line.id,
+ "quantity": order.order_line.product_uom_qty,
+ "uom_id": order.order_line.product_uom.id,
+ "picking_id": order.picking_ids[0].id,
+ "operation_id": operation.id,
+ },
+ )
+ ]
+ wizard = wizard_obj.create(
+ {
+ "line_ids": line_vals,
+ "location_id": order.warehouse_id.rma_loc_id.id,
+ }
+ )
+ rma = wizard.sudo().create_rma(from_portal=True)
+ self.assertEqual(rma.order_id, order)
+ self.assertIn(order.partner_id, rma.message_partner_ids)
+
def test_create_recurrent_rma(self):
"""An RMA of a product that had an RMA in the past should be possible"""
wizard = self._rma_sale_wizard(self.sale_order)
From 515f2af7b9095a7e349ff6ac8b7328ea99cef32a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Mon, 10 Oct 2022 15:43:55 +0200
Subject: [PATCH 45/55] [IMP] rma_sale: Improve tests
TT37303
---
rma_sale/tests/test_rma_sale.py | 62 ++++++++++++++++++++++-----------
1 file changed, 42 insertions(+), 20 deletions(-)
diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index 78e867b5..ad526684 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -6,13 +6,13 @@ from odoo.tests import Form, TransactionCase
from odoo.tests.common import users
-class TestRmaSale(TransactionCase):
+class TestRmaSaleBase(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.res_partner = cls.env["res.partner"]
cls.product_product = cls.env["product.product"]
- cls.sale_order = cls.env["sale.order"]
+ cls.so_model = cls.env["sale.order"]
cls.product_1 = cls.product_product.create(
{"name": "Product test 1", "type": "product"}
@@ -23,22 +23,18 @@ class TestRmaSale(TransactionCase):
cls.partner = cls.res_partner.create(
{"name": "Partner test", "email": "partner@rma"}
)
+ cls.report_model = cls.env["ir.actions.report"]
+ cls.rma_operation_model = cls.env["rma.operation"]
cls._partner_portal_wizard(cls, cls.partner)
- order_form = Form(cls.sale_order)
- order_form.partner_id = cls.partner
- with order_form.order_line.new() as line_form:
- line_form.product_id = cls.product_1
- line_form.product_uom_qty = 5
- cls.sale_order = order_form.save()
- cls.sale_order.action_confirm()
- # Maybe other modules create additional lines in the create
- # method in sale.order model, so let's find the correct line.
- cls.order_line = cls.sale_order.order_line.filtered(
- lambda r: r.product_id == cls.product_1
- )
- cls.order_out_picking = cls.sale_order.picking_ids
- cls.order_out_picking.move_lines.quantity_done = 5
- cls.order_out_picking.button_validate()
+
+ def _create_sale_order(self, products):
+ order_form = Form(self.so_model)
+ order_form.partner_id = self.partner
+ for product_info in products:
+ with order_form.order_line.new() as line_form:
+ line_form.product_id = product_info[0]
+ line_form.product_uom_qty = product_info[1]
+ return order_form.save()
def _partner_portal_wizard(self, partner):
wizard_all = (
@@ -52,6 +48,22 @@ class TestRmaSale(TransactionCase):
wizard_id = order.action_create_rma()["res_id"]
return self.env["sale.order.rma.wizard"].browse(wizard_id)
+
+class TestRmaSale(TestRmaSaleBase):
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+ cls.sale_order = cls._create_sale_order(cls, [[cls.product_1, 5]])
+ cls.sale_order.action_confirm()
+ # Maybe other modules create additional lines in the create
+ # method in sale.order model, so let's find the correct line.
+ cls.order_line = cls.sale_order.order_line.filtered(
+ lambda r: r.product_id == cls.product_1
+ )
+ cls.order_out_picking = cls.sale_order.picking_ids
+ cls.order_out_picking.move_lines.quantity_done = 5
+ cls.order_out_picking.button_validate()
+
def test_create_rma_with_so(self):
rma_form = Form(self.env["rma"])
rma_form.partner_id = self.partner
@@ -66,8 +78,7 @@ class TestRmaSale(TransactionCase):
def test_create_rma_from_so(self):
order = self.sale_order
- wizard_id = order.action_create_rma()["res_id"]
- wizard = self.env["sale.order.rma.wizard"].browse(wizard_id)
+ wizard = self._rma_sale_wizard(order)
rma = self.env["rma"].browse(wizard.create_and_open_rma()["res_id"])
self.assertEqual(rma.partner_id, order.partner_id)
self.assertEqual(rma.order_id, order)
@@ -102,7 +113,7 @@ class TestRmaSale(TransactionCase):
wizard_obj = (
self.env["sale.order.rma.wizard"].sudo().with_context(active_id=order)
)
- operation = self.env["rma.operation"].sudo().search([], limit=1)
+ operation = self.rma_operation_model.sudo().search([], limit=1)
line_vals = [
(
0,
@@ -159,3 +170,14 @@ class TestRmaSale(TransactionCase):
rma.product_uom_qty,
"We should be allowed to return the product again",
)
+
+ def test_report_rma(self):
+ wizard = self._rma_sale_wizard(self.sale_order)
+ rma = self.env["rma"].browse(wizard.create_and_open_rma()["res_id"])
+ operation = self.rma_operation_model.sudo().search([], limit=1)
+ rma.operation_id = operation.id
+ res = self.report_model._get_report_from_name(
+ "rma.report_rma"
+ )._render_qweb_text(rma.ids, False)
+ self.assertRegex(str(res[0]), self.sale_order.name)
+ self.assertRegex(str(res[0]), operation.name)
From 58e2383ed220b42c03034ed1958321d80e6dbd0d Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Mon, 5 Dec 2022 18:36:39 +0100
Subject: [PATCH 46/55] [IMP] rma_sale: Domains performance
For avoiding a big list of IDs being transferred when no sales order
is selected on the RMA, we have changed domains to make use of the
possibility of pyjs expressions allowed in the domains.
No ternary operators nor list sums are allowed in pyjs, but using a
combination of allowed IDs with a controlled length of values + and/or
operators to switch domains is enough for having the right performance
and avoid to depend on other modules like web_domain_field.
---
rma_sale/__manifest__.py | 2 +-
rma_sale/models/rma.py | 26 ++++++++++++++++----------
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index ec37b648..eec2e878 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": "15.0.1.0.1",
+ "version": "15.0.1.1.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 0b1bc5d1..9286b05b 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -21,7 +21,10 @@ class Rma(models.Model):
comodel_name="stock.picking",
compute="_compute_allowed_picking_ids",
)
- picking_id = fields.Many2one(domain="[('id', 'in', allowed_picking_ids)]")
+ picking_id = fields.Many2one(
+ domain="(order_id or partner_id) and [('id', 'in', allowed_picking_ids)] or "
+ "[('state', '=', 'done'), ('picking_type_id.code', '=', 'outgoing')] "
+ )
allowed_move_ids = fields.Many2many(
comodel_name="sale.order.line",
compute="_compute_allowed_move_ids",
@@ -34,18 +37,25 @@ class Rma(models.Model):
comodel_name="product.product",
compute="_compute_allowed_product_ids",
)
- product_id = fields.Many2one(domain="[('id', 'in', allowed_product_ids)]")
+ product_id = fields.Many2one(
+ domain="order_id and [('id', 'in', allowed_product_ids)] or "
+ "[('type', 'in', ['consu', 'product'])]"
+ )
@api.depends("partner_id", "order_id")
def _compute_allowed_picking_ids(self):
domain = [("state", "=", "done"), ("picking_type_id.code", "=", "outgoing")]
for rec in self:
+ domain2 = domain.copy()
if rec.partner_id:
commercial_partner = rec.partner_id.commercial_partner_id
- domain.append(("partner_id", "child_of", commercial_partner.id))
+ domain2.append(("partner_id", "child_of", commercial_partner.id))
if rec.order_id:
- domain.append(("sale_id", "=", rec.order_id.id))
- rec.allowed_picking_ids = self.env["stock.picking"].search(domain)
+ domain2.append(("sale_id", "=", rec.order_id.id))
+ if domain2 != domain:
+ rec.allowed_picking_ids = self.env["stock.picking"].search(domain2)
+ else:
+ rec.allowed_picking_ids = False # don't populate a big list
@api.depends("order_id", "picking_id")
def _compute_allowed_move_ids(self):
@@ -67,11 +77,7 @@ class Rma(models.Model):
lambda r: r.type in ["consu", "product"]
).ids
else:
- rec.allowed_product_ids = (
- self.env["product.product"]
- .search([("type", "in", ["consu", "product"])])
- .ids
- )
+ rec.allowed_product_ids = False # don't populate a big list
@api.onchange("partner_id")
def _onchange_partner_id(self):
From 9846ae5627fa69cb87acd63792cb32ce55554ba0 Mon Sep 17 00:00:00 2001
From: Francesco Foresti
Date: Mon, 2 Jan 2023 08:57:48 +0000
Subject: [PATCH 47/55] Translated using Weblate (Italian)
Currently translated at 100.0% (79 of 79 strings)
Translation: rma-15.0/rma-15.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale/it/
---
rma_sale/i18n/it.po | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/rma_sale/i18n/it.po b/rma_sale/i18n/it.po
index 05e79326..5d56aaba 100644
--- a/rma_sale/i18n/it.po
+++ b/rma_sale/i18n/it.po
@@ -6,15 +6,15 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2022-04-04 11:05+0000\n"
-"Last-Translator: Samuele Mariani \n"
+"PO-Revision-Date: 2023-06-15 11:09+0000\n"
+"Last-Translator: Francesco Foresti \n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.3.2\n"
+"X-Generator: Weblate 4.14.1\n"
#. module: rma_sale
#: code:addons/rma_sale/controllers/sale_portal.py:0
@@ -102,7 +102,7 @@ msgstr "Ordine di vendita "
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
msgid "Accept"
-msgstr "Accettare"
+msgstr "Accetta"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_move_ids
@@ -158,7 +158,7 @@ msgstr "Aziende"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_res_config_settings
msgid "Config Settings"
-msgstr "Impostazioni di Configurazione"
+msgstr "Impostazioni di configurazione"
#. module: rma_sale
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
@@ -166,8 +166,9 @@ msgid ""
"Conversion between Units of Measure can only occur if they belong to the "
"same category. The conversion will be made based on the ratios."
msgstr ""
-"La conversione tra Unità di Misura può avvenire solo se appartengono alla "
-"stessa categoria. La conversione verrà effettuata in base ai rapporti."
+"Le conversioni tra unità di misura possono avvenire solo se appartengono "
+"alla stessa categoria. La conversione verrà effettuata in base alle "
+"proporzioni."
#. module: rma_sale
#: code:addons/rma_sale/models/sale.py:0
@@ -292,7 +293,7 @@ msgstr "Righe"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__move_id
msgid "Move"
-msgstr "Spostare"
+msgstr "Movimento"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__order_id
@@ -389,7 +390,7 @@ msgstr "Ordine di vendita"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_sale_order_line
msgid "Sales Order Line"
-msgstr "Righe ordine di vendita"
+msgstr "Riga ordine di vendita"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
@@ -414,7 +415,7 @@ msgstr "Richiesta RMA a singola pagina"
#. module: rma_sale
#: model:ir.model,name:rma_sale.model_stock_move
msgid "Stock Move"
-msgstr "Movimento delle scorte"
+msgstr "Movimento di magazzino"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
From 4b9bf2b1dba98a1fe563a9389e519ad007d74cc7 Mon Sep 17 00:00:00 2001
From: mymage
Date: Mon, 3 Apr 2023 19:23:41 +0000
Subject: [PATCH 48/55] Translated using Weblate (Italian)
Currently translated at 100.0% (79 of 79 strings)
Translation: rma-15.0/rma-15.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale/it/
---
rma_sale/i18n/it.po | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/rma_sale/i18n/it.po b/rma_sale/i18n/it.po
index 5d56aaba..3eee8265 100644
--- a/rma_sale/i18n/it.po
+++ b/rma_sale/i18n/it.po
@@ -6,15 +6,15 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-06-15 11:09+0000\n"
-"Last-Translator: Francesco Foresti \n"
+"PO-Revision-Date: 2023-07-04 15:09+0000\n"
+"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.17\n"
#. module: rma_sale
#: code:addons/rma_sale/controllers/sale_portal.py:0
@@ -65,8 +65,8 @@ msgid ""
""
msgstr ""
-""
+""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
@@ -134,7 +134,7 @@ msgstr "Categoria"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Close"
-msgstr "Chiudere"
+msgstr "Chiudi"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
@@ -277,7 +277,7 @@ msgstr "Ultima modifica il"
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_uid
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_uid
msgid "Last Updated by"
-msgstr "Ultimo aggiornamento da"
+msgstr "Ultimo aggiornamento di"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_date
From eb43a0a083e1a6d1bc75ed10310d48b2877e5b29 Mon Sep 17 00:00:00 2001
From: Nikolaus Weingartmair
Date: Wed, 5 Apr 2023 06:44:37 +0000
Subject: [PATCH 49/55] Added translation using Weblate (German)
Currently translated at 100.0% (79 of 79 strings)
Translation: rma-15.0/rma-15.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale/de/
---
rma_sale/i18n/de.po | 480 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 480 insertions(+)
create mode 100644 rma_sale/i18n/de.po
diff --git a/rma_sale/i18n/de.po b/rma_sale/i18n/de.po
new file mode 100644
index 00000000..608ea4b3
--- /dev/null
+++ b/rma_sale/i18n/de.po
@@ -0,0 +1,480 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * rma_sale
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 15.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2023-04-05 07:26+0000\n"
+"Last-Translator: Nikolaus Weingartmair "
+"\n"
+"Language-Team: none\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.14.1\n"
+
+#. module: rma_sale
+#: code:addons/rma_sale/controllers/sale_portal.py:0
+#, python-format
+msgid " (Portal)"
+msgstr " (Portal)"
+
+#. module: rma_sale
+#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
+#, python-format
+msgid " has been created."
+msgstr " wurde erstellt."
+
+#. module: rma_sale
+#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:0
+#, python-format
+msgid " have been created."
+msgstr " wurde erstellt."
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "×"
+msgstr "×"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Request RMAs"
+msgstr " Anforderung RMAs"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
+msgid " Request RMAs"
+msgstr " Anforderung RMAs"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Cancel"
+msgstr " Abbrechen"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid " Choose a delivery address"
+msgstr " Wähle eine Lieferadresse"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+""
+msgstr ""
+""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
+msgid ""
+msgstr ""
+""
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
+msgid "RMA "
+msgstr "RMA "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
+msgid "Requested operation: "
+msgstr "Angeforderte Operation: "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
+msgid "Requested operation "
+msgstr "Angeforderte Operation "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.report_rma_document
+msgid "Sale order: "
+msgstr "Verkaufsauftrag: "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.portal_rma_page
+msgid "Sale order "
+msgstr "Verkaufsauftrag "
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
+msgid "Accept"
+msgstr "Akzeptieren"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_move_ids
+msgid "Allowed Move"
+msgstr "Erlaubter Transfer"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_picking_ids
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_picking_ids
+msgid "Allowed Picking"
+msgstr "Erlaubte Entnahme"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_product_ids
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_product_ids
+msgid "Allowed Product"
+msgstr "Erlaubtes Product"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_rma_wizard_form_view
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
+msgid "Category"
+msgstr "Kategorie"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Close"
+msgstr "Schließen"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"Comment anything relevant to the return, like serial numbers, a description "
+"of the issue, etc"
+msgstr ""
+"Zusatzinformationen zur Reture, wie zum Beispiel Seriennummer, Beschreibung "
+"des Problems, etc"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__commercial_partner_id
+msgid "Commercial entity"
+msgstr "Unternehmenseinheit"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_company
+msgid "Companies"
+msgstr "Unternehmen"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_res_config_settings
+msgid "Config Settings"
+msgstr "Einstellungen"
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
+msgid ""
+"Conversion between Units of Measure can only occur if they belong to the "
+"same category. The conversion will be made based on the ratios."
+msgstr ""
+"Die Umrechnung zwischen Maßeinheiten kann nur erfolgen, wenn sie zur selben "
+"Kategorie gehören. Die Umrechnung erfolgt anhand der Verhältnisse."
+
+#. module: rma_sale
+#: code:addons/rma_sale/models/sale.py:0
+#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
+#, python-format
+msgid "Create RMA"
+msgstr "Erstelle RMA"
+
+#. module: rma_sale
+#: model:ir.actions.act_window,name:rma_sale.sale_order_create_rma_action
+msgid "Create RMAs"
+msgstr "Erstelle RMAs"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_uid
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_uid
+msgid "Created by"
+msgstr "Erstellt von"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__create_date
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__create_date
+msgid "Created on"
+msgstr "Erstellt am"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Custom Description"
+msgstr "Benutzerdefinierte Beschreibung"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Delivery"
+msgstr "Lieferung"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__picking_id
+msgid "Delivery order"
+msgstr "Lieferauftrag"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__description
+msgid "Description"
+msgstr "Beschreibung"
+
+#. module: rma_sale
+#: 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
+msgid "Display Name"
+msgstr "Anzeigename"
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,help:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid ""
+"From the frontend sale order page go to a single RMA page creation instead "
+"of the usual popup"
+msgstr ""
+"Gehen Sie von der Verkaufsauftragsseite im Frontend zu einer einzelnen RMA-"
+"Seitenerstellung anstelle des üblichen Popups"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_res_company__show_full_page_sale_rma
+#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__show_full_page_sale_rma
+msgid "Full page RMA creation"
+msgstr "Ganzseitige RMA-Erstellung"
+
+#. module: rma_sale
+#: 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
+msgid "ID"
+msgstr "ID"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
+msgstr ""
+"Wenn keine angeforderte Operation festgelegt ist, wird die RMA nicht korrekt "
+"ausgeführt"
+
+#. module: rma_sale
+#: 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
+msgid "Last Modified on"
+msgstr "Zuletz geändert am"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_uid
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_uid
+msgid "Last Updated by"
+msgstr "Zuletzt geupdated am"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__write_date
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__write_date
+msgid "Last Updated on"
+msgstr "Zuletzt geupdatet am"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__line_ids
+msgid "Lines"
+msgstr "Zeilen"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__move_id
+msgid "Move"
+msgstr "Bewegung"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__order_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__order_id
+msgid "Order"
+msgstr "Auftrag"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__picking_id
+msgid "Origin Delivery"
+msgstr "Ursprungslieferung"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__move_id
+msgid "Origin move"
+msgstr "Ursprungsbewegung"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__product_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__product_id
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Product"
+msgstr "Produkt"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__quantity
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Quantity"
+msgstr "Quantität"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_rma
+#: model_terms:ir.ui.view,arch_db:rma_sale.view_order_form
+msgid "RMA"
+msgstr "RMA"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_count
+msgid "RMA count"
+msgstr "RMA Anzahl"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__location_id
+msgid "RMA location"
+msgstr "RMA Ort"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.request_rma_single_page
+msgid "RMA request for order"
+msgstr "RMA-Anfrage zur Bestellung"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order__rma_ids
+msgid "RMAs"
+msgstr "RMAs"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Request RMAs"
+msgstr "Fordern Sie RMAs an"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__operation_id
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Requested operation"
+msgstr "Angeforderter Vorgang"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__sale_line_id
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__sale_line_id
+msgid "Sale Line"
+msgstr "Auftragszeile"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__order_id
+msgid "Sale Order"
+msgstr "Verkaufsauftrag"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_line_rma_wizard
+msgid "Sale Order Line Rma Wizard"
+msgstr "Verkaufsauftragszeilen-RMA-Assistent"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_rma_wizard
+msgid "Sale Order Rma Wizard"
+msgstr "Verkaufsauftrags-RMA-Assistent"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order
+msgid "Sales Order"
+msgstr "Verkaufsauftrag"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_sale_order_line
+msgid "Sales Order Line"
+msgstr "Verkaufsauftragszeile"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "Select the product quantity and the requested operation"
+msgstr "Wählen Sie die Produktmenge und den gewünschten Vorgang aus"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Shipping Address"
+msgstr "Versandadresse"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Show portal RMA request in a single page"
+msgstr "RMA-Anfrage im Portal auf einer einzigen Seite anzeigen"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid "Single page RMA request"
+msgstr "Einseitige RMA-Anfrage"
+
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_stock_move
+msgid "Stock Move"
+msgstr "Lagerbewegung"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "The limit will decrease when the units in other RMAs are confirmed"
+msgstr ""
+"Das Limit verringert sich, wenn die Einheiten in anderen RMAs bestätigt "
+"werden"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
+msgid "Unit of Measure"
+msgstr "Maßeinheit"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"Use the comment button to add relevant information regarding the RMA, like "
+"returned serial numbers or a description of the issue"
+msgstr ""
+"Verwenden Sie die Schaltfläche „Kommentar“, um relevante Informationen zur "
+"RMA hinzuzufügen, z. B. zurückgegebene Seriennummern oder eine Beschreibung "
+"des Problems"
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__custom_description
+msgid "Values coming from portal RMA request form custom fields"
+msgstr ""
+"Werte, die aus benutzerdefinierten Feldern für RMA-Anforderungsformulare des "
+"Portals stammen"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
+msgid ""
+"When we hit the RMA request button from the portal sale page, open in a "
+"single page instead of a popup."
+msgstr ""
+"Wenn wir auf der Verkaufsseite des Portals auf die Schaltfläche „RMA-"
+"Anforderung“ klicken, wird diese auf einer einzelnen Seite statt in einem "
+"Popup geöffnet."
+
+#. module: rma_sale
+#: model:ir.model.fields,help:rma_sale.field_sale_order_rma_wizard__partner_shipping_id
+msgid "Will be used to return the goods when the RMA is completed"
+msgstr ""
+"Wird verwendet, um die Waren zurückzusenden, wenn die RMA abgeschlossen ist"
+
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__wizard_id
+msgid "Wizard"
+msgstr "Assistent"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"You can only return as much product units as you received for this order"
+msgstr ""
+"Sie können nur so viele Produkteinheiten zurückgeben, wie Sie für diese "
+"Bestellung erhalten haben"
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "You can send a message in every RMA sent"
+msgstr "Sie können in jeder gesendeten RMA eine Nachricht senden"
+
+#. module: rma_sale
+#: code:addons/rma_sale/models/sale.py:0
+#, python-format
+msgid "You may only create RMAs from a confirmed or done sale order."
+msgstr ""
+"Sie können RMAs nur aus einem bestätigten oder abgeschlossenen "
+"Verkaufsauftrag erstellen."
+
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid ""
+"You're about to perform an RMA request. Our team will process it an will "
+"reach you once it's validated. Keep in mind that:"
+msgstr ""
+"Sie sind dabei, eine RMA-Anfrage durchzuführen. Unser Team wird es "
+"bearbeiten und Sie erreichen, sobald es validiert ist. Denk daran, dass:"
From 9037bece23a34dd3aa6d5fa0c93824bf369b5dce Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Wed, 10 May 2023 13:17:01 +0000
Subject: [PATCH 50/55] [UPD] Update rma_sale.pot
---
rma_sale/i18n/de.po | 12 +++++++++---
rma_sale/i18n/es.po | 5 +++++
rma_sale/i18n/it.po | 26 +++++++-------------------
rma_sale/i18n/nl.po | 5 +++++
rma_sale/i18n/pt.po | 29 +++++++++--------------------
rma_sale/i18n/pt_BR.po | 5 +++++
rma_sale/i18n/rma_sale.pot | 5 +++++
rma_sale/i18n/ro.po | 5 +++++
8 files changed, 50 insertions(+), 42 deletions(-)
diff --git a/rma_sale/i18n/de.po b/rma_sale/i18n/de.po
index 608ea4b3..73ac45cf 100644
--- a/rma_sale/i18n/de.po
+++ b/rma_sale/i18n/de.po
@@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-04-05 07:26+0000\n"
-"Last-Translator: Nikolaus Weingartmair "
-"\n"
+"Last-Translator: Nikolaus Weingartmair \n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
@@ -60,6 +60,11 @@ msgstr " Abbrechen"
msgid " Choose a delivery address"
msgstr " Wähle eine Lieferadresse"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
@@ -71,7 +76,8 @@ msgstr ""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
-msgid ""
+msgid ""
+""
msgstr ""
""
diff --git a/rma_sale/i18n/es.po b/rma_sale/i18n/es.po
index 42deca73..e5c7b05c 100644
--- a/rma_sale/i18n/es.po
+++ b/rma_sale/i18n/es.po
@@ -60,6 +60,11 @@ msgstr " Cancelar"
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
diff --git a/rma_sale/i18n/it.po b/rma_sale/i18n/it.po
index 3eee8265..52717186 100644
--- a/rma_sale/i18n/it.po
+++ b/rma_sale/i18n/it.po
@@ -59,6 +59,11 @@ msgstr " Annulla"
msgid " Choose a delivery address"
msgstr " Scegli un indirizzo di consegna"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
@@ -70,7 +75,8 @@ msgstr ""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
-msgid ""
+msgid ""
+""
msgstr ""
""
@@ -215,14 +221,8 @@ msgid "Description"
msgstr "Descrizione"
#. 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 "Nome visualizzato"
@@ -243,14 +243,8 @@ msgid "Full page RMA creation"
msgstr "Creazione RMA pagina intera"
#. 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 "ID"
@@ -262,14 +256,8 @@ msgstr ""
"correttamente"
#. 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 "Ultima modifica il"
diff --git a/rma_sale/i18n/nl.po b/rma_sale/i18n/nl.po
index ac82011d..0b981b37 100644
--- a/rma_sale/i18n/nl.po
+++ b/rma_sale/i18n/nl.po
@@ -59,6 +59,11 @@ msgstr ""
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
diff --git a/rma_sale/i18n/pt.po b/rma_sale/i18n/pt.po
index da2e0640..e039e358 100644
--- a/rma_sale/i18n/pt.po
+++ b/rma_sale/i18n/pt.po
@@ -59,6 +59,11 @@ msgstr " Cancelar"
msgid " Choose a delivery address"
msgstr " Escolha um endereço de entrega"
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
@@ -70,7 +75,8 @@ msgstr ""
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
-msgid ""
+msgid ""
+""
msgstr ""
""
@@ -214,14 +220,8 @@ msgid "Description"
msgstr "Descrição"
#. 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 "Nome a Exibir"
@@ -242,14 +242,8 @@ msgid "Full page RMA creation"
msgstr "Criação de RMA de página completa"
#. 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 "ID"
@@ -261,14 +255,8 @@ msgstr ""
"corretamente"
#. 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 "Última Modificação em"
@@ -419,7 +407,8 @@ msgstr "Movimento de Stock"
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "The limit will decrease when the units in other RMAs are confirmed"
-msgstr "O limite irá diminuir quando as unidades noutras RMAs forem confirmadas"
+msgstr ""
+"O limite irá diminuir quando as unidades noutras RMAs forem confirmadas"
#. module: rma_sale
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
diff --git a/rma_sale/i18n/pt_BR.po b/rma_sale/i18n/pt_BR.po
index 6979e393..378658d5 100644
--- a/rma_sale/i18n/pt_BR.po
+++ b/rma_sale/i18n/pt_BR.po
@@ -59,6 +59,11 @@ msgstr " Cancelar"
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index b722c99b..92601e4f 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -56,6 +56,11 @@ msgstr ""
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
diff --git a/rma_sale/i18n/ro.po b/rma_sale/i18n/ro.po
index 31f2b9c4..3ee52678 100644
--- a/rma_sale/i18n/ro.po
+++ b/rma_sale/i18n/ro.po
@@ -60,6 +60,11 @@ msgstr " Anulat"
msgid " Choose a delivery address"
msgstr ""
+#. module: rma_sale
+#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
+msgid "--- "
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.res_config_settings_view_form
msgid ""
From e1e1b7a0a6ad65e4314c2a02681dd2fd99644dfe Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Sat, 11 Feb 2023 14:01:38 +0100
Subject: [PATCH 51/55] [FIX+IMP] rma_sale: Link invoice/move line with origin
sale line when refunding
Steps to reproduce:
- Create a sales order with an storable product with invoicing policy
on delivered quantities.
- Confirm it and deliver the product.
- Invoice the order.
- Do an RMA, receive it, and refund it.
Result: the delivered quantity is 1 instead of 0.
This is because the refund generated from the RMA is not linked to
sales order line, nor the RMA reception move. This is done because
other operations are performed:
- Be replaced.
- Be changed by other product.
And we don't also want that meanwhile the RMA is being performed, the
sales order is pending to invoice.
But when the refund has been done, we have it clear, so let's link both
and have sales statistics correct.
FIX: We don't link the refund line with the sales order if the RMA
quantity is not the whole original move quantity. Otherwise, we will
have incoherente delivered/invoiced quantities on the sales order.
TT41645
---
rma_sale/__manifest__.py | 1 +
rma_sale/models/__init__.py | 1 +
rma_sale/models/account_move.py | 24 +++++++++++
rma_sale/models/rma.py | 59 ++++++++++++++++++++++++++-
rma_sale/tests/test_rma_sale.py | 14 ++++++-
rma_sale/views/account_move_views.xml | 16 ++++++++
6 files changed, 113 insertions(+), 2 deletions(-)
create mode 100644 rma_sale/models/account_move.py
create mode 100644 rma_sale/views/account_move_views.xml
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index eec2e878..96de8bc1 100644
--- a/rma_sale/__manifest__.py
+++ b/rma_sale/__manifest__.py
@@ -13,6 +13,7 @@
"depends": ["rma", "sale_stock"],
"data": [
"security/ir.model.access.csv",
+ "views/account_move_views.xml",
"views/report_rma.xml",
"views/rma_views.xml",
"views/sale_views.xml",
diff --git a/rma_sale/models/__init__.py b/rma_sale/models/__init__.py
index 16972d9b..9047bb78 100644
--- a/rma_sale/models/__init__.py
+++ b/rma_sale/models/__init__.py
@@ -1,4 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+from . import account_move
from . import res_company
from . import res_config_settings
from . import rma
diff --git a/rma_sale/models/account_move.py b/rma_sale/models/account_move.py
new file mode 100644
index 00000000..e5a5a7a8
--- /dev/null
+++ b/rma_sale/models/account_move.py
@@ -0,0 +1,24 @@
+# Copyright 2023 Tecnativa - Pedro M. Baeza
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from odoo import models
+
+
+class AccountMove(models.Model):
+ _inherit = "account.move"
+
+ def button_cancel(self):
+ """If this a refund linked to an RMA, undo the linking of the reception move for
+ having proper quantities and status.
+ """
+ for rma in self.env["rma"].search([("refund_id", "in", self.ids)]):
+ if rma.sale_line_id:
+ rma._unlink_refund_with_reception_move()
+ return super().button_cancel()
+
+ def button_draft(self):
+ """Relink the reception move when passing the refund again to draft."""
+ for rma in self.env["rma"].search([("refund_id", "in", self.ids)]):
+ if rma.sale_line_id:
+ rma._link_refund_with_reception_move()
+ return super().button_draft()
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 9286b05b..31b3254e 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -1,7 +1,9 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
+# Copyright 2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
+from odoo.tools import float_compare
class Rma(models.Model):
@@ -41,6 +43,8 @@ class Rma(models.Model):
domain="order_id and [('id', 'in', allowed_product_ids)] or "
"[('type', 'in', ['consu', 'product'])]"
)
+ # Add index to this field, as we perform a search on it
+ refund_id = fields.Many2one(index=True)
@api.depends("partner_id", "order_id")
def _compute_allowed_picking_ids(self):
@@ -89,6 +93,45 @@ class Rma(models.Model):
def _onchange_order_id(self):
self.product_id = self.picking_id = False
+ def _link_refund_with_reception_move(self):
+ """Perform the internal operations for linking the RMA reception move with the
+ sales order line if applicable.
+ """
+ self.ensure_one()
+ move = self.reception_move_id
+ if (
+ move
+ and float_compare(
+ self.product_uom_qty,
+ move.product_uom_qty,
+ precision_rounding=move.product_uom.rounding,
+ )
+ == 0
+ ):
+ self.reception_move_id.sale_line_id = self.sale_line_id.id
+ self.reception_move_id.to_refund = True
+
+ def _unlink_refund_with_reception_move(self):
+ """Perform the internal operations for unlinking the RMA reception move with the
+ sales order line.
+ """
+ self.ensure_one()
+ self.reception_move_id.sale_line_id = False
+ self.reception_move_id.to_refund = False
+
+ def action_refund(self):
+ """As we have made a refund, the return move + the refund should be linked to
+ the source sales order line, to decrease both the delivered and invoiced
+ quantity.
+
+ NOTE: The refund line is linked to the SO line in `_prepare_refund_line`.
+ """
+ res = super().action_refund()
+ for rma in self:
+ if rma.sale_line_id:
+ rma._link_refund_with_reception_move()
+ return res
+
def _prepare_refund(self, invoice_form, origin):
"""Inject salesman from sales order (if any)"""
res = super()._prepare_refund(invoice_form, origin)
@@ -110,10 +153,24 @@ class Rma(models.Model):
return self.sale_line_id.product_id
def _prepare_refund_line(self, line_form):
- """Add line data"""
+ """Add line data and link to the sales order, only if the RMA is for the whole
+ move quantity. In other cases, incorrect delivered/invoiced quantities will be
+ logged on the sales order, so better to let the operations not linked.
+ """
res = super()._prepare_refund_line(line_form)
line = self.sale_line_id
if line:
line_form.discount = line.discount
line_form.sequence = line.sequence
+ move = self.reception_move_id
+ if (
+ move
+ and float_compare(
+ self.product_uom_qty,
+ move.product_uom_qty,
+ precision_rounding=move.product_uom.rounding,
+ )
+ == 0
+ ):
+ line_form.sale_line_ids.add(line)
return res
diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py
index ad526684..45908b6d 100644
--- a/rma_sale/tests/test_rma_sale.py
+++ b/rma_sale/tests/test_rma_sale.py
@@ -96,16 +96,28 @@ class TestRmaSale(TestRmaSaleBase):
rma.reception_move_id.picking_id + self.order_out_picking,
order.picking_ids,
)
- # Refund the RMA
user = self.env["res.users"].create(
{"login": "test_refund_with_so", "name": "Test"}
)
order.user_id = user.id
+ # Receive the RMA
rma.action_confirm()
rma.reception_move_id.quantity_done = rma.product_uom_qty
rma.reception_move_id.picking_id._action_done()
+ # Refund the RMA
rma.action_refund()
+ self.assertEqual(self.order_line.qty_delivered, 0)
+ self.assertEqual(self.order_line.qty_invoiced, -5)
self.assertEqual(rma.refund_id.user_id, user)
+ self.assertEqual(rma.refund_id.invoice_line_ids.sale_line_ids, self.order_line)
+ # Cancel the refund
+ rma.refund_id.button_cancel()
+ self.assertEqual(self.order_line.qty_delivered, 5)
+ self.assertEqual(self.order_line.qty_invoiced, 0)
+ # And put it to draft again
+ rma.refund_id.button_draft()
+ self.assertEqual(self.order_line.qty_delivered, 0)
+ self.assertEqual(self.order_line.qty_invoiced, -5)
@users("partner@rma")
def test_create_rma_from_so_portal_user(self):
diff --git a/rma_sale/views/account_move_views.xml b/rma_sale/views/account_move_views.xml
new file mode 100644
index 00000000..96dd435b
--- /dev/null
+++ b/rma_sale/views/account_move_views.xml
@@ -0,0 +1,16 @@
+
+
+
+ account.move.form - Add helper sale_line_ids
+ account.move
+
+
+
+
+
+
+
+
+
+
+
From 048e34259270d42b1367c2a794f0dace96ef816c Mon Sep 17 00:00:00 2001
From: David
Date: Fri, 23 Jun 2023 11:45:40 +0200
Subject: [PATCH 52/55] [IMP] rma_sale: rollback sale refund on deleted invoice
TT44043
---
rma_sale/__manifest__.py | 2 +-
rma_sale/i18n/de.po | 10 ++++++++++
rma_sale/i18n/es.po | 10 ++++++++++
rma_sale/i18n/it.po | 10 ++++++++++
rma_sale/i18n/nl.po | 10 ++++++++++
rma_sale/i18n/pt.po | 10 ++++++++++
rma_sale/i18n/pt_BR.po | 10 ++++++++++
rma_sale/i18n/rma_sale.pot | 10 ++++++++++
rma_sale/i18n/ro.po | 10 ++++++++++
rma_sale/models/account_move.py | 6 ++++++
10 files changed, 87 insertions(+), 1 deletion(-)
diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index 96de8bc1..507cd8d6 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": "15.0.1.1.0",
+ "version": "15.0.1.2.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/i18n/de.po b/rma_sale/i18n/de.po
index 73ac45cf..23634793 100644
--- a/rma_sale/i18n/de.po
+++ b/rma_sale/i18n/de.po
@@ -255,6 +255,11 @@ msgstr ""
"Wenn keine angeforderte Operation festgelegt ist, wird die RMA nicht korrekt "
"ausgeführt"
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -338,6 +343,11 @@ msgstr "RMA-Anfrage zur Bestellung"
msgid "RMAs"
msgstr "RMAs"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/es.po b/rma_sale/i18n/es.po
index e5c7b05c..c62bc361 100644
--- a/rma_sale/i18n/es.po
+++ b/rma_sale/i18n/es.po
@@ -251,6 +251,11 @@ msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
"Si no se establece operación solicitada, el RMA no se procesará correctamente"
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -334,6 +339,11 @@ msgstr ""
msgid "RMAs"
msgstr "RMAs"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/it.po b/rma_sale/i18n/it.po
index 52717186..c54541d2 100644
--- a/rma_sale/i18n/it.po
+++ b/rma_sale/i18n/it.po
@@ -255,6 +255,11 @@ msgstr ""
"Se nessuna operazione richiesta è impostata, l'RMA non sarà completato "
"correttamente"
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -338,6 +343,11 @@ msgstr "Richiesta RMA per ordine"
msgid "RMAs"
msgstr "RMA"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/nl.po b/rma_sale/i18n/nl.po
index 0b981b37..2529ecb3 100644
--- a/rma_sale/i18n/nl.po
+++ b/rma_sale/i18n/nl.po
@@ -245,6 +245,11 @@ msgstr "ID"
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -328,6 +333,11 @@ msgstr ""
msgid "RMAs"
msgstr "RMA's"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/pt.po b/rma_sale/i18n/pt.po
index e039e358..aaa61b53 100644
--- a/rma_sale/i18n/pt.po
+++ b/rma_sale/i18n/pt.po
@@ -254,6 +254,11 @@ msgstr ""
"Se nenhuma operação solicitada for definida, a RMA não será cumprida "
"corretamente"
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -337,6 +342,11 @@ msgstr "Pedido de RMA de encomenda"
msgid "RMAs"
msgstr "RMAs"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/pt_BR.po b/rma_sale/i18n/pt_BR.po
index 378658d5..ba863cca 100644
--- a/rma_sale/i18n/pt_BR.po
+++ b/rma_sale/i18n/pt_BR.po
@@ -246,6 +246,11 @@ msgstr "ID"
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -329,6 +334,11 @@ msgstr ""
msgid "RMAs"
msgstr "RMAs"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/rma_sale.pot b/rma_sale/i18n/rma_sale.pot
index 92601e4f..807c4006 100644
--- a/rma_sale/i18n/rma_sale.pot
+++ b/rma_sale/i18n/rma_sale.pot
@@ -239,6 +239,11 @@ msgstr ""
msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
msgstr ""
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -322,6 +327,11 @@ msgstr ""
msgid "RMAs"
msgstr ""
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/i18n/ro.po b/rma_sale/i18n/ro.po
index 3ee52678..70b3309a 100644
--- a/rma_sale/i18n/ro.po
+++ b/rma_sale/i18n/ro.po
@@ -252,6 +252,11 @@ msgstr ""
"Dacă nu este setată nicio operațiune solicitată, cererea de retur nu va fi "
"completată corect"
+#. module: rma_sale
+#: model:ir.model,name:rma_sale.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
#. module: rma_sale
#: 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
@@ -335,6 +340,11 @@ msgstr ""
msgid "RMAs"
msgstr "Cereri retur"
+#. module: rma_sale
+#: model:ir.model.fields,field_description:rma_sale.field_rma__refund_id
+msgid "Refund"
+msgstr ""
+
#. module: rma_sale
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_rma_request_form
msgid "Request RMAs"
diff --git a/rma_sale/models/account_move.py b/rma_sale/models/account_move.py
index e5a5a7a8..3048289a 100644
--- a/rma_sale/models/account_move.py
+++ b/rma_sale/models/account_move.py
@@ -22,3 +22,9 @@ class AccountMove(models.Model):
if rma.sale_line_id:
rma._link_refund_with_reception_move()
return super().button_draft()
+
+ def unlink(self):
+ """If the invoice is removed, rollback the quantities correction"""
+ for rma in self.invoice_line_ids.rma_id.filtered("sale_line_id"):
+ rma._unlink_refund_with_reception_move()
+ return super().unlink()
From 0a71d8441dcd6858d9bc8bc99fb870c7a2b17f68 Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Tue, 29 Aug 2023 20:12:20 +0200
Subject: [PATCH 53/55] [IMP] rma_sale: pre-commit stuff
---
setup/rma_sale/odoo/addons/rma_sale | 1 +
setup/rma_sale/setup.py | 6 ++++++
2 files changed, 7 insertions(+)
create mode 120000 setup/rma_sale/odoo/addons/rma_sale
create mode 100644 setup/rma_sale/setup.py
diff --git a/setup/rma_sale/odoo/addons/rma_sale b/setup/rma_sale/odoo/addons/rma_sale
new file mode 120000
index 00000000..243aef4e
--- /dev/null
+++ b/setup/rma_sale/odoo/addons/rma_sale
@@ -0,0 +1 @@
+../../../../rma_sale
\ No newline at end of file
diff --git a/setup/rma_sale/setup.py b/setup/rma_sale/setup.py
new file mode 100644
index 00000000..28c57bb6
--- /dev/null
+++ b/setup/rma_sale/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
From 54e08e856fd2f8d07057eef3ca12b2d395fcfb23 Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Tue, 29 Aug 2023 20:24:09 +0200
Subject: [PATCH 54/55] [MIG] rma_sale: Migration to 16.0
- Standard procedure.
- Adapt to new `prepare_*_vals` methods.
- Renamed fields adaptation.
- Improved test coverage.
TT44214
s
---
rma_sale/README.rst | 14 ++---
rma_sale/__manifest__.py | 5 +-
rma_sale/models/rma.py | 51 +++++++---------
rma_sale/static/description/index.html | 8 +--
rma_sale/tests/test_rma_sale.py | 59 +++++++++++++------
rma_sale/views/rma_views.xml | 6 +-
rma_sale/views/sale_views.xml | 3 +-
rma_sale/wizard/sale_order_rma_wizard.py | 2 +-
.../wizard/sale_order_rma_wizard_views.xml | 2 +-
9 files changed, 86 insertions(+), 64 deletions(-)
diff --git a/rma_sale/README.rst b/rma_sale/README.rst
index a867b0a7..180d9c4e 100644
--- a/rma_sale/README.rst
+++ b/rma_sale/README.rst
@@ -14,14 +14,14 @@ 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/15.0/rma_sale
+ :target: https://github.com/OCA/rma/tree/16.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-15-0/rma-15-0-rma_sale
+ :target: https://translation.odoo-community.org/projects/rma-16-0/rma-16-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/15.0
- :alt: Try me on Runbot
+.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
+ :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/rma&target_branch=16.0
+ :alt: Try me on Runboat
|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.
@@ -125,6 +125,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 507cd8d6..3642eed0 100644
--- a/rma_sale/__manifest__.py
+++ b/rma_sale/__manifest__.py
@@ -1,9 +1,12 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
+# Copyright 2022-2023 Tecnativa - Víctor Martínez
+# Copyright 2021-2023 Tecnativa - David Vidal
+# Copyright 2021-2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Return Merchandise Authorization Management - Link with Sales",
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
- "version": "15.0.1.2.0",
+ "version": "16.0.1.0.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",
diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py
index 31b3254e..b07b7151 100644
--- a/rma_sale/models/rma.py
+++ b/rma_sale/models/rma.py
@@ -16,8 +16,9 @@ class Rma(models.Model):
" ('partner_id', 'child_of', commercial_partner_id),"
" ('state', 'in', ['sale', 'done']),"
"]",
- readonly=True,
- states={"draft": [("readonly", False)]},
+ store=True,
+ readonly=False,
+ compute="_compute_order_id",
)
allowed_picking_ids = fields.Many2many(
comodel_name="stock.picking",
@@ -28,7 +29,7 @@ class Rma(models.Model):
"[('state', '=', 'done'), ('picking_type_id.code', '=', 'outgoing')] "
)
allowed_move_ids = fields.Many2many(
- comodel_name="sale.order.line",
+ comodel_name="stock.move",
compute="_compute_allowed_move_ids",
)
move_id = fields.Many2one(domain="[('id', 'in', allowed_move_ids)]")
@@ -70,7 +71,7 @@ class Rma(models.Model):
lambda r: r.picking_id == self.picking_id and r.state == "done"
).ids
else:
- rec.allowed_move_ids = self.picking_id.move_lines.ids
+ rec.allowed_move_ids = self.picking_id.move_ids.ids
@api.depends("order_id")
def _compute_allowed_product_ids(self):
@@ -83,11 +84,10 @@ class Rma(models.Model):
else:
rec.allowed_product_ids = False # don't populate a big list
- @api.onchange("partner_id")
- def _onchange_partner_id(self):
- res = super()._onchange_partner_id()
+ @api.depends("partner_id")
+ def _compute_order_id(self):
+ """Empty sales order when changing partner."""
self.order_id = False
- return res
@api.onchange("order_id")
def _onchange_order_id(self):
@@ -132,36 +132,25 @@ class Rma(models.Model):
rma._link_refund_with_reception_move()
return res
- def _prepare_refund(self, invoice_form, origin):
+ def _prepare_refund_vals(self, origin=False):
"""Inject salesman from sales order (if any)"""
- res = super()._prepare_refund(invoice_form, origin)
+ vals = super()._prepare_refund_vals(origin=origin)
if self.order_id:
- invoice_form.invoice_user_id = self.order_id.user_id
- return res
+ vals["invoice_user_id"] = self.order_id.user_id.id
+ return vals
- def _get_refund_line_price_unit(self):
- """Get the sale order price unit"""
- if self.sale_line_id:
- return self.sale_line_id.price_unit
- return super()._get_refund_line_price_unit()
-
- def _get_refund_line_product(self):
- """To be overriden in a third module with the proper origin values
- in case a kit is linked with the rma"""
- if not self.sale_line_id:
- return super()._get_refund_line_product()
- return self.sale_line_id.product_id
-
- def _prepare_refund_line(self, line_form):
+ def _prepare_refund_line_vals(self):
"""Add line data and link to the sales order, only if the RMA is for the whole
move quantity. In other cases, incorrect delivered/invoiced quantities will be
logged on the sales order, so better to let the operations not linked.
"""
- res = super()._prepare_refund_line(line_form)
+ vals = super()._prepare_refund_line_vals()
line = self.sale_line_id
if line:
- line_form.discount = line.discount
- line_form.sequence = line.sequence
+ vals["product_id"] = line.product_id.id
+ vals["price_unit"] = line.price_unit
+ vals["discount"] = line.discount
+ vals["sequence"] = line.sequence
move = self.reception_move_id
if (
move
@@ -172,5 +161,5 @@ class Rma(models.Model):
)
== 0
):
- line_form.sale_line_ids.add(line)
- return res
+ vals["sale_line_ids"] = [(4, line.id)]
+ return vals
diff --git a/rma_sale/static/description/index.html b/rma_sale/static/description/index.html
index 74d1706f..7aff80c2 100644
--- a/rma_sale/static/description/index.html
+++ b/rma_sale/static/description/index.html
@@ -3,7 +3,7 @@
-
+
Return Merchandise Authorization Management - Link with Sales