diff --git a/rma/__manifest__.py b/rma/__manifest__.py index 04089d2d..df7b0147 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Return Merchandise Authorization Management", "summary": "Return Merchandise Authorization (RMA)", - "version": "12.0.1.3.1", + "version": "12.0.1.4.0", "development_status": "Beta", "category": "RMA", "website": "https://github.com/OCA/rma", diff --git a/rma/i18n/es.po b/rma/i18n/es.po index 39200872..8f14ece3 100644 --- a/rma/i18n/es.po +++ b/rma/i18n/es.po @@ -28,7 +28,7 @@ msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" msgstr "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" #. module: rma -#: code:addons/rma/models/rma_team.py:44 +#: code:addons/rma/models/rma_team.py:46 #, python-format msgid "%s (copy)" msgstr "%s (copia)" @@ -536,7 +536,7 @@ msgid "Draft RMA" msgstr "RMA en estado Borrador" #. module: rma -#: code:addons/rma/models/rma.py:1097 +#: code:addons/rma/models/rma.py:1098 #, python-format msgid "" "E-mail subject: %s\n" @@ -639,7 +639,7 @@ msgstr "" "sin eliminarlo." #. module: rma -#: code:addons/rma/models/rma.py:1101 +#: code:addons/rma/models/rma.py:1102 #, python-format msgid "Incoming e-mail" msgstr "Correo electrónico entrante" @@ -746,7 +746,7 @@ msgstr "Nombre" #. module: rma #: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:495 -#: code:addons/rma/models/rma.py:1100 +#: code:addons/rma/models/rma.py:1101 #, python-format msgid "New" msgstr "Nuevo" @@ -767,13 +767,13 @@ msgid "Next Activity Type" msgstr "Siguiente tipo de actividad" #. module: rma -#: code:addons/rma/models/rma.py:772 +#: code:addons/rma/models/rma.py:773 #, python-format msgid "None of the selected RMAs can perform a replacement." msgstr "Ninguno de los RMAs seleccionados puede realizar un reemplazo." #. module: rma -#: code:addons/rma/models/rma.py:755 +#: code:addons/rma/models/rma.py:756 #, python-format msgid "None of the selected RMAs can perform a return." msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución." @@ -954,7 +954,7 @@ msgid "Quantity to extract" msgstr "Cantidad a extraer" #. module: rma -#: code:addons/rma/models/rma.py:805 +#: code:addons/rma/models/rma.py:806 #, python-format msgid "" "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." #. module: rma -#: code:addons/rma/models/rma.py:693 +#: code:addons/rma/models/rma.py:694 #: model:ir.model.fields,field_description:rma.field_rma__refund_id #: model_terms:ir.ui.view,arch_db:rma.rma_view_form #: model:rma.operation,name:rma.rma_operation_refund @@ -1188,7 +1188,7 @@ msgid "Replaced" msgstr "Reemplazado" #. module: rma -#: code:addons/rma/models/rma.py:1010 +#: code:addons/rma/models/rma.py:1011 #, python-format msgid "" "Replacement: Move %s) ha sido creado." #. module: rma -#: code:addons/rma/models/rma.py:1021 +#: code:addons/rma/models/rma.py:1022 #, python-format msgid "" "Replacement:
Product %s%s has been " @@ -1447,7 +1447,7 @@ msgstr "" "inicial porque el movimiento está enlazado a un RMA (%s)." #. module: rma -#: code:addons/rma/models/rma.py:793 +#: code:addons/rma/models/rma.py:794 #, python-format msgid "The quantity to return is greater than remaining quantity." msgstr "La cantidad a devolver es mayor que la cantidad restante del RMA." @@ -1463,19 +1463,19 @@ msgstr "" "cantidad especificada en el RMA asociado." #. module: rma -#: code:addons/rma/models/rma.py:782 +#: code:addons/rma/models/rma.py:783 #, python-format msgid "This RMA cannot be split." msgstr "Este RMA no puede ser dividido." #. module: rma -#: code:addons/rma/models/rma.py:769 +#: code:addons/rma/models/rma.py:770 #, python-format msgid "This RMA cannot perform a replacement." msgstr "Este RMA no puede realizar un reemplazo." #. module: rma -#: code:addons/rma/models/rma.py:752 +#: code:addons/rma/models/rma.py:753 #, python-format msgid "This RMA cannot perform a return." msgstr "Este RMA no puede realizar una devolución." @@ -1599,7 +1599,7 @@ msgid "Website communication history" msgstr "Historial de comunicaciones del sitio web" #. module: rma -#: code:addons/rma/models/rma.py:516 +#: code:addons/rma/models/rma.py:517 #, python-format msgid "You cannot delete RMAs that are not in draft state" msgstr "No puede eliminar RMAs que no estén en estado borrador" diff --git a/rma/i18n/pt_BR.po b/rma/i18n/pt_BR.po index f0061455..0ddc4812 100644 --- a/rma/i18n/pt_BR.po +++ b/rma/i18n/pt_BR.po @@ -27,7 +27,7 @@ msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" msgstr "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" #. module: rma -#: code:addons/rma/models/rma_team.py:44 +#: code:addons/rma/models/rma_team.py:46 #, python-format msgid "%s (copy)" msgstr "%s (Cópia)" @@ -535,7 +535,7 @@ msgid "Draft RMA" msgstr "Rascunho do RMA" #. module: rma -#: code:addons/rma/models/rma.py:1097 +#: code:addons/rma/models/rma.py:1098 #, python-format msgid "" "E-mail subject: %s\n" @@ -638,7 +638,7 @@ msgstr "" "sem removê-lo." #. module: rma -#: code:addons/rma/models/rma.py:1101 +#: code:addons/rma/models/rma.py:1102 #, python-format msgid "Incoming e-mail" msgstr "E-mail recebido" @@ -745,7 +745,7 @@ msgstr "Nome" #. module: rma #: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:495 -#: code:addons/rma/models/rma.py:1100 +#: code:addons/rma/models/rma.py:1101 #, python-format msgid "New" msgstr "Novo(a)" @@ -766,13 +766,13 @@ msgid "Next Activity Type" msgstr "Tipo da Próxima Atividade" #. module: rma -#: code:addons/rma/models/rma.py:772 +#: code:addons/rma/models/rma.py:773 #, python-format msgid "None of the selected RMAs can perform a replacement." msgstr "Nenhum dos RMAs selecionados pode executar uma substituição." #. module: rma -#: code:addons/rma/models/rma.py:755 +#: code:addons/rma/models/rma.py:756 #, python-format msgid "None of the selected RMAs can perform a return." msgstr "Nenhum dos RMAs selecionados pode executar uma devolução." @@ -953,7 +953,7 @@ msgid "Quantity to extract" msgstr "Quantidade a extrair" #. module: rma -#: code:addons/rma/models/rma.py:805 +#: code:addons/rma/models/rma.py:806 #, python-format msgid "" "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." #. module: rma -#: code:addons/rma/models/rma.py:693 +#: code:addons/rma/models/rma.py:694 #: model:ir.model.fields,field_description:rma.field_rma__refund_id #: model_terms:ir.ui.view,arch_db:rma.rma_view_form #: model:rma.operation,name:rma.rma_operation_refund @@ -1186,7 +1186,7 @@ msgid "Replaced" msgstr "Substituído" #. module: rma -#: code:addons/rma/models/rma.py:1010 +#: code:addons/rma/models/rma.py:1011 #, python-format msgid "" "Replacement: Move %s foi criada." #. module: rma -#: code:addons/rma/models/rma.py:1021 +#: code:addons/rma/models/rma.py:1022 #, python-format msgid "" "Replacement:
Product %s%s has been " @@ -1444,7 +1444,7 @@ msgstr "" "inicial, porque a movimentação do estoque está vinculada a uma RMA (%s)." #. module: rma -#: code:addons/rma/models/rma.py:793 +#: code:addons/rma/models/rma.py:794 #, python-format msgid "The quantity to return is greater than remaining quantity." msgstr "A quantidade a retornar é maior que a quantidade restante." @@ -1460,19 +1460,19 @@ msgstr "" "especificada na sua RMA vinculada." #. module: rma -#: code:addons/rma/models/rma.py:782 +#: code:addons/rma/models/rma.py:783 #, python-format msgid "This RMA cannot be split." msgstr "Esta RMA não pode ser dividida." #. module: rma -#: code:addons/rma/models/rma.py:769 +#: code:addons/rma/models/rma.py:770 #, python-format msgid "This RMA cannot perform a replacement." msgstr "Esta RMA não pode executar uma substituição." #. module: rma -#: code:addons/rma/models/rma.py:752 +#: code:addons/rma/models/rma.py:753 #, python-format msgid "This RMA cannot perform a return." msgstr "Este RMA não pode executar uma devolução." @@ -1596,7 +1596,7 @@ msgid "Website communication history" msgstr "Histórico de Comunicação Através do Site" #. module: rma -#: code:addons/rma/models/rma.py:516 +#: code:addons/rma/models/rma.py:517 #, python-format 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\"" diff --git a/rma/i18n/rma.pot b/rma/i18n/rma.pot index 96bc451a..b7eca793 100644 --- a/rma/i18n/rma.pot +++ b/rma/i18n/rma.pot @@ -24,7 +24,7 @@ msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" msgstr "" #. module: rma -#: code:addons/rma/models/rma_team.py:44 +#: code:addons/rma/models/rma_team.py:46 #, python-format msgid "%s (copy)" msgstr "" @@ -486,7 +486,7 @@ msgid "Draft RMA" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1097 +#: code:addons/rma/models/rma.py:1098 #, python-format msgid "E-mail subject: %s\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 "" #. module: rma -#: code:addons/rma/models/rma.py:1101 +#: code:addons/rma/models/rma.py:1102 #, python-format msgid "Incoming e-mail" msgstr "" @@ -684,7 +684,7 @@ msgstr "" #. module: rma #: code:addons/rma/models/rma.py:31 #: code:addons/rma/models/rma.py:495 -#: code:addons/rma/models/rma.py:1100 +#: code:addons/rma/models/rma.py:1101 #, python-format msgid "New" msgstr "" @@ -705,13 +705,13 @@ msgid "Next Activity Type" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:772 +#: code:addons/rma/models/rma.py:773 #, python-format msgid "None of the selected RMAs can perform a replacement." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:755 +#: code:addons/rma/models/rma.py:756 #, python-format msgid "None of the selected RMAs can perform a return." msgstr "" @@ -875,7 +875,7 @@ msgid "Quantity to extract" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:805 +#: code:addons/rma/models/rma.py:806 #, python-format msgid "Quantity to extract cannot be greater than remaining delivery quantity (%s %s)" msgstr "" @@ -1049,7 +1049,7 @@ msgid "Reference of the document that generated this RMA." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:693 +#: code:addons/rma/models/rma.py:694 #: model:ir.model.fields,field_description:rma.field_rma__refund_id #: model_terms:ir.ui.view,arch_db:rma.rma_view_form #: model:rma.operation,name:rma.rma_operation_refund @@ -1105,13 +1105,13 @@ msgid "Replaced" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1010 +#: code:addons/rma/models/rma.py:1011 #, python-format msgid "Replacement: Move %s (Picking %s) has been created." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1021 +#: code:addons/rma/models/rma.py:1022 #, 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." msgstr "" @@ -1127,7 +1127,7 @@ msgid "Requested operation" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:736 +#: code:addons/rma/models/rma.py:737 #, python-format msgid "Required field(s):%s" msgstr "" @@ -1156,7 +1156,7 @@ msgid "Return to customer" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:971 +#: code:addons/rma/models/rma.py:972 #, python-format msgid "Return: %s has been created." msgstr "" @@ -1240,7 +1240,7 @@ msgid "Split RMA" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:889 +#: code:addons/rma/models/rma.py:890 #, python-format msgid "Split: %s has been created." msgstr "" @@ -1314,7 +1314,7 @@ msgid "The quantity done for the product '%s' must be equal to its initial deman msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:793 +#: code:addons/rma/models/rma.py:794 #, python-format msgid "The quantity to return is greater than remaining quantity." msgstr "" @@ -1326,19 +1326,19 @@ msgid "There is at least one invoice lines whose quantity is less than the quant msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:782 +#: code:addons/rma/models/rma.py:783 #, python-format msgid "This RMA cannot be split." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:769 +#: code:addons/rma/models/rma.py:770 #, python-format msgid "This RMA cannot perform a replacement." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:752 +#: code:addons/rma/models/rma.py:753 #, python-format msgid "This RMA cannot perform a return." msgstr "" @@ -1462,7 +1462,7 @@ msgid "Website communication history" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:516 +#: code:addons/rma/models/rma.py:517 #, python-format msgid "You cannot delete RMAs that are not in draft state" msgstr "" diff --git a/rma/models/rma.py b/rma/models/rma.py index ab95a420..9c3887cd 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -503,6 +503,7 @@ class Rma(models.Model): vals["team_id"] = self.env["rma.team"].search([], limit=1).id return super().create(vals) + @api.multi def copy(self, default=None): team = super().copy(default) for follower in self.message_follower_ids: diff --git a/rma/models/rma_team.py b/rma/models/rma_team.py index 018fa882..9a771705 100644 --- a/rma/models/rma_team.py +++ b/rma/models/rma_team.py @@ -1,7 +1,7 @@ # Copyright 2020 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import _, fields, models +from odoo import _, api, fields, models class RmaTeam(models.Model): @@ -37,7 +37,9 @@ class RmaTeam(models.Model): string='Team Members', ) + @api.multi def copy(self, default=None): + self.ensure_one() if default is None: default = {} if not default.get('name'): diff --git a/rma/models/stock_picking.py b/rma/models/stock_picking.py index e341be0b..bddb151d 100644 --- a/rma/models/stock_picking.py +++ b/rma/models/stock_picking.py @@ -1,7 +1,7 @@ # Copyright 2020 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import fields, models +from odoo import api, fields, models class StockPicking(models.Model): @@ -16,7 +16,9 @@ class StockPicking(models.Model): for rec in self: rec.rma_count = len(rec.move_lines.mapped('rma_ids')) + @api.multi def copy(self, default=None): + self.ensure_one() if self.env.context.get('set_rma_picking_type'): location_dest_id = default['location_dest_id'] warehouse = self.env['stock.warehouse'].search( diff --git a/rma/views/rma_views.xml b/rma/views/rma_views.xml index 16f646ff..f77660a6 100644 --- a/rma/views/rma_views.xml +++ b/rma/views/rma_views.xml @@ -279,7 +279,7 @@ - +