From 7d4715f821e0355df1bf4643090433c03e66ff1f Mon Sep 17 00:00:00 2001 From: david Date: Mon, 17 Jan 2022 09:44:13 +0100 Subject: [PATCH 1/5] [FIX] rma: return wizard to_refund To create the rma we create the core return wizard, which now sets to_refund to True as default. This isn't right for RMAs anyway. TT33706 --- rma/__manifest__.py | 2 +- rma/models/rma.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rma/__manifest__.py b/rma/__manifest__.py index 8d6f0745..84b39b7d 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -10,7 +10,7 @@ "author": "Tecnativa, Odoo Community Association (OCA)", "maintainers": ["ernestotejeda"], "license": "AGPL-3", - "depends": ["account", "stock"], + "depends": ["stock_account"], "data": [ "views/report_rma.xml", "report/report.xml", diff --git a/rma/models/rma.py b/rma/models/rma.py index ee79e08d..172d9fa5 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -912,7 +912,14 @@ class Rma(models.Model): lambda r: r.move_id != self.move_id ).unlink() return_line = return_wizard.product_return_moves - return_line.quantity = self.product_uom_qty + return_line.update( + { + "quantity": self.product_uom_qty, + # The to_refund field is now True by default, which isn't right in the RMA + # creation context. + "to_refund": False, + } + ) # set_rma_picking_type is to override the copy() method of stock # picking and change the default picking type to rma picking type. picking_action = return_wizard.with_context( From 534672636040584b735d72bfcaff814eae3c1325 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 18 Dec 2021 15:20:21 +0100 Subject: [PATCH 2/5] [FIX] rma: Adjust hook for existing values If rma_in_type_id or rma_out_type_id are already set, then the hook fails. With this alternative code, we avoid it and clean it for being clearer. --- rma/hooks.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/rma/hooks.py b/rma/hooks.py index 9aafcaf0..ed625906 100644 --- a/rma/hooks.py +++ b/rma/hooks.py @@ -56,15 +56,10 @@ def post_init_hook(cr, registry): ) data[picking_type] = stock_picking_type.create(values).id - rma_out_type = stock_picking_type.browse(data["rma_out_type_id"]) - rma_out_type.write( - {"return_picking_type_id": data.get("rma_in_type_id", False)} - ) - rma_in_type = stock_picking_type.browse(data["rma_in_type_id"]) - rma_in_type.write( - {"return_picking_type_id": data.get("rma_out_type_id", False)} - ) - whs.write(data) + if data: + whs.write(data) + whs.rma_in_type_id.return_picking_type_id = whs.rma_out_type_id.id + whs.rma_out_type_id.return_picking_type_id = whs.rma_in_type_id.id # Create rma locations and picking types warehouses = env["stock.warehouse"].search([]) From 2b89198f01fb4b1c5699411b15c79d9e755bf060 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 21 Jan 2022 10:23:25 +0100 Subject: [PATCH 3/5] [IMP] rma report: invoice and shipping address TT13069 --- rma/i18n/es.po | 435 ++++++++++++++--------------- rma/i18n/rma.pot | 27 +- rma/views/report_rma.xml | 22 +- rma/views/rma_portal_templates.xml | 33 +++ 4 files changed, 279 insertions(+), 238 deletions(-) diff --git a/rma/i18n/es.po b/rma/i18n/es.po index f4ccbcbd..195cdd26 100644 --- a/rma/i18n/es.po +++ b/rma/i18n/es.po @@ -4,13 +4,12 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-23 20:11+0000\n" "PO-Revision-Date: 2022-01-17 12:39+0000\n" "Last-Translator: xavigutipujol \n" "Language-Team: \n" -"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -42,9 +41,10 @@ msgstr "" #. module: rma #: model:mail.template,subject:rma.mail_template_rma_draft_notification msgid "" -"${object.company_id.name} Your RMA has been succesfully created (Ref " -"${object.name or 'n/a' })" +"${object.company_id.name} Your RMA has been succesfully created (Ref ${object.name or 'n/" +"a' })" msgstr "" +"${object.company_id.name} Su RMA se ha creado con éxito (Ref ${object.name or 'n/a' })" #. module: rma #: code:addons/rma/models/rma_team.py:0 @@ -62,12 +62,11 @@ msgstr "" #, python-format msgid "E-mail subject: %s

E-mail body:
%s" msgstr "" -"Asunto del correo electrónico: %s

Cuerpo del correo " -"electrónico:
%s" +"Asunto del correo electrónico: %s

Cuerpo del correo electrónico:
%s" #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_notification -#, fuzzy msgid "" "
\n" "

\n" @@ -76,8 +75,7 @@ msgid "" " (${object.partner_id.parent_id.name})\n" " % endif\n" "

\n" -" Here is the RMA ${object.name} from ${object.company_id." -"name}.\n" +" Here is the RMA ${object.name} from ${object.company_id.name}.\n" "

\n" " Do not hesitate to contact us if you have any question.\n" "

\n" @@ -91,8 +89,7 @@ msgstr "" " (${object.partner_id.parent_id.name})\n" " % endif\n" "

\n" -" Aquí tiene el RMA ${object.name} Desde ${object." -"company_id.name}.\n" +" Aquí tiene el RMA ${object.name} Desde ${object.company_id.name}.\n" "

\n" " No dude en ponerse en contacto con nosotros si tiene alguna pregunta.\n" "

\n" @@ -117,6 +114,20 @@ msgid "" "
\n" " " msgstr "" +"
\n" +"

\n" +" Estimado ${object.partner_id.name}\n" +" % if object.partner_id.parent_id:\n" +" (${object.partner_id.parent_id.name})\n" +" % endif\n" +"

\n" +" Los productos de su RMA ${object.name}\n" +" from ${object.company_id.name} han sido recibidos en nuestro almacén.\n" +"

\n" +" Póngase en contacto con nosotros para cualquier duda al respecto.\n" +"

\n" +"
\n" +" " #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_draft_notification @@ -137,19 +148,30 @@ msgid "" "\n" " " msgstr "" +"
\n" +"

\n" +" Estimado ${object.partner_id.name}\n" +" % if object.partner_id.parent_id:\n" +" (${object.partner_id.parent_id.name})\n" +" % endif\n" +"

\n" +" Ha solicitado con éxito su RMA ${object.name}\n" +" en ${object.company_id.name}. Nuestro equipo la comprobará y validará\n" +" tan pronto como sea posible.\n" +"

\n" +" Póngase en contacto con nosotros para cualquier duda al respecto.\n" +"

