mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[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
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||
"maintainers": ["ernestotejeda"],
|
||||
"license": "AGPL-3",
|
||||
"depends": ["stock_account"],
|
||||
"depends": ["sale_stock"],
|
||||
"data": [
|
||||
"views/report_rma.xml",
|
||||
"report/report.xml",
|
||||
@@ -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",
|
||||
|
||||
202
rma/i18n/es.po
202
rma/i18n/es.po
@@ -6,28 +6,26 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-21 09:35+0000\n"
|
||||
"PO-Revision-Date: 2022-01-21 10:49+0100\n"
|
||||
"POT-Creation-Date: 2022-01-28 15:54+0000\n"
|
||||
"PO-Revision-Date: 2022-01-28 15:54+0000\n"
|
||||
"Last-Translator: \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"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
"X-Generator: Poedit 2.3\n"
|
||||
|
||||
#. module: rma
|
||||
#: model:mail.template,report_name:rma.mail_template_rma_draft_notification
|
||||
#: 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
|
||||
@@ -71,8 +69,7 @@ msgid ""
|
||||
" (${object.partner_id.parent_id.name})\n"
|
||||
" % endif\n"
|
||||
" <br/><br/>\n"
|
||||
" Here is the RMA <strong>${object.name}</strong> from ${object.company_id."
|
||||
"name}.\n"
|
||||
" Here is the RMA <strong>${object.name}</strong> from ${object.company_id.name}.\n"
|
||||
" <br/><br/>\n"
|
||||
" Do not hesitate to contact us if you have any question.\n"
|
||||
"</p>\n"
|
||||
@@ -86,8 +83,7 @@ msgstr ""
|
||||
" (${object.partner_id.parent_id.name})\n"
|
||||
" % endif\n"
|
||||
" <br/><br/>\n"
|
||||
" Aquí tiene el RMA <strong>${object.name}</strong> Desde ${object."
|
||||
"company_id.name}.\n"
|
||||
" Aquí tiene el RMA <strong>${object.name}</strong> Desde ${object.company_id.name}.\n"
|
||||
" <br/><br/>\n"
|
||||
" No dude en ponerse en contacto con nosotros si tiene alguna pregunta.\n"
|
||||
"</p>\n"
|
||||
@@ -164,12 +160,10 @@ msgstr ""
|
||||
|
||||
#. module: rma
|
||||
#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page
|
||||
msgid ""
|
||||
"<i class=\"fa fa-download\" role=\"img\" aria-label=\"Download\" title="
|
||||
"\"Download\"/>"
|
||||
msgid "<i class=\"fa fa-download\" role=\"img\" aria-label=\"Download\" title=\"Download\"/>"
|
||||
msgstr ""
|
||||
"<i class=\"fa fa-download\" role=\"img\" aria-label=\"Download\" title="
|
||||
"\"Descargar\"/>"
|
||||
"<i class=\"fa fa-download\" role=\"img\" aria-label=\"Download\" "
|
||||
"title=\"Descargar\"/>"
|
||||
|
||||
#. module: rma
|
||||
#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page
|
||||
@@ -197,11 +191,11 @@ msgstr ""
|
||||
#. module: rma
|
||||
#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page
|
||||
msgid ""
|
||||
"<i class=\"fa fa-truck mr-1\" role=\"img\" aria-label=\"Download\" title="
|
||||
"\"Download\"/>"
|
||||
"<i class=\"fa fa-truck mr-1\" role=\"img\" aria-label=\"Download\" "
|
||||
"title=\"Download\"/>"
|
||||
msgstr ""
|
||||
"<i class=\"fa fa-truck mr-1\" role=\"img\" aria-label=\"Download\" title="
|
||||
"\"Descargar\"/>"
|
||||
"<i class=\"fa fa-truck mr-1\" role=\"img\" aria-label=\"Download\" "
|
||||
"title=\"Descargar\"/>"
|
||||
|
||||
#. module: rma
|
||||
#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page
|
||||
@@ -393,9 +387,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"
|
||||
@@ -441,7 +437,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"
|
||||
|
||||
@@ -459,7 +457,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
|
||||
@@ -487,6 +490,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
|
||||
@@ -526,6 +530,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"
|
||||
@@ -562,6 +567,11 @@ msgstr "Contacto"
|
||||
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"
|
||||
@@ -570,6 +580,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
|
||||
@@ -580,6 +592,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
|
||||
@@ -663,6 +677,8 @@ msgstr "Descripción"
|
||||
#. module: rma
|
||||
#: 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
|
||||
@@ -725,7 +741,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
|
||||
@@ -746,6 +763,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
|
||||
@@ -772,12 +819,14 @@ msgstr "Agrupar por"
|
||||
#. module: rma
|
||||
#: 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
|
||||
#: model:ir.model.fields,field_description:rma.field_rma_team__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma
|
||||
#: model:ir.model.fields,help:rma.field_rma_team__alias_parent_thread_id
|
||||
@@ -863,6 +912,8 @@ msgstr "Apunte contable"
|
||||
#. module: rma
|
||||
#: 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
|
||||
@@ -873,6 +924,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
|
||||
@@ -883,6 +936,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
|
||||
@@ -916,6 +971,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 ""
|
||||
@@ -956,6 +1019,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"
|
||||
@@ -991,7 +1055,7 @@ msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución."
|
||||
#. module: rma
|
||||
#: model:ir.model.fields.selection,name:rma.selection__rma__priority__1
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma
|
||||
#: model:ir.model.fields.selection,name:rma.selection__rma__priority__0
|
||||
@@ -1095,15 +1159,12 @@ 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
|
||||
@@ -1185,7 +1246,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
|
||||
@@ -1225,6 +1286,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"
|
||||
@@ -1360,7 +1444,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
|
||||
@@ -1372,6 +1456,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"
|
||||
@@ -1458,13 +1552,13 @@ msgstr "Reemplazado"
|
||||
#: code:addons/rma/models/rma.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Replacement: Move <a href=\"#\" data-oe-model=\"stock.move\" data-oe-id=\"%d"
|
||||
"\">%s</a> (Picking <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id="
|
||||
"\"%d\">%s</a>) has been created."
|
||||
"Replacement: Move <a href=\"#\" data-oe-model=\"stock.move\" data-oe-"
|
||||
"id=\"%d\">%s</a> (Picking <a href=\"#\" data-oe-model=\"stock.picking\" "
|
||||
"data-oe-id=\"%d\">%s</a>) has been created."
|
||||
msgstr ""
|
||||
"Reemplazo: El movimiento <a href=\"#\" data-oe-model=\"stock.move\" data-oe-"
|
||||
"id=\"%d\">%s</a> (Orden de entrega <a href=\"#\" data-oe-model=\"stock."
|
||||
"picking\" data-oe-id=\"%d\">%s</a>) ha sido creado."
|
||||
"id=\"%d\">%s</a> (Orden de entrega <a href=\"#\" data-oe-"
|
||||
"model=\"stock.picking\" data-oe-id=\"%d\">%s</a>) ha sido creado."
|
||||
|
||||
#. module: rma
|
||||
#: code:addons/rma/models/rma.py:0
|
||||
@@ -1475,10 +1569,10 @@ msgid ""
|
||||
"create a new move, but one of the previously created moves was updated with "
|
||||
"this data."
|
||||
msgstr ""
|
||||
"Reemplazo:<br/>Producto <a href=\"#\" data-oe-model=\"product.product\" data-"
|
||||
"oe-id=\"%d\">%s</a><br/>Cantidad %f %s<br/>El reemplazo realizado no creó un "
|
||||
"movimiento nuevo, pero uno de los movimientos creados anteriormente fué "
|
||||
"actualizado con estos datos."
|
||||
"Reemplazo:<br/>Producto <a href=\"#\" data-oe-model=\"product.product\" "
|
||||
"data-oe-id=\"%d\">%s</a><br/>Cantidad %f %s<br/>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
|
||||
@@ -1523,11 +1617,11 @@ msgstr "Devolver al cliente"
|
||||
#: code:addons/rma/models/rma.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</"
|
||||
"a> has been created."
|
||||
"Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-"
|
||||
"id=\"%d\">%s</a> has been created."
|
||||
msgstr ""
|
||||
"Devolución: La orden de entrega <a href=\"#\" data-oe-model=\"stock.picking"
|
||||
"\" data-oe-id=\"%d\">%s</a> ha sido creada."
|
||||
"Devolución: La orden de entrega <a href=\"#\" data-oe-"
|
||||
"model=\"stock.picking\" data-oe-id=\"%d\">%s</a> ha sido creada."
|
||||
|
||||
#. module: rma
|
||||
#: model:ir.model.fields.selection,name:rma.selection__rma__state__returned
|
||||
@@ -1537,7 +1631,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
|
||||
@@ -1668,8 +1762,8 @@ msgid ""
|
||||
"Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been"
|
||||
" created."
|
||||
msgstr ""
|
||||
"División: El RMA <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</"
|
||||
"a> ha sido creado."
|
||||
"División: El RMA <a href=\"#\" data-oe-model=\"rma\" data-oe-"
|
||||
"id=\"%d\">%s</a> ha sido creado."
|
||||
|
||||
#. module: rma
|
||||
#: model:ir.model.fields,field_description:rma.field_rma__state
|
||||
@@ -1752,8 +1846,8 @@ msgstr ""
|
||||
#: 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)"
|
||||
" 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, "
|
||||
@@ -1765,8 +1859,9 @@ msgid ""
|
||||
"The name of the email alias, e.g. 'jobs' if you want to catch emails for "
|
||||
"<jobs@example.odoo.com>"
|
||||
msgstr ""
|
||||
"El nombre de este seudónimo de correo electrónico. Por ejemplo, \"trabajos"
|
||||
"\", si lo que quiere es obtener los correos para <trabajos@example.odoo.com>"
|
||||
"El nombre de este seudónimo de correo electrónico. Por ejemplo, "
|
||||
"\"trabajos\", si lo que quiere es obtener los correos para "
|
||||
"<trabajos@example.odoo.com>"
|
||||
|
||||
#. module: rma
|
||||
#: model:ir.model.fields,help:rma.field_rma_team__alias_user_id
|
||||
@@ -1977,7 +2072,8 @@ msgstr ""
|
||||
#: 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."
|
||||
"When the RMA receipt is confirmed, send a confirmation email to the "
|
||||
"customer."
|
||||
msgstr ""
|
||||
|
||||
#. module: rma
|
||||
|
||||
102
rma/i18n/rma.pot
102
rma/i18n/rma.pot
@@ -6,6 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-28 15:54+0000\n"
|
||||
"PO-Revision-Date: 2022-01-28 15:54+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -321,9 +323,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 ""
|
||||
@@ -369,7 +373,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 ""
|
||||
|
||||
@@ -389,6 +395,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"
|
||||
@@ -415,6 +426,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
|
||||
@@ -454,6 +466,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 ""
|
||||
@@ -490,6 +503,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"
|
||||
@@ -498,6 +516,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
|
||||
@@ -508,6 +528,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
|
||||
@@ -591,6 +613,8 @@ msgstr ""
|
||||
#. module: rma
|
||||
#: 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
|
||||
@@ -672,6 +696,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
|
||||
@@ -698,6 +752,8 @@ msgstr ""
|
||||
#. module: rma
|
||||
#: 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
|
||||
@@ -785,6 +841,8 @@ msgstr ""
|
||||
#. module: rma
|
||||
#: 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
|
||||
@@ -795,6 +853,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
|
||||
@@ -805,6 +865,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
|
||||
@@ -838,6 +900,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 ""
|
||||
@@ -1132,6 +1201,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"
|
||||
@@ -1278,6 +1370,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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -60,6 +60,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,
|
||||
@@ -161,6 +169,7 @@ class Rma(models.Model):
|
||||
("refunded", "Refunded"),
|
||||
("returned", "Returned"),
|
||||
("replaced", "Replaced"),
|
||||
("finished", "Finished"),
|
||||
("locked", "Locked"),
|
||||
("cancelled", "Canceled"),
|
||||
],
|
||||
@@ -221,6 +230,7 @@ class Rma(models.Model):
|
||||
can_be_returned = fields.Boolean(compute="_compute_can_be_returned",)
|
||||
can_be_replaced = fields.Boolean(compute="_compute_can_be_replaced",)
|
||||
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",
|
||||
@@ -354,6 +364,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
|
||||
@@ -686,6 +704,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()
|
||||
|
||||
21
rma/models/rma_finalization.py
Normal file
21
rma/models/rma_finalization.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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 !",
|
||||
),
|
||||
]
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -8,3 +8,6 @@ access_rma_operation_user_own,rma.operation.user.own,model_rma_operation,rma_gro
|
||||
access_rma_operation_manager,rma.operation.manager,model_rma_operation,rma_group_manager,1,1,1,1
|
||||
access_rma_tag_user_own,rma.tag.user.own,model_rma_tag,rma_group_user_own,1,0,0,0
|
||||
access_rma_tag_manager,rma.tag.manager,model_rma_tag,rma_group_manager,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
|
||||
|
||||
|
@@ -38,6 +38,10 @@
|
||||
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
||||
/>
|
||||
</record>
|
||||
<record id="group_rma_manual_finalization" model="res.groups">
|
||||
<field name="name">Allow RMA manual finalization</field>
|
||||
<field name="category_id" ref="base.module_category_hidden" />
|
||||
</record>
|
||||
<!-- Record Rules -->
|
||||
<record id="rma_rule_user_own" model="ir.rule">
|
||||
<field name="name">Personal RMAs</field>
|
||||
@@ -79,6 +83,14 @@
|
||||
name="domain_force"
|
||||
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
||||
</record>
|
||||
<record id="rma_finalization_comp_rule" model="ir.rule">
|
||||
<field name="name">RMA Finalization Reason multi-company</field>
|
||||
<field name="model_id" ref="model_rma_finalization" />
|
||||
<field name="global" eval="True" />
|
||||
<field
|
||||
name="domain_force"
|
||||
> ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)]</field>
|
||||
</record>
|
||||
<!-- New users will belong to rma_group_user_own -->
|
||||
<record id="base.default_user" model="res.users">
|
||||
<field name="groups_id" eval="[(4, ref('rma_group_user_own'))]" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Return Merchandise Authorization Management</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -401,6 +401,11 @@ Besides, you have full integration of the RMA documents in the customer portal.<
|
||||
one.</li>
|
||||
<li>Go to ‘Email’ tab and set an ‘Email Alias’.</li>
|
||||
</ol>
|
||||
<p>If you want to manually finish RMAs, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Settings > Inventory</em>.</li>
|
||||
<li>Set <em>Finish RMAs manually</em> checkbox on.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
||||
@@ -430,6 +435,11 @@ the RMA quantity is equal or lower than the quantity in done delivery
|
||||
orders linked to it.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>You can also finish the RMA without further ado. To do so click on the <em>Finish</em>
|
||||
button. A wizard will ask you for the reason from a selection of preconfigured ones.
|
||||
Be sure to configure them in advance on <em>RMA > Configuration > Finalization Reasons</em>.
|
||||
Once the RMA is finished, it will be set to that state and the reason will be
|
||||
registered.</li>
|
||||
</ol>
|
||||
<p>An RMA can also be created from a return of a delivery order:</p>
|
||||
<ol class="arabic simple">
|
||||
|
||||
@@ -50,6 +50,13 @@ class TestRma(SavepointCase):
|
||||
"type": "delivery",
|
||||
}
|
||||
)
|
||||
cls.finalization_reason_1 = cls.env["rma.finalization"].create(
|
||||
{"name": "[Test] It can't be repaired and customer doesn't want it"}
|
||||
)
|
||||
cls.finalization_reason_2 = cls.env["rma.finalization"].create(
|
||||
{"name": "[Test] It's out of warranty. To be scrapped"}
|
||||
)
|
||||
cls.env.ref("rma.group_rma_manual_finalization").users |= cls.env.user
|
||||
|
||||
def _create_rma(self, partner=None, product=None, qty=None, location=None):
|
||||
rma_form = Form(self.env["rma"])
|
||||
@@ -501,6 +508,21 @@ class TestRmaCase(TestRma):
|
||||
self.assertFalse(rma.can_be_replaced)
|
||||
self._test_readonly_fields(rma)
|
||||
|
||||
def test_finish_rma(self):
|
||||
# Create, confirm and receive an RMA
|
||||
rma = self._create_confirm_receive(self.partner, self.product, 10, self.rma_loc)
|
||||
rma.action_finish()
|
||||
finalization_form = Form(
|
||||
self.env["rma.finalization.wizard"].with_context(
|
||||
active_ids=rma.ids, rma_finalization_type="replace",
|
||||
)
|
||||
)
|
||||
finalization_form.finalization_id = self.finalization_reason_2
|
||||
finalization_wizard = finalization_form.save()
|
||||
finalization_wizard.action_finish()
|
||||
self.assertEqual(rma.state, "finished")
|
||||
self.assertEqual(rma.finalization_id, self.finalization_reason_2)
|
||||
|
||||
def test_mass_return_to_customer(self):
|
||||
# Create, confirm and receive rma_1
|
||||
rma_1 = self._create_confirm_receive(
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
expr="//div[@data-key='stock']/div[hasclass('o_settings_container')]"
|
||||
position="inside"
|
||||
>
|
||||
<div class="col-12 col-lg-6 o_setting_box" title="Finish RMAs manually">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_rma_manual_finalization" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="group_rma_manual_finalization"
|
||||
string="RMA Manual Finalization"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
When the RMA is receive, allow to finsish it manually choosing
|
||||
a finalization reason.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
title="Send automatic RMA info to customer"
|
||||
|
||||
71
rma/views/rma_finalization_views.xml
Normal file
71
rma/views/rma_finalization_views.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="rma_finalization_view_search" model="ir.ui.view">
|
||||
<field name="model">rma.finalization</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="RMA Finalization Reasons">
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active','=',False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Active"
|
||||
name="active"
|
||||
domain="[('active','!=',False)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_finalization_form" model="ir.ui.view">
|
||||
<field name="name">Rma Finalization Reasons</field>
|
||||
<field name="model">rma.finalization</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Finalization">
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<field name="active" invisible="1" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_finalization_list" model="ir.ui.view">
|
||||
<field name="name">RMA Finalization Reasons</field>
|
||||
<field name="model">rma.finalization</field>
|
||||
<field eval="6" name="priority" />
|
||||
<field name="arch" type="xml">
|
||||
<tree string="RMA Finalization Reasons">
|
||||
<field name="name" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_rma_finalization" model="ir.actions.act_window">
|
||||
<field name="name">RMA Finalization Reasons</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">rma.finalization</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new RMA finalization
|
||||
</p><p>
|
||||
Manage RMA finalization reasons to better classify them for tracking and analysis purposes.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="rma_configuration_rma_finalization_menu"
|
||||
name="RMA Finalization Reasons"
|
||||
parent="rma_configuration_menu"
|
||||
action="action_rma_finalization"
|
||||
groups="rma.group_rma_manual_finalization"
|
||||
/>
|
||||
</odoo>
|
||||
@@ -98,6 +98,7 @@
|
||||
<field name="product_uom" groups="uom.group_uom" />
|
||||
<field name="date" />
|
||||
<field name="deadline" />
|
||||
<field name="finalization_id" optional="hide" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
@@ -276,6 +277,10 @@
|
||||
/>
|
||||
<field name="origin" />
|
||||
<field name="operation_id" />
|
||||
<field
|
||||
name="finalization_id"
|
||||
attrs="{'invisible': [('state', '!=', 'finished')]}"
|
||||
/>
|
||||
<field
|
||||
name="company_id"
|
||||
options="{'no_create': True}"
|
||||
@@ -316,6 +321,7 @@
|
||||
<field name="can_be_replaced" invisible="1" />
|
||||
<field name="can_be_split" invisible="1" />
|
||||
<field name="can_be_locked" invisible="1" />
|
||||
<field name="can_be_finished" invisible="1" />
|
||||
<field name="commercial_partner_id" invisible="1" />
|
||||
<field name="remaining_qty" invisible="1" />
|
||||
</sheet>
|
||||
@@ -327,6 +333,28 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_finalization_form" model="ir.ui.view">
|
||||
<field name="model">rma</field>
|
||||
<field name="inherit_id" ref="rma.rma_view_form" />
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[(4, ref('rma.group_rma_manual_finalization'))]"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//form//header//button[@name='action_cancel']"
|
||||
position="before"
|
||||
>
|
||||
<button
|
||||
type="object"
|
||||
string="Finish"
|
||||
name="action_finish"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('can_be_finished', '=', False)]}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_view_pivot" model="ir.ui.view">
|
||||
<field name="name">rma.pivot</field>
|
||||
<field name="model">rma</field>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import rma_delivery
|
||||
from . import rma_finalization_wizard
|
||||
from . import rma_split
|
||||
from . import stock_picking_return
|
||||
|
||||
18
rma/wizard/rma_finalization_wizard.py
Normal file
18
rma/wizard/rma_finalization_wizard.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Copyright 2022 Tecnativa - David Vidal
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class RmaFinalizationWizard(models.TransientModel):
|
||||
_name = "rma.finalization.wizard"
|
||||
_description = "RMA Finalization Wizard"
|
||||
|
||||
finalization_id = fields.Many2one(
|
||||
comodel_name="rma.finalization", string="Reason", required=True
|
||||
)
|
||||
|
||||
def action_finish(self):
|
||||
self.ensure_one()
|
||||
rma_ids = self.env.context.get("active_ids")
|
||||
rma = self.env["rma"].browse(rma_ids)
|
||||
rma.write({"finalization_id": self.finalization_id, "state": "finished"})
|
||||
35
rma/wizard/rma_finalization_wizard_views.xml
Normal file
35
rma/wizard/rma_finalization_wizard_views.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 Tecnativa - David Vidal
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="rma_finalization_wizard_view_form" model="ir.ui.view">
|
||||
<field name="model">rma.finalization.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
<group>
|
||||
<field name="finalization_id" />
|
||||
</group>
|
||||
</group>
|
||||
<footer>
|
||||
<button
|
||||
name="action_finish"
|
||||
string="Finish RMA"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<act_window
|
||||
id="rma_finalization_wizard_action"
|
||||
name="Finish RMA Manualy"
|
||||
binding_model="rma"
|
||||
binding_views="list"
|
||||
res_model="rma.finalization.wizard"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user