[IMP] rma: set rma to received on invoice delete + incoming picking type use existing lot by default.

[IMP] rma: set rma to received on invoice delete.

Remove 'waiting_refund' rma state.
RMAs go from received to refunded.
When the linked refund is deleted the rma is set to received.

[UPD] Update rma.pot

rma 12.0.1.4.2

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma/

[IMP] rma: incoming picking type use existing lot by default.

rma 12.0.1.4.3
This commit is contained in:
Ernesto Tejeda
2020-09-15 16:04:43 -04:00
committed by Víctor Martínez
parent 54fc124f25
commit e0b110bf67
8 changed files with 94 additions and 83 deletions

View File

@@ -3,7 +3,7 @@
{ {
"name": "Return Merchandise Authorization Management", "name": "Return Merchandise Authorization Management",
"summary": "Return Merchandise Authorization (RMA)", "summary": "Return Merchandise Authorization (RMA)",
"version": "12.0.1.4.1", "version": "12.0.1.4.3",
"development_status": "Beta", "development_status": "Beta",
"category": "RMA", "category": "RMA",
"website": "https://github.com/OCA/rma", "website": "https://github.com/OCA/rma",

View File

@@ -536,7 +536,7 @@ msgid "Draft RMA"
msgstr "RMA en estado Borrador" msgstr "RMA en estado Borrador"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1098 #: code:addons/rma/models/rma.py:1097
#, python-format #, python-format
msgid "" msgid ""
"E-mail subject: %s\n" "E-mail subject: %s\n"
@@ -639,7 +639,7 @@ msgstr ""
"sin eliminarlo." "sin eliminarlo."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1102 #: code:addons/rma/models/rma.py:1101
#, python-format #, python-format
msgid "Incoming e-mail" msgid "Incoming e-mail"
msgstr "Correo electrónico entrante" msgstr "Correo electrónico entrante"
@@ -745,8 +745,8 @@ msgid "Name"
msgstr "Nombre" msgstr "Nombre"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:495 #: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:494
#: code:addons/rma/models/rma.py:1101 #: code:addons/rma/models/rma.py:1100
#, python-format #, python-format
msgid "New" msgid "New"
msgstr "Nuevo" msgstr "Nuevo"
@@ -767,13 +767,13 @@ msgid "Next Activity Type"
msgstr "Siguiente tipo de actividad" msgstr "Siguiente tipo de actividad"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:773 #: code:addons/rma/models/rma.py:772
#, python-format #, python-format
msgid "None of the selected RMAs can perform a replacement." msgid "None of the selected RMAs can perform a replacement."
msgstr "Ninguno de los RMAs seleccionados puede realizar un reemplazo." msgstr "Ninguno de los RMAs seleccionados puede realizar un reemplazo."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:756 #: code:addons/rma/models/rma.py:755
#, python-format #, python-format
msgid "None of the selected RMAs can perform a return." msgid "None of the selected RMAs can perform a return."
msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución." msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución."
@@ -954,7 +954,7 @@ msgid "Quantity to extract"
msgstr "Cantidad a extraer" msgstr "Cantidad a extraer"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:806 #: code:addons/rma/models/rma.py:805
#, python-format #, python-format
msgid "" msgid ""
"Quantity to extract cannot be greater than remaining delivery quantity (%s " "Quantity to extract cannot be greater than remaining delivery quantity (%s "
@@ -1132,7 +1132,7 @@ msgid "Reference of the document that generated this RMA."
msgstr "Referencia al documento que generó este RMA." msgstr "Referencia al documento que generó este RMA."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:694 #: code:addons/rma/models/rma.py:693
#: model:ir.model.fields,field_description:rma.field_rma__refund_id #: model:ir.model.fields,field_description:rma.field_rma__refund_id
#: model_terms:ir.ui.view,arch_db:rma.rma_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_view_form
#: model:rma.operation,name:rma.rma_operation_refund #: model:rma.operation,name:rma.rma_operation_refund
@@ -1188,7 +1188,7 @@ msgid "Replaced"
msgstr "Reemplazado" msgstr "Reemplazado"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1011 #: code:addons/rma/models/rma.py:1010
#, python-format #, python-format
msgid "" msgid ""
"Replacement: Move <a href=\"#\" data-oe-model=\"stock.move\" data-oe-id=\"%d" "Replacement: Move <a href=\"#\" data-oe-model=\"stock.move\" data-oe-id=\"%d"
@@ -1200,7 +1200,7 @@ msgstr ""
"picking\" data-oe-id=\"%d\">%s</a>) ha sido creado." "picking\" data-oe-id=\"%d\">%s</a>) ha sido creado."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1022 #: code:addons/rma/models/rma.py:1021
#, python-format #, python-format
msgid "" msgid ""
"Replacement:<br/>Product <a href=\"#\" data-oe-model=\"product.product\" " "Replacement:<br/>Product <a href=\"#\" data-oe-model=\"product.product\" "
@@ -1224,7 +1224,7 @@ msgid "Requested operation"
msgstr "Operación solicitada" msgstr "Operación solicitada"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:737 #: code:addons/rma/models/rma.py:736
#, python-format #, python-format
msgid "Required field(s):%s" msgid "Required field(s):%s"
msgstr "Campo(s) requerido(s):%s" msgstr "Campo(s) requerido(s):%s"
@@ -1253,7 +1253,7 @@ msgid "Return to customer"
msgstr "Devolver al cliente" msgstr "Devolver al cliente"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:972 #: code:addons/rma/models/rma.py:971
#, python-format #, python-format
msgid "" msgid ""
"Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</" "Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</"
@@ -1341,7 +1341,7 @@ msgid "Split RMA"
msgstr "Dividir RMA" msgstr "Dividir RMA"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:890 #: code:addons/rma/models/rma.py:889
#, python-format #, python-format
msgid "" msgid ""
"Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been " "Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been "
@@ -1447,7 +1447,7 @@ msgstr ""
"inicial porque el movimiento está enlazado a un RMA (%s)." "inicial porque el movimiento está enlazado a un RMA (%s)."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:794 #: code:addons/rma/models/rma.py:793
#, python-format #, python-format
msgid "The quantity to return is greater than remaining quantity." msgid "The quantity to return is greater than remaining quantity."
msgstr "La cantidad a devolver es mayor que la cantidad restante del RMA." msgstr "La cantidad a devolver es mayor que la cantidad restante del RMA."
@@ -1463,19 +1463,19 @@ msgstr ""
"cantidad especificada en el RMA asociado." "cantidad especificada en el RMA asociado."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:783 #: code:addons/rma/models/rma.py:782
#, python-format #, python-format
msgid "This RMA cannot be split." msgid "This RMA cannot be split."
msgstr "Este RMA no puede ser dividido." msgstr "Este RMA no puede ser dividido."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:770 #: code:addons/rma/models/rma.py:769
#, python-format #, python-format
msgid "This RMA cannot perform a replacement." msgid "This RMA cannot perform a replacement."
msgstr "Este RMA no puede realizar un reemplazo." msgstr "Este RMA no puede realizar un reemplazo."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:753 #: code:addons/rma/models/rma.py:752
#, python-format #, python-format
msgid "This RMA cannot perform a return." msgid "This RMA cannot perform a return."
msgstr "Este RMA no puede realizar una devolución." msgstr "Este RMA no puede realizar una devolución."
@@ -1564,11 +1564,6 @@ msgstr "Usuarios"
msgid "Very Urgent" msgid "Very Urgent"
msgstr "Muy Urgente" msgstr "Muy Urgente"
#. module: rma
#: selection:rma,state:0
msgid "Waiting for refund"
msgstr "Esperando por reembolso"
#. module: rma #. module: rma
#: selection:rma,state:0 #: selection:rma,state:0
msgid "Waiting for replacement" msgid "Waiting for replacement"
@@ -1599,7 +1594,7 @@ msgid "Website communication history"
msgstr "Historial de comunicaciones del sitio web" msgstr "Historial de comunicaciones del sitio web"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:517 #: code:addons/rma/models/rma.py:516
#, python-format #, python-format
msgid "You cannot delete RMAs that are not in draft state" msgid "You cannot delete RMAs that are not in draft state"
msgstr "No puede eliminar RMAs que no estén en estado borrador" msgstr "No puede eliminar RMAs que no estén en estado borrador"
@@ -1635,5 +1630,8 @@ msgstr ""
"El usuario tendrá acceso a la configuración de RMA y a los informes " "El usuario tendrá acceso a la configuración de RMA y a los informes "
"estadísticos." "estadísticos."
#~ msgid "Waiting for refund"
#~ msgstr "Esperando por reembolso"
#~ msgid "New RMA in draft state" #~ msgid "New RMA in draft state"
#~ msgstr "Nuevo RMA en estado Borrador" #~ msgstr "Nuevo RMA en estado Borrador"

View File

@@ -535,7 +535,7 @@ msgid "Draft RMA"
msgstr "Rascunho do RMA" msgstr "Rascunho do RMA"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1098 #: code:addons/rma/models/rma.py:1097
#, python-format #, python-format
msgid "" msgid ""
"E-mail subject: %s\n" "E-mail subject: %s\n"
@@ -638,7 +638,7 @@ msgstr ""
"sem removê-lo." "sem removê-lo."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1102 #: code:addons/rma/models/rma.py:1101
#, python-format #, python-format
msgid "Incoming e-mail" msgid "Incoming e-mail"
msgstr "E-mail recebido" msgstr "E-mail recebido"
@@ -744,8 +744,8 @@ msgid "Name"
msgstr "Nome" msgstr "Nome"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:495 #: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:494
#: code:addons/rma/models/rma.py:1101 #: code:addons/rma/models/rma.py:1100
#, python-format #, python-format
msgid "New" msgid "New"
msgstr "Novo(a)" msgstr "Novo(a)"
@@ -766,13 +766,13 @@ msgid "Next Activity Type"
msgstr "Tipo da Próxima Atividade" msgstr "Tipo da Próxima Atividade"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:773 #: code:addons/rma/models/rma.py:772
#, python-format #, python-format
msgid "None of the selected RMAs can perform a replacement." msgid "None of the selected RMAs can perform a replacement."
msgstr "Nenhum dos RMAs selecionados pode executar uma substituição." msgstr "Nenhum dos RMAs selecionados pode executar uma substituição."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:756 #: code:addons/rma/models/rma.py:755
#, python-format #, python-format
msgid "None of the selected RMAs can perform a return." msgid "None of the selected RMAs can perform a return."
msgstr "Nenhum dos RMAs selecionados pode executar uma devolução." msgstr "Nenhum dos RMAs selecionados pode executar uma devolução."
@@ -953,7 +953,7 @@ msgid "Quantity to extract"
msgstr "Quantidade a extrair" msgstr "Quantidade a extrair"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:806 #: code:addons/rma/models/rma.py:805
#, python-format #, python-format
msgid "" msgid ""
"Quantity to extract cannot be greater than remaining delivery quantity (%s " "Quantity to extract cannot be greater than remaining delivery quantity (%s "
@@ -1130,7 +1130,7 @@ msgid "Reference of the document that generated this RMA."
msgstr "Referência do documento que gerou este RMA." msgstr "Referência do documento que gerou este RMA."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:694 #: code:addons/rma/models/rma.py:693
#: model:ir.model.fields,field_description:rma.field_rma__refund_id #: model:ir.model.fields,field_description:rma.field_rma__refund_id
#: model_terms:ir.ui.view,arch_db:rma.rma_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_view_form
#: model:rma.operation,name:rma.rma_operation_refund #: model:rma.operation,name:rma.rma_operation_refund
@@ -1186,7 +1186,7 @@ msgid "Replaced"
msgstr "Substituído" msgstr "Substituído"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1011 #: code:addons/rma/models/rma.py:1010
#, python-format #, python-format
msgid "" msgid ""
"Replacement: Move <a href=\"#\" data-oe-model=\"stock.move\" data-oe-id=\"%d" "Replacement: Move <a href=\"#\" data-oe-model=\"stock.move\" data-oe-id=\"%d"
@@ -1198,7 +1198,7 @@ msgstr ""
"data-oe-id=\"%d\">%s</a> foi criada." "data-oe-id=\"%d\">%s</a> foi criada."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1022 #: code:addons/rma/models/rma.py:1021
#, python-format #, python-format
msgid "" msgid ""
"Replacement:<br/>Product <a href=\"#\" data-oe-model=\"product.product\" " "Replacement:<br/>Product <a href=\"#\" data-oe-model=\"product.product\" "
@@ -1222,7 +1222,7 @@ msgid "Requested operation"
msgstr "Operação Solicitada" msgstr "Operação Solicitada"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:737 #: code:addons/rma/models/rma.py:736
#, python-format #, python-format
msgid "Required field(s):%s" msgid "Required field(s):%s"
msgstr "Campo(s) Solicitado(s):%s" msgstr "Campo(s) Solicitado(s):%s"
@@ -1251,7 +1251,7 @@ msgid "Return to customer"
msgstr "Retornar ao cliente" msgstr "Retornar ao cliente"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:972 #: code:addons/rma/models/rma.py:971
#, python-format #, python-format
msgid "" msgid ""
"Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</" "Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</"
@@ -1339,7 +1339,7 @@ msgid "Split RMA"
msgstr "Dividir RMA" msgstr "Dividir RMA"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:890 #: code:addons/rma/models/rma.py:889
#, python-format #, python-format
msgid "" msgid ""
"Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been " "Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been "
@@ -1444,7 +1444,7 @@ msgstr ""
"inicial, porque a movimentação do estoque está vinculada a uma RMA (%s)." "inicial, porque a movimentação do estoque está vinculada a uma RMA (%s)."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:794 #: code:addons/rma/models/rma.py:793
#, python-format #, python-format
msgid "The quantity to return is greater than remaining quantity." msgid "The quantity to return is greater than remaining quantity."
msgstr "A quantidade a retornar é maior que a quantidade restante." msgstr "A quantidade a retornar é maior que a quantidade restante."
@@ -1460,19 +1460,19 @@ msgstr ""
"especificada na sua RMA vinculada." "especificada na sua RMA vinculada."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:783 #: code:addons/rma/models/rma.py:782
#, python-format #, python-format
msgid "This RMA cannot be split." msgid "This RMA cannot be split."
msgstr "Esta RMA não pode ser dividida." msgstr "Esta RMA não pode ser dividida."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:770 #: code:addons/rma/models/rma.py:769
#, python-format #, python-format
msgid "This RMA cannot perform a replacement." msgid "This RMA cannot perform a replacement."
msgstr "Esta RMA não pode executar uma substituição." msgstr "Esta RMA não pode executar uma substituição."
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:753 #: code:addons/rma/models/rma.py:752
#, python-format #, python-format
msgid "This RMA cannot perform a return." msgid "This RMA cannot perform a return."
msgstr "Este RMA não pode executar uma devolução." msgstr "Este RMA não pode executar uma devolução."
@@ -1561,11 +1561,6 @@ msgstr "Usuários"
msgid "Very Urgent" msgid "Very Urgent"
msgstr "Muito Urgente" msgstr "Muito Urgente"
#. module: rma
#: selection:rma,state:0
msgid "Waiting for refund"
msgstr "Aguardando Restituição"
#. module: rma #. module: rma
#: selection:rma,state:0 #: selection:rma,state:0
msgid "Waiting for replacement" msgid "Waiting for replacement"
@@ -1596,7 +1591,7 @@ msgid "Website communication history"
msgstr "Histórico de Comunicação Através do Site" msgstr "Histórico de Comunicação Através do Site"
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:517 #: code:addons/rma/models/rma.py:516
#, python-format #, python-format
msgid "You cannot delete RMAs that are not in draft state" msgid "You cannot delete RMAs that are not in draft state"
msgstr "Você não pode apagar RMAs que não estejam na situação \"Rascunho\"" msgstr "Você não pode apagar RMAs que não estejam na situação \"Rascunho\""
@@ -1631,5 +1626,8 @@ msgstr ""
"o usuário terá acesso à configuração RMA, bem como aos relatórios " "o usuário terá acesso à configuração RMA, bem como aos relatórios "
"estatísticos." "estatísticos."
#~ msgid "Waiting for refund"
#~ msgstr "Aguardando Restituição"
#~ msgid "New RMA in draft state" #~ msgid "New RMA in draft state"
#~ msgstr "Novo Rascunho de RMA" #~ msgstr "Novo Rascunho de RMA"

View File

@@ -486,7 +486,7 @@ msgid "Draft RMA"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1098 #: code:addons/rma/models/rma.py:1097
#, python-format #, python-format
msgid "E-mail subject: %s\n" msgid "E-mail subject: %s\n"
"\n" "\n"
@@ -576,7 +576,7 @@ msgid "If the active field is set to false, it will allow you to hide the RMA Te
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1102 #: code:addons/rma/models/rma.py:1101
#, python-format #, python-format
msgid "Incoming e-mail" msgid "Incoming e-mail"
msgstr "" msgstr ""
@@ -683,8 +683,8 @@ msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:31 #: code:addons/rma/models/rma.py:31
#: code:addons/rma/models/rma.py:495 #: code:addons/rma/models/rma.py:494
#: code:addons/rma/models/rma.py:1101 #: code:addons/rma/models/rma.py:1100
#, python-format #, python-format
msgid "New" msgid "New"
msgstr "" msgstr ""
@@ -705,13 +705,13 @@ msgid "Next Activity Type"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:773 #: code:addons/rma/models/rma.py:772
#, python-format #, python-format
msgid "None of the selected RMAs can perform a replacement." msgid "None of the selected RMAs can perform a replacement."
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:756 #: code:addons/rma/models/rma.py:755
#, python-format #, python-format
msgid "None of the selected RMAs can perform a return." msgid "None of the selected RMAs can perform a return."
msgstr "" msgstr ""
@@ -875,7 +875,7 @@ msgid "Quantity to extract"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:806 #: code:addons/rma/models/rma.py:805
#, python-format #, python-format
msgid "Quantity to extract cannot be greater than remaining delivery quantity (%s %s)" msgid "Quantity to extract cannot be greater than remaining delivery quantity (%s %s)"
msgstr "" msgstr ""
@@ -1049,7 +1049,7 @@ msgid "Reference of the document that generated this RMA."
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:694 #: code:addons/rma/models/rma.py:693
#: model:ir.model.fields,field_description:rma.field_rma__refund_id #: model:ir.model.fields,field_description:rma.field_rma__refund_id
#: model_terms:ir.ui.view,arch_db:rma.rma_view_form #: model_terms:ir.ui.view,arch_db:rma.rma_view_form
#: model:rma.operation,name:rma.rma_operation_refund #: model:rma.operation,name:rma.rma_operation_refund
@@ -1105,13 +1105,13 @@ msgid "Replaced"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1011 #: code:addons/rma/models/rma.py:1010
#, python-format #, 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." 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."
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:1022 #: code:addons/rma/models/rma.py:1021
#, python-format #, python-format
msgid "Replacement:<br/>Product <a href=\"#\" data-oe-model=\"product.product\" data-oe-id=\"%d\">%s</a><br/>Quantity %f %s<br/>This replacement did not create a new move, but one of the previously created moves was updated with this data." msgid "Replacement:<br/>Product <a href=\"#\" data-oe-model=\"product.product\" data-oe-id=\"%d\">%s</a><br/>Quantity %f %s<br/>This replacement did not create a new move, but one of the previously created moves was updated with this data."
msgstr "" msgstr ""
@@ -1127,7 +1127,7 @@ msgid "Requested operation"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:737 #: code:addons/rma/models/rma.py:736
#, python-format #, python-format
msgid "Required field(s):%s" msgid "Required field(s):%s"
msgstr "" msgstr ""
@@ -1156,7 +1156,7 @@ msgid "Return to customer"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:972 #: code:addons/rma/models/rma.py:971
#, python-format #, python-format
msgid "Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</a> has been created." msgid "Return: <a href=\"#\" data-oe-model=\"stock.picking\" data-oe-id=\"%d\">%s</a> has been created."
msgstr "" msgstr ""
@@ -1240,7 +1240,7 @@ msgid "Split RMA"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:890 #: code:addons/rma/models/rma.py:889
#, python-format #, python-format
msgid "Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been created." msgid "Split: <a href=\"#\" data-oe-model=\"rma\" data-oe-id=\"%d\">%s</a> has been created."
msgstr "" msgstr ""
@@ -1314,7 +1314,7 @@ msgid "The quantity done for the product '%s' must be equal to its initial deman
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:794 #: code:addons/rma/models/rma.py:793
#, python-format #, python-format
msgid "The quantity to return is greater than remaining quantity." msgid "The quantity to return is greater than remaining quantity."
msgstr "" msgstr ""
@@ -1326,19 +1326,19 @@ msgid "There is at least one invoice lines whose quantity is less than the quant
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:783 #: code:addons/rma/models/rma.py:782
#, python-format #, python-format
msgid "This RMA cannot be split." msgid "This RMA cannot be split."
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:770 #: code:addons/rma/models/rma.py:769
#, python-format #, python-format
msgid "This RMA cannot perform a replacement." msgid "This RMA cannot perform a replacement."
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:753 #: code:addons/rma/models/rma.py:752
#, python-format #, python-format
msgid "This RMA cannot perform a return." msgid "This RMA cannot perform a return."
msgstr "" msgstr ""
@@ -1427,11 +1427,6 @@ msgstr ""
msgid "Very Urgent" msgid "Very Urgent"
msgstr "" msgstr ""
#. module: rma
#: selection:rma,state:0
msgid "Waiting for refund"
msgstr ""
#. module: rma #. module: rma
#: selection:rma,state:0 #: selection:rma,state:0
msgid "Waiting for replacement" msgid "Waiting for replacement"
@@ -1462,7 +1457,7 @@ msgid "Website communication history"
msgstr "" msgstr ""
#. module: rma #. module: rma
#: code:addons/rma/models/rma.py:517 #: code:addons/rma/models/rma.py:516
#, python-format #, python-format
msgid "You cannot delete RMAs that are not in draft state" msgid "You cannot delete RMAs that are not in draft state"
msgstr "" msgstr ""

View File

@@ -21,11 +21,12 @@ class AccountInvoice(models.Model):
raise ValidationError( raise ValidationError(
_("There is at least one invoice lines whose quantity is " _("There is at least one invoice lines whose quantity is "
"less than the quantity specified in its linked RMA.")) "less than the quantity specified in its linked RMA."))
res = super().action_invoice_open() return super().action_invoice_open()
self.sudo().mapped('invoice_line_ids.rma_id').write(
{'state': 'refunded'} def unlink(self):
) rma = self.mapped('invoice_line_ids.rma_id')
return res rma.write({'state': 'received'})
return super().unlink()
class AccountInvoiceLine(models.Model): class AccountInvoiceLine(models.Model):

View File

@@ -164,7 +164,6 @@ class Rma(models.Model):
("draft", "Draft"), ("draft", "Draft"),
("confirmed", "Confirmed"), ("confirmed", "Confirmed"),
("received", "Received"), ("received", "Received"),
("waiting_refund", "Waiting for refund"),
("waiting_return", "Waiting for return"), ("waiting_return", "Waiting for return"),
("waiting_replacement", "Waiting for replacement"), ("waiting_replacement", "Waiting for replacement"),
("refunded", "Refunded"), ("refunded", "Refunded"),
@@ -402,7 +401,7 @@ class Rma(models.Model):
def _compute_can_be_locked(self): def _compute_can_be_locked(self):
for r in self: for r in self:
r.can_be_locked = (r.remaining_qty_to_done > 0 r.can_be_locked = (r.remaining_qty_to_done > 0
and r.state in ['received', 'waiting_refund', and r.state in ['received',
'waiting_return', 'waiting_return',
'waiting_replacement']) 'waiting_replacement'])
@@ -590,7 +589,7 @@ class Rma(models.Model):
rma.write({ rma.write({
'refund_line_id': line.id, 'refund_line_id': line.id,
'refund_id': refund.id, 'refund_id': refund.id,
'state': 'waiting_refund', 'state': 'refunded',
}) })
refund.message_post_with_view( refund.message_post_with_view(
'mail.message_origin_link', 'mail.message_origin_link',

View File

@@ -72,8 +72,8 @@ class StockWarehouse(models.Model):
'rma_in_type_id': { 'rma_in_type_id': {
'name': _('RMA Receipts'), 'name': _('RMA Receipts'),
'code': 'incoming', 'code': 'incoming',
'use_create_lots': True, 'use_create_lots': False,
'use_existing_lots': False, 'use_existing_lots': True,
'default_location_src_id': False, 'default_location_src_id': False,
'default_location_dest_id': self.rma_loc_id.id, 'default_location_dest_id': self.rma_loc_id.id,
'sequence': max_sequence + 1, 'sequence': max_sequence + 1,

View File

@@ -266,7 +266,7 @@ class TestRma(SavepointCase):
self.assertEqual(rma.refund_line_id.product_id, rma.product_id) self.assertEqual(rma.refund_line_id.product_id, rma.product_id)
self.assertEqual(rma.refund_line_id.quantity, 10) self.assertEqual(rma.refund_line_id.quantity, 10)
self.assertEqual(rma.refund_line_id.uom_id, rma.product_uom) self.assertEqual(rma.refund_line_id.uom_id, rma.product_uom)
self.assertEqual(rma.state, 'waiting_refund') self.assertEqual(rma.state, 'refunded')
self.assertFalse(rma.can_be_refunded) self.assertFalse(rma.can_be_refunded)
self.assertFalse(rma.can_be_returned) self.assertFalse(rma.can_be_returned)
self.assertFalse(rma.can_be_replaced) self.assertFalse(rma.can_be_replaced)
@@ -275,7 +275,6 @@ class TestRma(SavepointCase):
rma.refund_id.action_invoice_open() rma.refund_id.action_invoice_open()
rma.refund_line_id.quantity = 10 rma.refund_line_id.quantity = 10
rma.refund_id.action_invoice_open() rma.refund_id.action_invoice_open()
self.assertEqual(rma.state, 'refunded')
self.assertFalse(rma.can_be_refunded) self.assertFalse(rma.can_be_refunded)
self.assertFalse(rma.can_be_returned) self.assertFalse(rma.can_be_returned)
self.assertFalse(rma.can_be_replaced) self.assertFalse(rma.can_be_replaced)
@@ -311,6 +310,8 @@ class TestRma(SavepointCase):
ctx = dict(self.env.context) ctx = dict(self.env.context)
ctx.update(active_ids=all_rmas.ids, active_model='rma') ctx.update(active_ids=all_rmas.ids, active_model='rma')
action.with_context(ctx).run() action.with_context(ctx).run()
# After that all RMAs are in 'refunded' state
self.assertEqual(all_rmas.mapped('state'), ['refunded'] * 4)
# Two refunds were created # Two refunds were created
refund_1 = (rma_1 | rma_2 | rma_3).mapped('refund_id') refund_1 = (rma_1 | rma_2 | rma_3).mapped('refund_id')
refund_2 = rma_4.refund_id refund_2 = rma_4.refund_id
@@ -351,7 +352,6 @@ class TestRma(SavepointCase):
rma_2.refund_line_id.quantity = 15 rma_2.refund_line_id.quantity = 15
refund_1.action_invoice_open() refund_1.action_invoice_open()
refund_2.action_invoice_open() refund_2.action_invoice_open()
self.assertEqual(all_rmas.mapped('state'), ['refunded']*4)
def test_replace(self): def test_replace(self):
# Create, confirm and receive an RMA # Create, confirm and receive an RMA
@@ -636,3 +636,23 @@ class TestRma(SavepointCase):
self.assertEqual(new_rma.product_uom_qty + rma.product_uom_qty, 10) self.assertEqual(new_rma.product_uom_qty + rma.product_uom_qty, 10)
self.assertEqual(new_rma.move_id.quantity_done, 10) self.assertEqual(new_rma.move_id.quantity_done, 10)
self.assertEqual(new_rma.reception_move_id.quantity_done, 10) self.assertEqual(new_rma.reception_move_id.quantity_done, 10)
def test_rma_to_receive_on_delete_invoice(self):
rma = self._create_confirm_receive(self.partner, self.product, 10,
self.rma_loc)
rma.action_refund()
self.assertEqual(rma.state, 'refunded')
rma.refund_id.unlink()
self.assertFalse(rma.refund_id)
self.assertEqual(rma.state, 'received')
self.assertTrue(rma.can_be_refunded)
self.assertTrue(rma.can_be_returned)
self.assertTrue(rma.can_be_replaced)
def test_rma_picking_type_default_values(self):
warehouse = self.env['stock.warehouse'].create({
'name': 'Stock - RMA Test',
'code': 'SRT',
})
self.assertFalse(warehouse.rma_in_type_id.use_create_lots)
self.assertTrue(warehouse.rma_in_type_id.use_existing_lots)