\n" +"
\n" +" " #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid "" -"" +msgid "" msgstr "" -"" +"" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -#, fuzzy msgid "" "\n" " Paid" @@ -157,7 +179,6 @@ msgstr "Pagado" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -#, fuzzy msgid "" "\n" " Waiting Payment" @@ -166,62 +187,60 @@ msgstr "Esperando Pago" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page msgid "" -"" -msgstr "" -"" - -#. module: rma -#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid "" -"" msgstr "" -"" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page msgid "" -" Cancelled" +"" msgstr "" -"Cancelado" +"" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page msgid "" -" Preparation" +" " +"Cancelled" msgstr "" -"Preparación" +"Cancelado" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page msgid "" -" Shipped" +" " +"Preparation" msgstr "" -" Enviado" +"Preparación" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page msgid "" -" Partially Available" +" " +"Shipped" msgstr "" -"Disponible parcialmente" +" " +"Enviado" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page +msgid "" +" " +"Partially Available" +msgstr "" +"Disponible parcialmente" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "" -"" +"" msgstr "" #. module: rma @@ -269,11 +288,6 @@ msgstr "Cantidad entregada:" msgid "Delivered quantity" msgstr "Cantidad entregada" -#. module: rma -#: model_terms:ir.ui.view,arch_db:rma.report_rma_document -msgid "Invoicing address:" -msgstr "Dirección de facturación:" - #. module: rma #: model_terms:ir.ui.view,arch_db:rma.report_rma_document msgid "Move:" @@ -335,6 +349,16 @@ msgstr "Nota:" msgid "Responsible:" msgstr "Responsable:" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.report_rma_document +msgid "Shipping Address:" +msgstr "Dirección de envío:" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page +msgid "Shipping address:" +msgstr "Dirección de envío:" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.report_rma_document msgid "State:" @@ -343,11 +367,11 @@ msgstr "Estado:" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_defaults msgid "" -"A Python dictionary that will be evaluated to provide default values when " -"creating new records for this alias." +"A Python dictionary that will be evaluated to provide default values when creating new " +"records for this alias." msgstr "" -"Diccionario Python a evaluar para proporcionar valores por defecto cuando un " -"nuevo registro se cree para este seudónimo." +"Diccionario Python a evaluar para proporcionar valores por defecto cuando un nuevo " +"registro se cree para este seudónimo." #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_team_view_form @@ -421,7 +445,7 @@ msgstr "Modelo con seudónimo" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search msgid "Archived" -msgstr "" +msgstr "Archivado" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_form @@ -521,7 +545,7 @@ msgstr "Compañía" #. module: rma #: model:ir.model,name:rma.model_res_config_settings msgid "Config Settings" -msgstr "" +msgstr "Opciones de Configuración" #. module: rma #: model:ir.ui.menu,name:rma.rma_configuration_menu @@ -561,7 +585,7 @@ msgstr "Crear RMAs" #. module: rma #: model_terms:ir.actions.act_window,help:rma.action_rma_tag msgid "Create a new RMA tag" -msgstr "" +msgstr "Crear una nueva etiqueta de RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__create_uid @@ -707,43 +731,43 @@ msgstr "Pseudónimo de correo" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "Email Template" -msgstr "" +msgstr "Plantillade correo" #. module: rma #: model:ir.model.fields,field_description:rma.field_res_company__rma_mail_confirmation_template_id #: model:ir.model.fields,field_description:rma.field_res_config_settings__rma_mail_confirmation_template_id msgid "Email Template confirmation for RMA" -msgstr "" +msgstr "Plantilla de correo de confirmación de RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_res_company__rma_mail_draft_confirmation_template_id #: model:ir.model.fields,field_description:rma.field_res_config_settings__rma_mail_draft_confirmation_template_id msgid "Email Template draft notification for RMA" -msgstr "" +msgstr "Plantilla de correo de notificación de borrador RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_res_company__rma_mail_receipt_confirmation_template_id #: model:ir.model.fields,field_description:rma.field_res_config_settings__rma_mail_receipt_confirmation_template_id msgid "Email Template receipt confirmation for RMA" -msgstr "" +msgstr "Plantilla de correo de confirmación de recepción RMA" #. module: rma #: model:ir.model.fields,help:rma.field_res_company__rma_mail_confirmation_template_id #: model:ir.model.fields,help:rma.field_res_config_settings__rma_mail_confirmation_template_id msgid "Email sent to the customer once the RMA is confirmed." -msgstr "" +msgstr "Enviar correo al cliente una vez se confirma el RMA." #. module: rma #: model:ir.model.fields,help:rma.field_res_company__rma_mail_receipt_confirmation_template_id #: model:ir.model.fields,help:rma.field_res_config_settings__rma_mail_receipt_confirmation_template_id msgid "Email sent to the customer once the RMA products are received." -msgstr "" +msgstr "Enviar correo al cliente una vez se recepcionen los productos del RMA." #. module: rma #: model:ir.model.fields,help:rma.field_res_company__rma_mail_draft_confirmation_template_id #: model:ir.model.fields,help:rma.field_res_config_settings__rma_mail_draft_confirmation_template_id msgid "Email sent to the customer when they place an RMA from the portal" -msgstr "" +msgstr "Enviar correo de confirmación al cliente una vez se tramite el RMA desde el portal" #. module: rma #: code:addons/rma/wizard/rma_split.py:0 @@ -808,16 +832,16 @@ msgstr "ID" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_parent_thread_id msgid "" -"ID of the parent record holding the alias (example: project holding the task " -"creation alias)" +"ID of the parent record holding the alias (example: project holding the task creation " +"alias)" msgstr "" -"ID del registro padre que tiene el seudónimo. (ejemplo: el proyecto que " -"contiene el seudónimo para la creación de tareas)" +"ID del registro padre que tiene el seudónimo. (ejemplo: el proyecto que contiene el " +"seudónimo para la creación de tareas)" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__activity_exception_icon msgid "Icon" -msgstr "" +msgstr "Icono" #. module: rma #: model:ir.model.fields,help:rma.field_rma__activity_exception_icon @@ -850,11 +874,10 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__active msgid "" -"If the active field is set to false, it will allow you to hide the RMA Team " -"without removing it." +"If the active field is set to false, it will allow you to hide the RMA Team without " +"removing it." msgstr "" -"Si el campo activo se establece a Falso, permitirá ocultar El equipo de RMA " -"sin eliminarlo." +"Si el campo activo se establece a Falso, permitirá ocultar El equipo de RMA sin eliminarlo." #. module: rma #: code:addons/rma/models/rma.py:0 @@ -867,6 +890,16 @@ msgstr "Correo electrónico entrante" msgid "Invoice Address" msgstr "Dirección de factura" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.report_rma_document +msgid "Invoicing Address:" +msgstr "Dirección de facturación:" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.report_rma_document +msgid "Invoicing and Shipping Address:" +msgstr "Dirección de envío y facturación:" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_is_follower #: model:ir.model.fields,field_description:rma.field_rma_team__message_is_follower @@ -881,7 +914,7 @@ msgstr "" #. module: rma #: model:ir.model,name:rma.model_account_move_line msgid "Journal Item" -msgstr "" +msgstr "Apunte contable" #. module: rma #: model:ir.model.fields,field_description:rma.field_account_move____last_update @@ -952,9 +985,10 @@ msgstr "Adjuntos principales" #. module: rma #: model_terms:ir.actions.act_window,help:rma.action_rma_tag -msgid "" -"Manage RMA tags to better classify them for tracking and analysis purposes." +msgid "Manage RMA tags to better classify them for tracking and analysis purposes." msgstr "" +"Administrar etiquetas de RMA para clasificarlos de modo que mejore el seguimiento y " +"análisis de los mismos." #. module: rma #: model:ir.module.category,description:rma.rma_module_category @@ -1063,13 +1097,12 @@ msgstr "Número de mensajes no leidos" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_force_thread_id msgid "" -"Optional ID of a thread (record) to which all incoming messages will be " -"attached, even if they did not reply to it. If set, this will disable the " -"creation of new records completely." +"Optional ID of a thread (record) to which all incoming messages will be attached, even if " +"they did not reply to it. If set, this will disable the creation of new records completely." msgstr "" -"Id. opcional de un hilo (registro) al que todos los mensajes entrantes serán " -"adjuntados, incluso si no fueron respuestas del mismo. Si se establece, se " -"deshabilitará completamente la creación de nuevos registros." +"Id. opcional de un hilo (registro) al que todos los mensajes entrantes serán adjuntados, " +"incluso si no fueron respuestas del mismo. Si se establece, se deshabilitará completamente " +"la creación de nuevos registros." #. module: rma #: model:ir.ui.menu,name:rma.rma_orders_menu @@ -1109,12 +1142,11 @@ msgstr "ID del hilo del registro padre" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_parent_model_id msgid "" -"Parent model holding the alias. The model holding the alias reference is not " -"necessarily the model given by alias_model_id (example: project " -"(parent_model) and task (model))" +"Parent model holding the alias. The model holding the alias reference is not necessarily " +"the model given by alias_model_id (example: project (parent_model) and task (model))" msgstr "" -"Modelo padre que contiene el alias. El modelo que contiene la referencia " -"alias no es necesariamente el modelo dado por alias_model_id" +"Modelo padre que contiene el alias. El modelo que contiene la referencia alias no es " +"necesariamente el modelo dado por alias_model_id" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -1127,15 +1159,13 @@ msgid "" "Policy to post a message on the document using the mailgateway.\n" "- everyone: everyone can post\n" "- partners: only authenticated partners\n" -"- followers: only followers of the related document or members of following " -"channels\n" +"- followers: only followers of the related document or members of following channels\n" msgstr "" -"Política para publicar un mensaje en el documento utilizando el servidor de " -"correo.\n" +"Política para publicar un mensaje en el documento utilizando el servidor de correo.\n" "- todo el mundo: todos pueden publicar\n" "- socios: sólo socios autenticados\n" -"- seguidores: sólo seguidores del documento relacionado o miembros de los " -"siguientes canales\n" +"- seguidores: sólo seguidores del documento relacionado o miembros de los siguientes " +"canales\n" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__access_url @@ -1171,7 +1201,7 @@ msgstr "Cantidad" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_tag__is_public msgid "Public Tag" -msgstr "" +msgstr "Etiqueta pública" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__product_uom_qty @@ -1194,12 +1224,8 @@ msgstr "Cantidad a extraer" #. module: rma #: code:addons/rma/models/rma.py:0 #, python-format -msgid "" -"Quantity to extract cannot be greater than remaining delivery quantity (%s " -"%s)" -msgstr "" -"La cantidad a extraer no puede ser mayor que la cantidad de entrega " -"restante(%s %s)" +msgid "Quantity to extract cannot be greater than remaining delivery quantity (%s %s)" +msgstr "La cantidad a extraer no puede ser mayor que la cantidad de entrega restante(%s %s)" #. module: rma #: model:ir.model.fields,help:rma.field_rma_split_wizard__product_uom_qty @@ -1207,13 +1233,11 @@ msgid "Quantity to extract to a new RMA." msgstr "Cantidad a extraer en nuevo RMA." #. module: rma -#: model:ir.actions.act_window,name:rma.rma_action -#: model:ir.model,name:rma.model_rma +#: model:ir.actions.act_window,name:rma.rma_action model:ir.model,name:rma.model_rma #: model:ir.model.fields,field_description:rma.field_account_move_line__rma_id #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__rma_id #: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma -#: model:ir.module.category,name:rma.rma_module_category -#: model:ir.ui.menu,name:rma.rma_menu +#: model:ir.module.category,name:rma.rma_module_category model:ir.ui.menu,name:rma.rma_menu #: model_terms:ir.ui.view,arch_db:rma.view_partner_form #: model_terms:ir.ui.view,arch_db:rma.view_picking_form msgid "RMA" @@ -1234,7 +1258,7 @@ msgstr "Código de RMA" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "RMA Confirmation Email" -msgstr "" +msgstr "Correo de confirmación de RMA" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -1271,7 +1295,7 @@ msgstr "Ubicación de RMA" #: model:mail.message.subtype,name:rma.mt_rma_notification #: model:mail.message.subtype,name:rma.mt_rma_team_rma_notification msgid "RMA Notification" -msgstr "" +msgstr "Notificación de RMA" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page @@ -1293,7 +1317,7 @@ msgstr "Tipo de operación para entrega de RMA" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "RMA Receipt Confirmation Email" -msgstr "" +msgstr "Correo de confirmación de recepción de RMA" #. module: rma #: code:addons/rma/models/stock_warehouse.py:0 @@ -1314,16 +1338,15 @@ msgstr "Asistente para dividir RMA" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.view_rma_tag_form msgid "RMA Tag" -msgstr "" +msgstr "Etiqueta RMA" #. module: rma -#: model:ir.actions.act_window,name:rma.action_rma_tag -#: model:ir.model,name:rma.model_rma_tag +#: model:ir.actions.act_window,name:rma.action_rma_tag model:ir.model,name:rma.model_rma_tag #: model:ir.ui.menu,name:rma.rma_configuration_rma_tag_menu #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search #: model_terms:ir.ui.view,arch_db:rma.view_rma_tag_list msgid "RMA Tags" -msgstr "" +msgstr "Etiquetas RMA" #. module: rma #: model:ir.model,name:rma.model_rma_team @@ -1341,7 +1364,7 @@ msgstr "Equipo de RMA del cual el usuario es miembro." #. module: rma #: model:mail.message.subtype,description:rma.mt_rma_notification msgid "RMA automatic customer notifications" -msgstr "" +msgstr "Notificaciones automáticas de RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_res_partner__rma_count @@ -1353,7 +1376,7 @@ msgstr "Cantidad de RMAs" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "RMA draft notification Email" -msgstr "" +msgstr "Correo de notificación de borrador de RMA" #. module: rma #: model:mail.message.subtype,description:rma.mt_rma_draft @@ -1368,8 +1391,7 @@ msgstr "RMAs que originaron esta orden" #. module: rma #: model:ir.model.fields,help:rma.field_stock_warehouse__rma msgid "RMA related products can be stored in this warehouse." -msgstr "" -"Productos relacionados con el RMA pueden ser guardados en este almacén." +msgstr "Productos relacionados con el RMA pueden ser guardados en este almacén." #. module: rma #: model:ir.model,name:rma.model_rma_operation @@ -1490,27 +1512,25 @@ msgstr "Reemplazado" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Replacement: Move %s (Picking %s) has been created." +"Replacement: Move %s " +"(Picking %s) has been " +"created." msgstr "" -"Reemplazo: El movimiento %s (Orden de entrega %s) ha sido creado." +"Reemplazo: El movimiento %s (Orden de entrega %s) ha sido creado." #. module: rma #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Replacement:
Product
%s
Quantity %f %s
This replacement did not " -"create a new move, but one of the previously created moves was updated with " -"this data." +"Replacement:
Product " +"%s
Quantity %f %s
This replacement did not create a new move, but one of the " +"previously created moves was updated with this data." msgstr "" -"Reemplazo:
Producto %s
Cantidad %f %s
El reemplazo realizado no creó un " -"movimiento nuevo, pero uno de los movimientos creados anteriormente fué " -"actualizado con estos datos." +"Reemplazo:
Producto " +"%s
Cantidad %f %s
El reemplazo realizado no creó un movimiento nuevo, pero uno " +"de los movimientos creados anteriormente fué actualizado con estos datos." #. module: rma #: model:ir.ui.menu,name:rma.rma_reporting_menu @@ -1555,11 +1575,11 @@ msgstr "Devolver al cliente" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Return: %s has been created." +"Return: %s has been " +"created." msgstr "" -"Devolución: La orden de entrega %s ha sido creada." +"Devolución: La orden de entrega %s ha sido creada." #. module: rma #: model:ir.model.fields.selection,name:rma.selection__rma__state__returned @@ -1569,7 +1589,7 @@ msgstr "Devuelto" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_tag__rma_ids msgid "Rma" -msgstr "" +msgstr "Rma" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__rma_count @@ -1579,7 +1599,6 @@ msgstr "Cantidad de RMAs" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_has_sms_error #: model:ir.model.fields,field_description:rma.field_rma_team__message_has_sms_error -#, fuzzy msgid "SMS Delivery error" msgstr "Error de Envío de Mensaje" @@ -1597,24 +1616,24 @@ msgstr "Token de seguridad" #: model:ir.model.fields,field_description:rma.field_res_company__send_rma_confirmation #: model:ir.model.fields,field_description:rma.field_res_config_settings__send_rma_confirmation msgid "Send RMA Confirmation" -msgstr "" +msgstr "Enviar confirmación de RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_res_company__send_rma_receipt_confirmation #: model:ir.model.fields,field_description:rma.field_res_config_settings__send_rma_receipt_confirmation msgid "Send RMA Receipt Confirmation" -msgstr "" +msgstr "Enviar confirmación de recepción de RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_res_company__send_rma_draft_confirmation #: model:ir.model.fields,field_description:rma.field_res_config_settings__send_rma_draft_confirmation msgid "Send RMA draft Confirmation" -msgstr "" +msgstr "Enviar confirmación de borrador RMA" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "Send automatic RMA info to customer" -msgstr "" +msgstr "Enviar información automática de RMA al cliente" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form @@ -1671,12 +1690,12 @@ msgstr "Compartir" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__partner_shipping_id msgid "Shipping Address" -msgstr "" +msgstr "Dirección de envío" #. module: rma #: model:ir.model.fields,help:rma.field_rma__partner_shipping_id msgid "Shipping address for current RMA." -msgstr "" +msgstr "Dirección de envío para el RMA en curso" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__origin @@ -1697,12 +1716,10 @@ msgstr "Dividir RMA" #. module: rma #: code:addons/rma/models/rma.py:0 #, python-format -msgid "" -"Split: %s has been " -"created." +msgid "Split: %s has been created." msgstr "" -"División: El RMA %s ha sido creado." +"División: El RMA %s ha sido " +"creado." #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__state @@ -1711,8 +1728,7 @@ msgid "State" msgstr "Estado" #. module: rma -#: code:addons/rma/controllers/main.py:0 -#: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas +#: code:addons/rma/controllers/main.py:0 model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #, python-format msgid "Status" msgstr "Estado" @@ -1743,22 +1759,22 @@ msgstr "Regla de Inventario" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_tag__name msgid "Tag Name" -msgstr "" +msgstr "Nombre de etiqueta" #. module: rma #: model:ir.model.constraint,message:rma.constraint_rma_tag_name_uniq msgid "Tag name already exists !" -msgstr "" +msgstr "¡El nombre de etiqueta ya existe!" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__tag_ids msgid "Tags" -msgstr "" +msgstr "Etiquetas" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_form msgid "Tags..." -msgstr "" +msgstr "Etiquetas..." #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_team__user_id @@ -1784,46 +1800,44 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_model_id msgid "" -"The model (Odoo Document Kind) to which this alias corresponds. Any incoming " -"email that does not reply to an existing record will cause the creation of a " -"new record of this model (e.g. a Project Task)" +"The model (Odoo Document Kind) to which this alias corresponds. Any incoming email that " +"does not reply to an existing record will cause the creation of a new record of this model " +"(e.g. a Project Task)" msgstr "" -"El modelo (Tipo de documento de Odoo) al que corresponde este seudónimo. " -"Cualquier correo entrante que no sea respuesta a un registro existente, " -"causará la creación de un nuevo registro de este modelo" +"El modelo (Tipo de documento de Odoo) al que corresponde este seudónimo. Cualquier correo " +"entrante que no sea respuesta a un registro existente, causará la creación de un nuevo " +"registro de este modelo" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_name msgid "" -"The name of the email alias, e.g. 'jobs' if you want to catch emails for " -"" +"The name of the email alias, e.g. 'jobs' if you want to catch emails for " msgstr "" -"El nombre de este seudónimo de correo electrónico. Por ejemplo, \"trabajos" -"\", si lo que quiere es obtener los correos para " +"El nombre de este seudónimo de correo electrónico. Por ejemplo, \"trabajos\", si lo que " +"quiere es obtener los correos para " #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_user_id msgid "" -"The owner of records created upon receiving emails on this alias. If this " -"field is not set the system will attempt to find the right owner based on " -"the sender (From) address, or will use the Administrator account if no " -"system user is found for that address." +"The owner of records created upon receiving emails on this alias. If this field is not set " +"the system will attempt to find the right owner based on the sender (From) address, or " +"will use the Administrator account if no system user is found for that address." msgstr "" -"El propietario de los registros creados al recibir correos electrónicos en " -"este seudónimo. Si el campo no está establecido, el sistema tratará de " -"encontrar el propietario adecuado basado en la dirección del emisor (De), o " -"usará la cuenta de administrador si no se encuentra un usuario para esa " -"dirección." +"El propietario de los registros creados al recibir correos electrónicos en este seudónimo. " +"Si el campo no está establecido, el sistema tratará de encontrar el propietario adecuado " +"basado en la dirección del emisor (De), o usará la cuenta de administrador si no se " +"encuentra un usuario para esa dirección." #. module: rma #: code:addons/rma/models/stock_move.py:0 #, python-format msgid "" -"The quantity done for the product '%s' must be equal to its initial demand " -"because the stock move is linked to an RMA (%s)." +"The quantity done for the product '%s' must be equal to its initial demand because the " +"stock move is linked to an RMA (%s)." msgstr "" -"La cantidad realizada para el producto '%s' debe ser igual a la demanda " -"inicial porque el movimiento está enlazado a un RMA (%s)." +"La cantidad realizada para el producto '%s' debe ser igual a la demanda inicial porque el " +"movimiento está enlazado a un RMA (%s)." #. module: rma #: code:addons/rma/models/rma.py:0 @@ -1834,17 +1848,17 @@ msgstr "La cantidad a devolver es mayor que la cantidad restante del RMA." #. module: rma #: model:ir.model.fields,help:rma.field_rma_tag__is_public msgid "The tag is visible in the portal view" -msgstr "" +msgstr "La etiqueta es visible en la vista de portal" #. module: rma #: code:addons/rma/models/account_move.py:0 #, python-format msgid "" -"There is at least one invoice lines whose quantity is less than the quantity " -"specified in its linked RMA." +"There is at least one invoice lines whose quantity is less than the quantity specified in " +"its linked RMA." msgstr "" -"Hay al menos una linea de factura que tiene una cantidad menor que la " -"cantidad especificada en el RMA asociado." +"Hay al menos una linea de factura que tiene una cantidad menor que la cantidad " +"especificada en el RMA asociado." #. module: rma #: code:addons/rma/models/rma.py:0 @@ -1873,7 +1887,7 @@ msgstr "Reembolsar" #. module: rma #: model:ir.model,name:rma.model_stock_picking msgid "Transfer" -msgstr "Transferir" +msgstr "Albarán" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__type @@ -1986,8 +2000,8 @@ msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form msgid "" -"When customers themselves place an RMA from the portal, send an automatic " -"notification acknowleging it." +"When customers themselves place an RMA from the portal, send an automatic notification " +"acknowleging it." msgstr "" #. module: rma @@ -1997,22 +2011,19 @@ msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form -msgid "" -"When the RMA products are received, send an automatic information email." +msgid "When the RMA products are received, send an automatic information email." msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_res_company__send_rma_receipt_confirmation #: model:ir.model.fields,help:rma.field_res_config_settings__send_rma_receipt_confirmation -msgid "" -"When the RMA receipt is confirmed, send a confirmation email to the customer." +msgid "When the RMA receipt is confirmed, send a confirmation email to the customer." msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_res_company__send_rma_confirmation #: model:ir.model.fields,help:rma.field_res_config_settings__send_rma_confirmation -msgid "" -"When the delivery is confirmed, send a confirmation email to the customer." +msgid "When the delivery is confirmed, send a confirmation email to the customer." msgstr "" #. module: rma @@ -2025,18 +2036,14 @@ msgstr "No puede eliminar RMAs que no estén en estado borrador" #: code:addons/rma/wizard/stock_picking_return.py:0 #, python-format msgid "" -"You must specify the 'Customer' in the 'Stock Picking' from which RMAs will " -"be created" +"You must specify the 'Customer' in the 'Stock Picking' from which RMAs will be created" msgstr "" -"Debe seleccionar el 'Cliente' en la 'Orden de Entrega' desde la cual los " -"RMAs serán creados" +"Debe seleccionar el 'Cliente' en la 'Orden de Entrega' desde la cual los RMAs serán creados" #. module: rma #: model:res.groups,comment:rma.rma_group_user_all -msgid "" -"the user will have access to all records of everyone in the RMA application." -msgstr "" -"El usuario tendrá acceso a todos los registros de RMA de todos lo usuarios." +msgid "the user will have access to all records of everyone in the RMA application." +msgstr "El usuario tendrá acceso a todos los registros de RMA de todos lo usuarios." #. module: rma #: model:res.groups,comment:rma.rma_group_user_own @@ -2051,33 +2058,3 @@ msgid "" msgstr "" "El usuario tendrá acceso a la configuración de RMA y a los informes " "estadísticos." - -#~ msgid "Not urgent" -#~ msgstr "No Urgente" - -#~ msgid "Very Urgent" -#~ msgstr "Muy Urgente" - -#~ msgid "If checked new messages require your attention." -#~ msgstr "Si está marcado, hay nuevos mensajes que requieren su atención." - -#~ msgid "Invoice" -#~ msgstr "Factura" - -#~ msgid "Invoice Line" -#~ msgstr "Linea de factura" - -#~ msgid "Overdue" -#~ msgstr "Vencidas" - -#~ msgid "Planned" -#~ msgstr "Planeado" - -#~ msgid "Today" -#~ msgstr "Hoy" - -#~ msgid "Waiting for refund" -#~ msgstr "Esperando por reembolso" - -#~ msgid "New RMA in draft state" -#~ msgstr "Nuevo RMA en estado Borrador" diff --git a/rma/i18n/rma.pot b/rma/i18n/rma.pot index 366dd579..1d350b85 100644 --- a/rma/i18n/rma.pot +++ b/rma/i18n/rma.pot @@ -6,6 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-21 09:33+0000\n" +"PO-Revision-Date: 2022-01-21 09:33+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -226,11 +228,6 @@ msgstr "" msgid "Delivered quantity" msgstr "" -#. module: rma -#: model_terms:ir.ui.view,arch_db:rma.report_rma_document -msgid "Invoicing address:" -msgstr "" - #. module: rma #: model_terms:ir.ui.view,arch_db:rma.report_rma_document msgid "Move:" @@ -292,6 +289,16 @@ msgstr "" msgid "Responsible:" msgstr "" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.report_rma_document +msgid "Shipping Address:" +msgstr "" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page +msgid "Shipping address:" +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.report_rma_document msgid "State:" @@ -818,6 +825,16 @@ msgstr "" msgid "Invoice Address" msgstr "" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.report_rma_document +msgid "Invoicing Address:" +msgstr "" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.report_rma_document +msgid "Invoicing and Shipping Address:" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_is_follower #: model:ir.model.fields,field_description:rma.field_rma_team__message_is_follower diff --git a/rma/views/report_rma.xml b/rma/views/report_rma.xml index 2442589d..46bbd3e8 100644 --- a/rma/views/report_rma.xml +++ b/rma/views/report_rma.xml @@ -15,14 +15,28 @@ - - Invoicing address: -
+ Invoicing and Shipping Address: + Invoicing Address: +
+ + Shipping Address: +
+
diff --git a/rma/views/rma_portal_templates.xml b/rma/views/rma_portal_templates.xml index a102f80d..eb1b6892 100644 --- a/rma/views/rma_portal_templates.xml +++ b/rma/views/rma_portal_templates.xml @@ -159,6 +159,7 @@
+
+ +
+
+ Shipping address: +
+
+
+ Contact + Contact +
+
+
+
+
+
+
Responsible: From 2d1b861c5314dd88dc2d86a3adf0c17e2ca3e510 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 25 Jan 2022 13:59:59 +0100 Subject: [PATCH 4/5] [IMP] rma: unplug test cases from declaration This way, we can reuse them in other modules easily --- rma/tests/test_rma.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rma/tests/test_rma.py b/rma/tests/test_rma.py index ab0ca6da..1de32523 100644 --- a/rma/tests/test_rma.py +++ b/rma/tests/test_rma.py @@ -123,6 +123,8 @@ class TestRma(SavepointCase): picking.button_validate() return picking + +class TestRmaCase(TestRma): def test_onchange(self): rma_form = Form(self.env["rma"]) # If partner changes, the invoice address is set From a427682755fd1feb3ab428fa79dfd010957b66ff Mon Sep 17 00:00:00 2001 From: david Date: Fri, 28 Jan 2022 16:50:02 +0100 Subject: [PATCH 5/5] [IMP] rma: finish RMA manually Sometimes there's no choice to return, refund or replace an RMA for different reasons. For example, when the customer doesn't want to repair the product because that would be too expensive. We still want finish the RMA and document the reasons. This improvement allows it. TT34164 --- rma/README.rst | 10 ++ rma/__manifest__.py | 2 + rma/i18n/es.po | 121 +++++++++++++++++-- rma/i18n/rma.pot | 100 +++++++++++++++ rma/models/__init__.py | 1 + rma/models/res_config_settings.py | 5 + rma/models/rma.py | 35 ++++++ rma/models/rma_finalization.py | 26 ++++ rma/readme/CONFIGURE.rst | 5 + rma/readme/USAGE.rst | 5 + rma/security/ir.model.access.csv | 4 + rma/security/rma_security.xml | 12 ++ rma/static/description/index.html | 12 +- rma/tests/test_rma.py | 23 ++++ rma/views/res_config_settings_views.xml | 15 +++ rma/views/rma_finalization_views.xml | 72 +++++++++++ rma/views/rma_views.xml | 28 +++++ rma/wizard/__init__.py | 1 + rma/wizard/rma_finalization_wizard.py | 18 +++ rma/wizard/rma_finalization_wizard_views.xml | 34 ++++++ 20 files changed, 519 insertions(+), 10 deletions(-) create mode 100644 rma/models/rma_finalization.py create mode 100644 rma/views/rma_finalization_views.xml create mode 100644 rma/wizard/rma_finalization_wizard.py create mode 100644 rma/wizard/rma_finalization_wizard_views.xml diff --git a/rma/README.rst b/rma/README.rst index 855d4bf9..4361cc0a 100644 --- a/rma/README.rst +++ b/rma/README.rst @@ -51,6 +51,11 @@ If you want RMAs to be created from incoming emails, you need to: one. #. Go to 'Email' tab and set an 'Email Alias'. +If you want to manually finish RMAs, you need to: + +#. Go to *Settings > Inventory*. +#. Set *Finish RMAs manually* checkbox on. + Usage ===== @@ -79,6 +84,11 @@ To use this module, you need to: The RMA will be set automatically to 'Replaced' or 'Returned' state when the RMA quantity is equal or lower than the quantity in done delivery orders linked to it. +#. You can also finish the RMA without further ado. To do so click on the *Finish* + button. A wizard will ask you for the reason from a selection of preconfigured ones. + Be sure to configure them in advance on *RMA > Configuration > Finalization Reasons*. + Once the RMA is finished, it will be set to that state and the reason will be + registered. An RMA can also be created from a return of a delivery order: diff --git a/rma/__manifest__.py b/rma/__manifest__.py index 84b39b7d..41054ae4 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -21,9 +21,11 @@ "security/ir.model.access.csv", "wizard/stock_picking_return_views.xml", "wizard/rma_delivery_views.xml", + "wizard/rma_finalization_wizard_views.xml", "wizard/rma_split_views.xml", "views/menus.xml", "views/res_partner_views.xml", + "views/rma_finalization_views.xml", "views/rma_portal_templates.xml", "views/rma_team_views.xml", "views/rma_views.xml", diff --git a/rma/i18n/es.po b/rma/i18n/es.po index 195cdd26..d6e390e6 100644 --- a/rma/i18n/es.po +++ b/rma/i18n/es.po @@ -21,12 +21,12 @@ msgstr "" #: model:mail.template,report_name:rma.mail_template_rma_notification #: model:mail.template,report_name:rma.mail_template_rma_receipt_notification msgid "${(object.name or '')}" -msgstr "${(object.name or '')}" +msgstr "" #. module: rma #: model:mail.template,subject:rma.mail_template_rma_notification msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" -msgstr "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" +msgstr "" #. module: rma #: model:mail.template,subject:rma.mail_template_rma_receipt_notification @@ -390,9 +390,11 @@ msgid "Action Needed" msgstr "Acción Necesaria" #. module: rma +#: model:ir.model.fields,field_description:rma.field_rma_finalization__active #: model:ir.model.fields,field_description:rma.field_rma_operation__active #: model:ir.model.fields,field_description:rma.field_rma_tag__active #: model:ir.model.fields,field_description:rma.field_rma_team__active +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search msgid "Active" msgstr "Activo" @@ -443,7 +445,9 @@ msgid "Aliased Model" msgstr "Modelo con seudónimo" #. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search +#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_form msgid "Archived" msgstr "Archivado" @@ -461,7 +465,12 @@ msgstr "Conteo de archivos adjuntos" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_team_view_form msgid "Avatar" -msgstr "Avatar" +msgstr "" + +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__can_be_finished +msgid "Can Be Finished" +msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__can_be_locked @@ -489,6 +498,7 @@ msgid "Can Be Split" msgstr "Puede ser dividido" #. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_wizard_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_redelivery_wizard_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_split_wizard_view_form2 #: model_terms:ir.ui.view,arch_db:rma.rma_view_form @@ -538,6 +548,7 @@ msgstr "Compañías" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__company_id +#: model:ir.model.fields,field_description:rma.field_rma_finalization__company_id #: model:ir.model.fields,field_description:rma.field_rma_team__company_id msgid "Company" msgstr "Compañía" @@ -582,6 +593,11 @@ msgstr "" msgid "Create RMAs" msgstr "Crear RMAs" +#. module: rma +#: model_terms:ir.actions.act_window,help:rma.action_rma_finalization +msgid "Create a new RMA finalization" +msgstr "Crear un nuevo motivo de finalización de RMA" + #. module: rma #: model_terms:ir.actions.act_window,help:rma.action_rma_tag msgid "Create a new RMA tag" @@ -590,6 +606,8 @@ msgstr "Crear una nueva etiqueta de RMA" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__create_uid #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__create_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization__create_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__create_uid #: model:ir.model.fields,field_description:rma.field_rma_operation__create_uid #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__create_uid #: model:ir.model.fields,field_description:rma.field_rma_tag__create_uid @@ -600,6 +618,8 @@ msgstr "Creado por" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__create_date #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__create_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization__create_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__create_date #: model:ir.model.fields,field_description:rma.field_rma_operation__create_date #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__create_date #: model:ir.model.fields,field_description:rma.field_rma_tag__create_date @@ -694,6 +714,8 @@ msgstr "Descripción" #: model:ir.model.fields,field_description:rma.field_res_users__display_name #: model:ir.model.fields,field_description:rma.field_rma__display_name #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__display_name +#: model:ir.model.fields,field_description:rma.field_rma_finalization__display_name +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_operation__display_name #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_tag__display_name @@ -761,7 +783,8 @@ msgstr "Enviar correo al cliente una vez se confirma el RMA." #: model:ir.model.fields,help:rma.field_res_company__rma_mail_receipt_confirmation_template_id #: model:ir.model.fields,help:rma.field_res_config_settings__rma_mail_receipt_confirmation_template_id msgid "Email sent to the customer once the RMA products are received." -msgstr "Enviar correo al cliente una vez se recepcionen los productos del RMA." +msgstr "" +"Enviar correo al cliente una vez se recepcionen los productos del RMA." #. module: rma #: model:ir.model.fields,help:rma.field_res_company__rma_mail_draft_confirmation_template_id @@ -780,6 +803,36 @@ msgstr "RMA Extraído" msgid "Extracted from" msgstr "Extraído de" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__finalization_id +msgid "Finalization Reason" +msgstr "Motivo de finalización" + +#. module: rma +#: model:ir.model.constraint,message:rma.constraint_rma_finalization_name_company_uniq +msgid "Finalization name already exists !" +msgstr "¡El nombre de finalización ya existe!" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_form +msgid "Finish" +msgstr "Finalizar" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_wizard_view_form +msgid "Finish RMA" +msgstr "Finalizar RMA" + +#. module: rma +#: model:ir.actions.act_window,name:rma.rma_finalization_wizard_action +msgid "Finish RMA Manualy" +msgstr "Finalizar RMA manualmente" + +#. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma__state__finished +msgid "Finished" +msgstr "Finalizado" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_follower_ids #: model:ir.model.fields,field_description:rma.field_rma_team__message_follower_ids @@ -817,6 +870,8 @@ msgstr "Agrupar por" #: model:ir.model.fields,field_description:rma.field_res_users__id #: model:ir.model.fields,field_description:rma.field_rma__id #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__id +#: model:ir.model.fields,field_description:rma.field_rma_finalization__id +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_operation__id #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_tag__id @@ -827,7 +882,7 @@ msgstr "Agrupar por" #: model:ir.model.fields,field_description:rma.field_stock_rule__id #: model:ir.model.fields,field_description:rma.field_stock_warehouse__id msgid "ID" -msgstr "ID" +msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_parent_thread_id @@ -925,6 +980,8 @@ msgstr "Apunte contable" #: model:ir.model.fields,field_description:rma.field_res_users____last_update #: model:ir.model.fields,field_description:rma.field_rma____last_update #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard____last_update +#: model:ir.model.fields,field_description:rma.field_rma_finalization____last_update +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_operation____last_update #: model:ir.model.fields,field_description:rma.field_rma_split_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_tag____last_update @@ -940,6 +997,8 @@ msgstr "Última modificación en" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__write_uid #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__write_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization__write_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__write_uid #: model:ir.model.fields,field_description:rma.field_rma_operation__write_uid #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__write_uid #: model:ir.model.fields,field_description:rma.field_rma_tag__write_uid @@ -950,6 +1009,8 @@ msgstr "Última actualización por" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__write_date #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__write_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization__write_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__write_date #: model:ir.model.fields,field_description:rma.field_rma_operation__write_date #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__write_date #: model:ir.model.fields,field_description:rma.field_rma_tag__write_date @@ -983,6 +1044,14 @@ msgstr "Bloqueado" msgid "Main Attachment" msgstr "Adjuntos principales" +#. module: rma +#: model_terms:ir.actions.act_window,help:rma.action_rma_finalization +msgid "" +"Manage RMA finalization reasons to better classify them for tracking and " +"analysis purposes." +msgstr "Adminitrar motivos de finalización de RMA para una mejor clasificación de estos" +" para su seguimiento análisis posterior." + #. module: rma #: model_terms:ir.actions.act_window,help:rma.action_rma_tag msgid "Manage RMA tags to better classify them for tracking and analysis purposes." @@ -1027,6 +1096,7 @@ msgid "Name" msgstr "Nombre" #. module: rma +#: code:addons/rma/models/rma.py:0 code:addons/rma/models/rma.py:0 #: code:addons/rma/models/rma.py:0 #, python-format msgid "New" @@ -1062,7 +1132,7 @@ msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución." #. module: rma #: model:ir.model.fields.selection,name:rma.selection__rma__priority__0 msgid "Normal" -msgstr "Normal" +msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_needaction_counter @@ -1241,7 +1311,7 @@ msgstr "Cantidad a extraer en nuevo RMA." #: model_terms:ir.ui.view,arch_db:rma.view_partner_form #: model_terms:ir.ui.view,arch_db:rma.view_picking_form msgid "RMA" -msgstr "RMA" +msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas @@ -1281,6 +1351,29 @@ msgstr "Órdenes de entrega de RMA" msgid "RMA Delivery Wizard" msgstr "Asistente de entrega de RMA" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_form +msgid "RMA Finalization" +msgstr "Finalización de RMA" + +#. module: rma +#: model:ir.model,name:rma.model_rma_finalization +msgid "RMA Finalization Reason" +msgstr "Motivo de finalización de RMA" + +#. module: rma +#: model:ir.actions.act_window,name:rma.action_rma_finalization +#: model:ir.ui.menu,name:rma.rma_configuration_rma_finalization_menu +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search +#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_list +msgid "RMA Finalization Reasons" +msgstr "Motivos de finalización de RMA" + +#. module: rma +#: model:ir.model,name:rma.model_rma_finalization_wizard +msgid "RMA Finalization Wizard" +msgstr "Asistente de finalización de RMA" + #. module: rma #: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma_in_type_id msgid "RMA In Type" @@ -1414,7 +1507,7 @@ msgstr "Equipo de RMA" #: model:ir.model.fields,field_description:rma.field_res_users__rma_ids #: model:ir.model.fields,field_description:rma.field_stock_move__rma_ids msgid "RMAs" -msgstr "RMAs" +msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -1426,6 +1519,16 @@ msgstr "RMAs pasados de fecha límite" msgid "RMAs yet to be fully processed" msgstr "RMAs pendientes de ser procesados por completo" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__finalization_id +msgid "Reason" +msgstr "Motivo" + +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma_finalization__name +msgid "Reason Name" +msgstr "Nombre del motivo" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_form msgid "Receipt" @@ -1589,7 +1692,7 @@ msgstr "Devuelto" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_tag__rma_ids msgid "Rma" -msgstr "Rma" +msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__rma_count diff --git a/rma/i18n/rma.pot b/rma/i18n/rma.pot index 1d350b85..ce218474 100644 --- a/rma/i18n/rma.pot +++ b/rma/i18n/rma.pot @@ -328,9 +328,11 @@ msgid "Action Needed" msgstr "" #. module: rma +#: model:ir.model.fields,field_description:rma.field_rma_finalization__active #: model:ir.model.fields,field_description:rma.field_rma_operation__active #: model:ir.model.fields,field_description:rma.field_rma_tag__active #: model:ir.model.fields,field_description:rma.field_rma_team__active +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search msgid "Active" msgstr "" @@ -381,7 +383,9 @@ msgid "Aliased Model" msgstr "" #. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search +#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_form msgid "Archived" msgstr "" @@ -401,6 +405,11 @@ msgstr "" msgid "Avatar" msgstr "" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__can_be_finished +msgid "Can Be Finished" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__can_be_locked msgid "Can Be Locked" @@ -427,6 +436,7 @@ msgid "Can Be Split" msgstr "" #. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_wizard_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_redelivery_wizard_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_split_wizard_view_form2 #: model_terms:ir.ui.view,arch_db:rma.rma_view_form @@ -476,6 +486,7 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__company_id +#: model:ir.model.fields,field_description:rma.field_rma_finalization__company_id #: model:ir.model.fields,field_description:rma.field_rma_team__company_id msgid "Company" msgstr "" @@ -520,6 +531,11 @@ msgstr "" msgid "Create RMAs" msgstr "" +#. module: rma +#: model_terms:ir.actions.act_window,help:rma.action_rma_finalization +msgid "Create a new RMA finalization" +msgstr "" + #. module: rma #: model_terms:ir.actions.act_window,help:rma.action_rma_tag msgid "Create a new RMA tag" @@ -528,6 +544,8 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__create_uid #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__create_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization__create_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__create_uid #: model:ir.model.fields,field_description:rma.field_rma_operation__create_uid #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__create_uid #: model:ir.model.fields,field_description:rma.field_rma_tag__create_uid @@ -538,6 +556,8 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__create_date #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__create_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization__create_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__create_date #: model:ir.model.fields,field_description:rma.field_rma_operation__create_date #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__create_date #: model:ir.model.fields,field_description:rma.field_rma_tag__create_date @@ -632,6 +652,8 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_res_users__display_name #: model:ir.model.fields,field_description:rma.field_rma__display_name #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__display_name +#: model:ir.model.fields,field_description:rma.field_rma_finalization__display_name +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_operation__display_name #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_tag__display_name @@ -718,6 +740,36 @@ msgstr "" msgid "Extracted from" msgstr "" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__finalization_id +msgid "Finalization Reason" +msgstr "" + +#. module: rma +#: model:ir.model.constraint,message:rma.constraint_rma_finalization_name_company_uniq +msgid "Finalization name already exists !" +msgstr "" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_form +msgid "Finish" +msgstr "" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_wizard_view_form +msgid "Finish RMA" +msgstr "" + +#. module: rma +#: model:ir.actions.act_window,name:rma.rma_finalization_wizard_action +msgid "Finish RMA Manualy" +msgstr "" + +#. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma__state__finished +msgid "Finished" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_follower_ids #: model:ir.model.fields,field_description:rma.field_rma_team__message_follower_ids @@ -755,6 +807,8 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_res_users__id #: model:ir.model.fields,field_description:rma.field_rma__id #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__id +#: model:ir.model.fields,field_description:rma.field_rma_finalization__id +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_operation__id #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_tag__id @@ -860,6 +914,8 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_res_users____last_update #: model:ir.model.fields,field_description:rma.field_rma____last_update #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard____last_update +#: model:ir.model.fields,field_description:rma.field_rma_finalization____last_update +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_operation____last_update #: model:ir.model.fields,field_description:rma.field_rma_split_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_tag____last_update @@ -875,6 +931,8 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__write_uid #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__write_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization__write_uid +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__write_uid #: model:ir.model.fields,field_description:rma.field_rma_operation__write_uid #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__write_uid #: model:ir.model.fields,field_description:rma.field_rma_tag__write_uid @@ -885,6 +943,8 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__write_date #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__write_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization__write_date +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__write_date #: model:ir.model.fields,field_description:rma.field_rma_operation__write_date #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__write_date #: model:ir.model.fields,field_description:rma.field_rma_tag__write_date @@ -918,6 +978,13 @@ msgstr "" msgid "Main Attachment" msgstr "" +#. module: rma +#: model_terms:ir.actions.act_window,help:rma.action_rma_finalization +msgid "" +"Manage RMA finalization reasons to better classify them for tracking and " +"analysis purposes." +msgstr "" + #. module: rma #: model_terms:ir.actions.act_window,help:rma.action_rma_tag msgid "" @@ -1212,6 +1279,29 @@ msgstr "" msgid "RMA Delivery Wizard" msgstr "" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_form +msgid "RMA Finalization" +msgstr "" + +#. module: rma +#: model:ir.model,name:rma.model_rma_finalization +msgid "RMA Finalization Reason" +msgstr "" + +#. module: rma +#: model:ir.actions.act_window,name:rma.action_rma_finalization +#: model:ir.ui.menu,name:rma.rma_configuration_rma_finalization_menu +#: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search +#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_list +msgid "RMA Finalization Reasons" +msgstr "" + +#. module: rma +#: model:ir.model,name:rma.model_rma_finalization_wizard +msgid "RMA Finalization Wizard" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma_in_type_id msgid "RMA In Type" @@ -1358,6 +1448,16 @@ msgstr "" msgid "RMAs yet to be fully processed" msgstr "" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma_finalization_wizard__finalization_id +msgid "Reason" +msgstr "" + +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma_finalization__name +msgid "Reason Name" +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_form msgid "Receipt" diff --git a/rma/models/__init__.py b/rma/models/__init__.py index cc210923..0436117f 100644 --- a/rma/models/__init__.py +++ b/rma/models/__init__.py @@ -2,6 +2,7 @@ from . import account_move from . import rma +from . import rma_finalization from . import rma_operation from . import rma_tag from . import rma_team diff --git a/rma/models/res_config_settings.py b/rma/models/res_config_settings.py index c48d324e..7eae1ded 100644 --- a/rma/models/res_config_settings.py +++ b/rma/models/res_config_settings.py @@ -6,6 +6,11 @@ from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" + group_rma_manual_finalization = fields.Boolean( + string="Finish RMA manually choosing a reason", + help="Allow to finish an RMA without returning back a product or refunding", + implied_group="rma.group_rma_manual_finalization", + ) send_rma_confirmation = fields.Boolean( related="company_id.send_rma_confirmation", readonly=False, diff --git a/rma/models/rma.py b/rma/models/rma.py index 172d9fa5..c84036b3 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -67,6 +67,14 @@ class Rma(models.Model): states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, ) tag_ids = fields.Many2many(comodel_name="rma.tag", string="Tags") + finalization_id = fields.Many2one( + string="Finalization Reason", + comodel_name="rma.finalization", + copy=False, + readonly=True, + domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", + tracking=True, + ) company_id = fields.Many2one( comodel_name="res.company", default=lambda self: self.env.company, @@ -171,6 +179,7 @@ class Rma(models.Model): ("refunded", "Refunded"), ("returned", "Returned"), ("replaced", "Replaced"), + ("finished", "Finished"), ("locked", "Locked"), ("cancelled", "Canceled"), ], @@ -245,6 +254,9 @@ class Rma(models.Model): can_be_locked = fields.Boolean( compute="_compute_can_be_locked", ) + can_be_finished = fields.Boolean( + compute="_compute_can_be_finished", + ) remaining_qty = fields.Float( string="Remaining delivered qty", digits="Product Unit of Measure", @@ -388,6 +400,14 @@ class Rma(models.Model): "replaced", ] + @api.depends("state", "remaining_qty") + def _compute_can_be_finished(self): + for rma in self: + rma.can_be_finished = ( + rma.state in {"received", "waiting_replacement", "waiting_return"} + and rma.remaining_qty > 0 + ) + @api.depends("product_uom_qty", "state", "remaining_qty", "remaining_qty_to_done") def _compute_can_be_split(self): """Compute 'can_be_split'. This field controls the @@ -718,6 +738,21 @@ class Rma(models.Model): action["context"].update(active_id=self.id, active_ids=self.ids) return action + def action_finish(self): + """Invoked when a user wants to manually finalize the RMA""" + self.ensure_one() + self._ensure_can_be_returned() + # Force active_id to avoid issues when coming from smart buttons + # in other models + action = ( + self.env.ref("rma.rma_finalization_wizard_action") + .with_context(active_id=self.id) + .read()[0] + ) + action["context"] = dict(self.env.context) + action["context"].update(active_id=self.id, active_ids=self.ids) + return action + def action_cancel(self): """Invoked when 'Cancel' button in rma form view is clicked.""" self.mapped("reception_move_id")._action_cancel() diff --git a/rma/models/rma_finalization.py b/rma/models/rma_finalization.py new file mode 100644 index 00000000..46b50b2c --- /dev/null +++ b/rma/models/rma_finalization.py @@ -0,0 +1,26 @@ +# Copyright 2022 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class RmaFinalization(models.Model): + _description = "RMA Finalization Reason" + _name = "rma.finalization" + _order = "name" + + active = fields.Boolean(default=True) + name = fields.Char( + string="Reason Name", + required=True, + translate=True, + copy=False, + ) + company_id = fields.Many2one(comodel_name="res.company") + + _sql_constraints = [ + ( + "name_company_uniq", + "unique (name, company_id)", + "Finalization name already exists !", + ), + ] diff --git a/rma/readme/CONFIGURE.rst b/rma/readme/CONFIGURE.rst index c5513046..94121f64 100644 --- a/rma/readme/CONFIGURE.rst +++ b/rma/readme/CONFIGURE.rst @@ -6,3 +6,8 @@ If you want RMAs to be created from incoming emails, you need to: #. Go to *RMA > Configuration > RMA Team* and select a team or create a new one. #. Go to 'Email' tab and set an 'Email Alias'. + +If you want to manually finish RMAs, you need to: + +#. Go to *Settings > Inventory*. +#. Set *Finish RMAs manually* checkbox on. diff --git a/rma/readme/USAGE.rst b/rma/readme/USAGE.rst index aa524e7a..1381ebc4 100644 --- a/rma/readme/USAGE.rst +++ b/rma/readme/USAGE.rst @@ -23,6 +23,11 @@ To use this module, you need to: The RMA will be set automatically to 'Replaced' or 'Returned' state when the RMA quantity is equal or lower than the quantity in done delivery orders linked to it. +#. You can also finish the RMA without further ado. To do so click on the *Finish* + button. A wizard will ask you for the reason from a selection of preconfigured ones. + Be sure to configure them in advance on *RMA > Configuration > Finalization Reasons*. + Once the RMA is finished, it will be set to that state and the reason will be + registered. An RMA can also be created from a return of a delivery order: diff --git a/rma/security/ir.model.access.csv b/rma/security/ir.model.access.csv index 911c8d53..1a264c1b 100644 --- a/rma/security/ir.model.access.csv +++ b/rma/security/ir.model.access.csv @@ -10,3 +10,7 @@ access_rma_tag_user_own,rma.tag.user.own,model_rma_tag,rma_group_user_own,1,0,0, access_rma_tag_manager,rma.tag.manager,model_rma_tag,rma_group_manager,1,1,1,1 access_rma_delivery_wizard_user_all,rma.delivery.wizard.user.all,model_rma_delivery_wizard,rma_group_user_all,1,1,1,1 access_rma_split_wizard_user_all,rma.split.wizard.user.all,model_rma_split_wizard,rma_group_user_all,1,1,1,1 +access_rma_finalization_portal,rma.finalization.portal,model_rma_finalization,base.group_portal,1,0,0,0 +access_rma_finalization_user_own,rma.finalization.user.own,model_rma_finalization,rma_group_user_own,1,0,0,0 +access_rma_finalization_manager,rma.finalization.manager,model_rma_finalization,rma_group_manager,1,1,1,1 +access_rma_finalization_wizard_user_own,rma.finalization.wizard.user.own,model_rma_finalization_wizard,rma_group_user_own,1,0,0,0 diff --git a/rma/security/rma_security.xml b/rma/security/rma_security.xml index e7c42289..f9c3ad48 100644 --- a/rma/security/rma_security.xml +++ b/rma/security/rma_security.xml @@ -38,6 +38,10 @@ eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]" /> + + Allow RMA manual finalization + + Personal RMAs @@ -79,6 +83,14 @@ name="domain_force" >['|',('company_id','=',False),('company_id','in',company_ids)] + + RMA Finalization Reason multi-company + + + ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)] + diff --git a/rma/static/description/index.html b/rma/static/description/index.html index 2fbf341f..005092a3 100644 --- a/rma/static/description/index.html +++ b/rma/static/description/index.html @@ -3,7 +3,7 @@ - + Return Merchandise Authorization Management