From fa16030ce835796d820894593dc03c3408773f4d Mon Sep 17 00:00:00 2001 From: Ernesto Tejeda Date: Fri, 23 Oct 2020 15:29:47 -0400 Subject: [PATCH] [MIG] rma: Migration to 13.0 --- rma/README.rst | 14 +- rma/__manifest__.py | 7 +- rma/data/stock_data.xml | 9 + rma/hooks.py | 13 +- rma/i18n/es.po | 239 +++++++------ rma/i18n/pt_BR.po | 297 +++++++++------- rma/i18n/rma.pot | 320 +++++++++++------- rma/migrations/12.0.2.0.0/post-migration.py | 9 - rma/models/__init__.py | 2 +- .../{account_invoice.py => account_move.py} | 12 +- rma/models/res_partner.py | 4 +- rma/models/rma.py | 133 ++++---- rma/models/rma_team.py | 5 +- rma/models/stock_move.py | 2 +- rma/models/stock_picking.py | 3 +- rma/models/stock_warehouse.py | 52 ++- rma/security/rma_security.xml | 4 +- rma/static/description/index.html | 6 +- rma/tests/test_rma.py | 67 ++-- rma/views/rma_portal_templates.xml | 14 +- rma/views/rma_team_views.xml | 1 - rma/views/rma_views.xml | 1 - rma/wizard/rma_delivery.py | 10 +- rma/wizard/rma_delivery_views.xml | 6 +- rma/wizard/rma_split.py | 4 +- rma/wizard/rma_split_views.xml | 1 - rma/wizard/stock_picking_return.py | 18 +- 27 files changed, 726 insertions(+), 527 deletions(-) create mode 100644 rma/data/stock_data.xml delete mode 100644 rma/migrations/12.0.2.0.0/post-migration.py rename rma/models/{account_invoice.py => account_move.py} (84%) diff --git a/rma/README.rst b/rma/README.rst index dea2df0f..abdfda0a 100644 --- a/rma/README.rst +++ b/rma/README.rst @@ -7,20 +7,20 @@ Return Merchandise Authorization Management !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status - :alt: Beta + :alt: Production/Stable .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github - :target: https://github.com/OCA/rma/tree/12.0/rma + :target: https://github.com/OCA/rma/tree/13.0/rma :alt: OCA/rma .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma + :target: https://translation.odoo-community.org/projects/rma-13-0/rma-13-0-rma :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/145/12.0 + :target: https://runbot.odoo-community.org/runbot/145/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -120,7 +120,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -162,6 +162,6 @@ Current `maintainer `__: |maintainer-ernestotejeda| -This module is part of the `OCA/rma `_ project on GitHub. +This module is part of the `OCA/rma `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/rma/__manifest__.py b/rma/__manifest__.py index 5ecc5d93..ecc7ce28 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -3,19 +3,20 @@ { "name": "Return Merchandise Authorization Management", "summary": "Return Merchandise Authorization (RMA)", - "version": "12.0.1.6.0", - "development_status": "Beta", + "version": "13.0.1.0.0", + "development_status": "Production/Stable", "category": "RMA", "website": "https://github.com/OCA/rma", "author": "Tecnativa, Odoo Community Association (OCA)", "maintainers": ["ernestotejeda"], "license": "AGPL-3", - "depends": ["account", "stock",], + "depends": ["account", "stock"], "data": [ "views/report_rma.xml", "report/report.xml", "data/mail_data.xml", "data/rma_operation_data.xml", + "data/stock_data.xml", "security/rma_security.xml", "security/ir.model.access.csv", "wizard/stock_picking_return_views.xml", diff --git a/rma/data/stock_data.xml b/rma/data/stock_data.xml new file mode 100644 index 00000000..8ee0cdda --- /dev/null +++ b/rma/data/stock_data.xml @@ -0,0 +1,9 @@ + + + + RMA + + view + + + diff --git a/rma/hooks.py b/rma/hooks.py index 1c2791c8..dbdbf75a 100644 --- a/rma/hooks.py +++ b/rma/hooks.py @@ -23,12 +23,13 @@ def post_init_hook(cr, registry): def create_rma_locations(warehouse): stock_location = env["stock.location"] - location_vals = warehouse._get_locations_values({}) - for field_name, values in location_vals.items(): - if field_name == "rma_loc_id" and not warehouse.rma_loc_id: - warehouse.rma_loc_id = ( - stock_location.with_context(active_test=False).create(values).id - ) + if not warehouse.rma_loc_id: + rma_location_vals = warehouse._get_rma_location_values() + warehouse.rma_loc_id = ( + stock_location.with_context(active_test=False) + .create(rma_location_vals) + .id + ) def create_rma_picking_types(whs): ir_sequence_sudo = env["ir.sequence"].sudo() diff --git a/rma/i18n/es.po b/rma/i18n/es.po index b807bbd7..cbea57be 100644 --- a/rma/i18n/es.po +++ b/rma/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-21 05:13+0000\n" -"PO-Revision-Date: 2020-10-06 14:16+0000\n" +"POT-Creation-Date: 2020-10-23 20:11+0000\n" +"PO-Revision-Date: 2020-10-23 16:21-0400\n" "Last-Translator: David Vidal \n" "Language-Team: \n" "Language: es\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.10\n" +"X-Generator: Poedit 2.0.6\n" #. module: rma #: model:mail.template,report_name:rma.mail_template_rma_notification @@ -28,16 +28,25 @@ 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:46 +#: code:addons/rma/models/rma_team.py:0 #, python-format msgid "%s (copy)" msgstr "%s (copia)" +#. module: rma +#: code:addons/rma/models/rma.py:0 +#, python-format +msgid "E-mail subject: %s

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

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

\n" +"

\n" " Dear ${object.partner_id.name}\n" " % if object.partner_id.parent_id:\n" " (${object.partner_id.parent_id.name})\n" @@ -48,7 +57,7 @@ msgid "" "

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

\n" -"
\n" +" \n" " " msgstr "" "
\n" @@ -77,12 +86,18 @@ msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Paid" +#, fuzzy +msgid "" +"\n" +" Paid" msgstr "Pagado" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Waiting Payment" +#, fuzzy +msgid "" +"\n" +" Waiting Payment" msgstr "Esperando Pago" #. module: rma @@ -290,6 +305,11 @@ msgstr "Activo" msgid "Activities" msgstr "Actividades" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__activity_state msgid "Activity State" @@ -369,7 +389,7 @@ msgid "Cancel" msgstr "Cancelar" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__cancelled msgid "Canceled" msgstr "Cancelado" @@ -411,7 +431,8 @@ msgid "Confirm" msgstr "Confirmar" #. module: rma -#: model_terms:ir.ui.view,arch_db:rma.rma_view_search selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__confirmed +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Confirmed" msgstr "Confirmado" @@ -455,7 +476,7 @@ msgid "Customer Portal URL" msgstr "URL del portal de cliente" #. module: rma -#: code:addons/rma/controllers/main.py:42 +#: code:addons/rma/controllers/main.py:0 #: model:ir.model.fields,field_description:rma.field_rma__date #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -525,7 +546,8 @@ msgid "Display Name" msgstr "Nombre mostrado" #. module: rma -#: model_terms:ir.ui.view,arch_db:rma.rma_view_search selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__draft +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Draft" msgstr "Borrador" @@ -535,20 +557,6 @@ msgstr "Borrador" msgid "Draft RMA" msgstr "RMA en estado Borrador" -#. module: rma -#: code:addons/rma/models/rma.py:1098 -#, python-format -msgid "" -"E-mail subject: %s\n" -"\n" -"E-mail body:\n" -"%s" -msgstr "" -"Asunto del correo electrónico: %s\n" -"\n" -"Cuerpo del correo electrónico:\n" -"%s" - #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_team_view_form msgid "Email" @@ -560,7 +568,7 @@ msgid "Email Alias" msgstr "Pseudónimo de correo" #. module: rma -#: code:addons/rma/wizard/rma_split.py:63 +#: code:addons/rma/wizard/rma_split.py:0 #, python-format msgid "Extracted RMA" msgstr "RMA Extraído" @@ -612,20 +620,28 @@ msgstr "" "contiene el seudónimo para la creación de tareas)" #. module: rma -#: model:ir.model.fields,help:rma.field_rma__message_unread -#: model:ir.model.fields,help:rma.field_rma_team__message_unread -msgid "If checked new messages require your attention." -msgstr "Si está marcado, hay nuevos mensajes que requieren su atención." +#: model:ir.model.fields,field_description:rma.field_rma__activity_exception_icon +msgid "Icon" +msgstr "" + +#. module: rma +#: model:ir.model.fields,help:rma.field_rma__activity_exception_icon +msgid "Icon to indicate an exception activity." +msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_needaction +#: model:ir.model.fields,help:rma.field_rma__message_unread #: model:ir.model.fields,help:rma.field_rma_team__message_needaction +#: model:ir.model.fields,help:rma.field_rma_team__message_unread msgid "If checked, new messages require your attention." msgstr "Si está marcado, hay nuevos mensajes que requieren su atención." #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_has_error +#: model:ir.model.fields,help:rma.field_rma__message_has_sms_error #: model:ir.model.fields,help:rma.field_rma_team__message_has_error +#: model:ir.model.fields,help:rma.field_rma_team__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Si se encuentra marcado, algunos mensajes tienen error de envío." @@ -639,32 +655,32 @@ msgstr "" "sin eliminarlo." #. module: rma -#: code:addons/rma/models/rma.py:1102 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "Incoming e-mail" msgstr "Correo electrónico entrante" -#. module: rma -#: model:ir.model,name:rma.model_account_invoice -msgid "Invoice" -msgstr "Factura" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__partner_invoice_id msgid "Invoice Address" msgstr "Dirección de factura" -#. module: rma -#: model:ir.model,name:rma.model_account_invoice_line -msgid "Invoice Line" -msgstr "Linea de factura" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_is_follower #: model:ir.model.fields,field_description:rma.field_rma_team__message_is_follower msgid "Is Follower" msgstr "Es un seguidor" +#. module: rma +#: model:ir.model,name:rma.model_account_move +msgid "Journal Entries" +msgstr "" + +#. module: rma +#: model:ir.model,name:rma.model_account_move_line +msgid "Journal Item" +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 @@ -708,7 +724,7 @@ msgid "Lock" msgstr "Bloquear" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__locked msgid "Locked" msgstr "Bloqueado" @@ -741,7 +757,7 @@ msgid "Messages" msgstr "Mensajes" #. module: rma -#: code:addons/rma/controllers/main.py:43 +#: code:addons/rma/controllers/main.py:0 #: model:ir.model.fields,field_description:rma.field_rma__name #: model:ir.model.fields,field_description:rma.field_rma_operation__name #: model:ir.model.fields,field_description:rma.field_rma_team__name @@ -750,8 +766,7 @@ msgid "Name" msgstr "Nombre" #. module: rma -#: 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:0 #, python-format msgid "New" msgstr "Nuevo" @@ -772,24 +787,24 @@ msgid "Next Activity Type" msgstr "Siguiente tipo de actividad" #. module: rma -#: code:addons/rma/models/rma.py:772 +#: code:addons/rma/models/rma.py:0 #, 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:0 #, python-format msgid "None of the selected RMAs can perform a return." msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución." #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__1 msgid "Normal" msgstr "Normal" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__0 msgid "Not urgent" msgstr "No Urgente" @@ -802,8 +817,8 @@ msgstr "Número de acciones" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_has_error_counter #: model:ir.model.fields,field_description:rma.field_rma_team__message_has_error_counter -msgid "Number of error" -msgstr "Número de error" +msgid "Number of errors" +msgstr "Número de errores" #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_needaction_counter @@ -854,11 +869,6 @@ msgstr "Movimiento" msgid "Other Information" msgstr "Otra información" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Overdue" -msgstr "Vencidas" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_team__alias_user_id msgid "Owner" @@ -889,11 +899,6 @@ msgstr "" msgid "Partner" msgstr "Empresa" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Planned" -msgstr "Planeado" - #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_contact msgid "" @@ -948,7 +953,8 @@ msgid "Quantity" msgstr "Cantidad" #. module: rma -#: code:addons/rma/wizard/rma_delivery.py:49 sql_constraint:rma.split.wizard:0 +#: code:addons/rma/wizard/rma_delivery.py:0 +#: model:ir.model.constraint,message:rma.constraint_rma_split_wizard_check_product_uom_qty_positive #, python-format msgid "Quantity must be greater than 0." msgstr "La cantidad debe ser mayor que cero." @@ -959,7 +965,7 @@ msgid "Quantity to extract" msgstr "Cantidad a extraer" #. module: rma -#: code:addons/rma/models/rma.py:805 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Quantity to extract cannot be greater than remaining delivery quantity (%s " @@ -976,7 +982,7 @@ msgstr "Cantidad a extraer en nuevo RMA." #. module: rma #: model:ir.actions.act_window,name:rma.rma_action #: model:ir.model,name:rma.model_rma -#: model:ir.model.fields,field_description:rma.field_account_invoice_line__rma_id +#: model:ir.model.fields,field_description:rma.field_account_move_line__rma_id #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__rma_id #: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma #: model:ir.module.category,name:rma.rma_module_category @@ -993,7 +999,7 @@ msgid "RMA #" msgstr "RMA nº" #. module: rma -#: code:addons/rma/models/res_company.py:18 +#: code:addons/rma/models/res_company.py:0 #, python-format msgid "RMA Code" msgstr "Código de RMA" @@ -1009,7 +1015,7 @@ msgid "RMA Deadline" msgstr "RMA fecha límite" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:82 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "RMA Delivery Orders" msgstr "Órdenes de entrega de RMA" @@ -1047,7 +1053,7 @@ msgid "RMA Out Type" msgstr "Tipo de operación para entrega de RMA" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:73 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "RMA Receipts" msgstr "Recepciones de RMA" @@ -1137,7 +1143,8 @@ msgid "Receipt" msgstr "Recepción" #. module: rma -#: model_terms:ir.ui.view,arch_db:rma.rma_view_search selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__received +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Received" msgstr "Recibido" @@ -1157,7 +1164,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:0 #: 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 @@ -1176,7 +1183,7 @@ msgid "Refund line" msgstr "Línea de factura rectificativa" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__refunded msgid "Refunded" msgstr "Reembolsado" @@ -1196,8 +1203,8 @@ msgid "Repair" msgstr "Reparar" #. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma_delivery_wizard__type__replace #: model_terms:ir.ui.view,arch_db:rma.rma_view_form -#: selection:rma.delivery.wizard,type:0 #: model:rma.operation,name:rma.rma_operation_replace msgid "Replace" msgstr "Reemplazar" @@ -1208,12 +1215,12 @@ msgid "Replace Product" msgstr "Reemplazar producto" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__replaced msgid "Replaced" msgstr "Reemplazado" #. module: rma -#: code:addons/rma/models/rma.py:1011 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Replacement: Move %s) ha sido creado." #. module: rma -#: code:addons/rma/models/rma.py:1022 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Replacement:
Product %s%s ha sido creada." #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__returned msgid "Returned" msgstr "Devuelto" @@ -1297,6 +1304,13 @@ msgstr "Devuelto" msgid "Rma Count" msgstr "Cantidad de RMAs" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__message_has_sms_error +#: model:ir.model.fields,field_description:rma.field_rma_team__message_has_sms_error +#, fuzzy +msgid "SMS Delivery error" +msgstr "Error de Envío de Mensaje" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__scheduled_date msgid "Scheduled Date" @@ -1328,13 +1342,13 @@ msgid "Sequence" msgstr "Secuencia" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:48 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "Sequence RMA in" msgstr "Secuencia de recepción de RMA" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:53 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "Sequence RMA out" msgstr "Secuencia de entrega de RMA" @@ -1366,7 +1380,7 @@ msgid "Split RMA" msgstr "Dividir RMA" #. module: rma -#: code:addons/rma/models/rma.py:889 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Split: %s has been " @@ -1382,7 +1396,7 @@ msgid "State" msgstr "Estado" #. module: rma -#: code:addons/rma/controllers/main.py:44 +#: code:addons/rma/controllers/main.py:0 #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #, python-format msgid "Status" @@ -1423,7 +1437,7 @@ msgid "Team Members" msgstr "Miembros del equipo" #. module: rma -#: sql_constraint:rma.operation:0 +#: model:ir.model.constraint,message:rma.constraint_rma_operation_name_uniq msgid "That operation name already exists !" msgstr "¡El nombre de operación ya existe!" @@ -1462,7 +1476,7 @@ msgstr "" "dirección." #. module: rma -#: code:addons/rma/models/stock_move.py:64 +#: code:addons/rma/models/stock_move.py:0 #, python-format msgid "" "The quantity done for the product '%s' must be equal to its initial demand " @@ -1472,13 +1486,13 @@ 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:0 #, 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." #. module: rma -#: code:addons/rma/models/account_invoice.py:22 +#: code:addons/rma/models/account_move.py:0 #, python-format msgid "" "There is at least one invoice lines whose quantity is less than the quantity " @@ -1488,19 +1502,19 @@ msgstr "" "cantidad especificada en el RMA asociado." #. module: rma -#: code:addons/rma/models/rma.py:782 +#: code:addons/rma/models/rma.py:0 #, 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:0 #, 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:0 #, python-format msgid "This RMA cannot perform a return." msgstr "Este RMA no puede realizar una devolución." @@ -1511,11 +1525,6 @@ msgstr "Este RMA no puede realizar una devolución." msgid "To Refund" msgstr "Reembolsar" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Today" -msgstr "Hoy" - #. module: rma #: model:ir.model,name:rma.model_stock_picking msgid "Transfer" @@ -1531,6 +1540,11 @@ msgstr "Tipo" msgid "Type of Operation" msgstr "Tipo de operación" +#. module: rma +#: model:ir.model.fields,help:rma.field_rma__activity_exception_decoration +msgid "Type of the exception activity on record." +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Unassigned RMAs" @@ -1570,7 +1584,7 @@ msgid "UoM" msgstr "UdM" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__2 msgid "Urgent" msgstr "Urgente" @@ -1590,17 +1604,17 @@ msgid "Users" msgstr "Usuarios" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__3 msgid "Very Urgent" msgstr "Muy Urgente" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__waiting_replacement msgid "Waiting for replacement" msgstr "Esperando por reemplazo" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__waiting_return msgid "Waiting for return" msgstr "Esperando por devolución" @@ -1624,13 +1638,13 @@ 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:0 #, 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" #. module: rma -#: code:addons/rma/wizard/stock_picking_return.py:55 +#: code:addons/rma/wizard/stock_picking_return.py:0 #, python-format msgid "" "You must specify the 'Customer' in the 'Stock Picking' from which RMAs will " @@ -1639,6 +1653,11 @@ msgstr "" "Debe seleccionar el 'Cliente' en la 'Orden de Entrega' desde la cual los " "RMAs serán creados" +#. module: rma +#: model:ir.actions.report,print_report_name:rma.report_rma_action +msgid "object._get_report_base_filename()" +msgstr "" + #. module: rma #: model:res.groups,comment:rma.rma_group_user_all msgid "" @@ -1660,6 +1679,24 @@ msgstr "" "El usuario tendrá acceso a la configuración de RMA y a los informes " "estadísticos." +#~ msgid "If checked new messages require your attention." +#~ msgstr "Si está marcado, hay nuevos mensajes que requieren su atención." + +#~ msgid "Invoice" +#~ msgstr "Factura" + +#~ msgid "Invoice Line" +#~ msgstr "Linea de factura" + +#~ msgid "Overdue" +#~ msgstr "Vencidas" + +#~ msgid "Planned" +#~ msgstr "Planeado" + +#~ msgid "Today" +#~ msgstr "Hoy" + #~ msgid "Waiting for refund" #~ msgstr "Esperando por reembolso" diff --git a/rma/i18n/pt_BR.po b/rma/i18n/pt_BR.po index 6475bdf3..c7e484c0 100644 --- a/rma/i18n/pt_BR.po +++ b/rma/i18n/pt_BR.po @@ -27,16 +27,22 @@ 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:46 +#: code:addons/rma/models/rma_team.py:0 #, python-format msgid "%s (copy)" msgstr "%s (Cópia)" +#. module: rma +#: code:addons/rma/models/rma.py:0 +#, python-format +msgid "E-mail subject: %s

E-mail body:
%s" +msgstr "" + #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_notification msgid "" "
\n" -"

\n" +"

\n" " Dear ${object.partner_id.name}\n" " % if object.partner_id.parent_id:\n" " (${object.partner_id.parent_id.name})\n" @@ -47,23 +53,9 @@ msgid "" "

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

\n" -"
\n" +"
\n" " " msgstr "" -"
\n" -"

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

\n" -" Aqui está o RMA ${object.name} from ${object.company_id." -"name}.\n" -"

\n" -" Não deixe de nos contactar se houver qualquer dúvida ou outra questão.\n" -"

\n" -"
\n" -" " #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page @@ -76,13 +68,17 @@ msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Paid" -msgstr " Pago" +msgid "" +"\n" +" Paid" +msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Waiting Payment" -msgstr " Aguardando Pagamento" +msgid "" +"\n" +" Waiting Payment" +msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page @@ -289,6 +285,11 @@ msgstr "Ativar/Ativo(a)" msgid "Activities" msgstr "Atividades" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__activity_state msgid "Activity State" @@ -368,7 +369,7 @@ msgid "Cancel" msgstr "Cancelar" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__cancelled msgid "Canceled" msgstr "Cancelado(a)" @@ -410,7 +411,8 @@ msgid "Confirm" msgstr "Confirmar" #. module: rma -#: model_terms:ir.ui.view,arch_db:rma.rma_view_search selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__confirmed +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Confirmed" msgstr "Confirmado(a)" @@ -454,7 +456,7 @@ msgid "Customer Portal URL" msgstr "URL do portal do cliente" #. module: rma -#: code:addons/rma/controllers/main.py:42 +#: code:addons/rma/controllers/main.py:0 #: model:ir.model.fields,field_description:rma.field_rma__date #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -524,7 +526,8 @@ msgid "Display Name" msgstr "Exibir Nome" #. module: rma -#: model_terms:ir.ui.view,arch_db:rma.rma_view_search selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__draft +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Draft" msgstr "Rascunho" @@ -534,20 +537,6 @@ msgstr "Rascunho" msgid "Draft RMA" msgstr "Rascunho do RMA" -#. module: rma -#: code:addons/rma/models/rma.py:1098 -#, python-format -msgid "" -"E-mail subject: %s\n" -"\n" -"E-mail body:\n" -"%s" -msgstr "" -"Assunto do E-mail: %s\n" -"\n" -"Corpo do E-mail:\n" -"%s" - #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_team_view_form msgid "Email" @@ -559,7 +548,7 @@ msgid "Email Alias" msgstr "Alias do Email" #. module: rma -#: code:addons/rma/wizard/rma_split.py:63 +#: code:addons/rma/wizard/rma_split.py:0 #, python-format msgid "Extracted RMA" msgstr "RMA Extraído" @@ -611,20 +600,28 @@ msgstr "" "de criação da tarefa)" #. module: rma -#: model:ir.model.fields,help:rma.field_rma__message_unread -#: model:ir.model.fields,help:rma.field_rma_team__message_unread -msgid "If checked new messages require your attention." -msgstr "Se marcada, novas mensagens requerem sua atenção." +#: model:ir.model.fields,field_description:rma.field_rma__activity_exception_icon +msgid "Icon" +msgstr "" + +#. module: rma +#: model:ir.model.fields,help:rma.field_rma__activity_exception_icon +msgid "Icon to indicate an exception activity." +msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_needaction +#: model:ir.model.fields,help:rma.field_rma__message_unread #: model:ir.model.fields,help:rma.field_rma_team__message_needaction +#: model:ir.model.fields,help:rma.field_rma_team__message_unread msgid "If checked, new messages require your attention." msgstr "Se marcada, novas mensagens requerem sua atenção." #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_has_error +#: model:ir.model.fields,help:rma.field_rma__message_has_sms_error #: model:ir.model.fields,help:rma.field_rma_team__message_has_error +#: model:ir.model.fields,help:rma.field_rma_team__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Se marcada, algumas mensagens apresentam um erro de entrega." @@ -638,32 +635,32 @@ msgstr "" "sem removê-lo." #. module: rma -#: code:addons/rma/models/rma.py:1102 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "Incoming e-mail" msgstr "E-mail recebido" -#. module: rma -#: model:ir.model,name:rma.model_account_invoice -msgid "Invoice" -msgstr "Fatura" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__partner_invoice_id msgid "Invoice Address" msgstr "Endereço de Faturamento" -#. module: rma -#: model:ir.model,name:rma.model_account_invoice_line -msgid "Invoice Line" -msgstr "Linha da Fatura" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_is_follower #: model:ir.model.fields,field_description:rma.field_rma_team__message_is_follower msgid "Is Follower" msgstr "É Seguidor" +#. module: rma +#: model:ir.model,name:rma.model_account_move +msgid "Journal Entries" +msgstr "" + +#. module: rma +#: model:ir.model,name:rma.model_account_move_line +msgid "Journal Item" +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 @@ -707,7 +704,7 @@ msgid "Lock" msgstr "Travar" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__locked msgid "Locked" msgstr "Travado" @@ -740,7 +737,7 @@ msgid "Messages" msgstr "Mensagens" #. module: rma -#: code:addons/rma/controllers/main.py:43 +#: code:addons/rma/controllers/main.py:0 #: model:ir.model.fields,field_description:rma.field_rma__name #: model:ir.model.fields,field_description:rma.field_rma_operation__name #: model:ir.model.fields,field_description:rma.field_rma_team__name @@ -749,8 +746,7 @@ msgid "Name" msgstr "Nome" #. module: rma -#: 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:0 #, python-format msgid "New" msgstr "Novo(a)" @@ -771,24 +767,24 @@ 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:0 #, 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:0 #, python-format msgid "None of the selected RMAs can perform a return." msgstr "Nenhum dos RMAs selecionados pode executar uma devolução." #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__1 msgid "Normal" msgstr "Normal" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__0 msgid "Not urgent" msgstr "Não é urgente" @@ -801,8 +797,8 @@ msgstr "Número de Ações" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_has_error_counter #: model:ir.model.fields,field_description:rma.field_rma_team__message_has_error_counter -msgid "Number of error" -msgstr "Número de Erros" +msgid "Number of errors" +msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_needaction_counter @@ -853,11 +849,6 @@ msgstr "Origem da Movimentação" msgid "Other Information" msgstr "Outra Informação" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Overdue" -msgstr "Vencidos(as)" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_team__alias_user_id msgid "Owner" @@ -889,11 +880,6 @@ msgstr "" msgid "Partner" msgstr "Parceiro" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Planned" -msgstr "Planejado)a)" - #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_contact msgid "" @@ -947,7 +933,8 @@ msgid "Quantity" msgstr "Quantidade" #. module: rma -#: code:addons/rma/wizard/rma_delivery.py:49 sql_constraint:rma.split.wizard:0 +#: code:addons/rma/wizard/rma_delivery.py:0 +#: model:ir.model.constraint,message:rma.constraint_rma_split_wizard_check_product_uom_qty_positive #, python-format msgid "Quantity must be greater than 0." msgstr "Quantidade precisa ser maior que zero." @@ -958,7 +945,7 @@ msgid "Quantity to extract" msgstr "Quantidade a extrair" #. module: rma -#: code:addons/rma/models/rma.py:805 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Quantity to extract cannot be greater than remaining delivery quantity (%s " @@ -975,7 +962,7 @@ msgstr "Quantidade a extrair para um novo RMA." #. module: rma #: model:ir.actions.act_window,name:rma.rma_action #: model:ir.model,name:rma.model_rma -#: model:ir.model.fields,field_description:rma.field_account_invoice_line__rma_id +#: model:ir.model.fields,field_description:rma.field_account_move_line__rma_id #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__rma_id #: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma #: model:ir.module.category,name:rma.rma_module_category @@ -992,7 +979,7 @@ msgid "RMA #" msgstr "RMA #" #. module: rma -#: code:addons/rma/models/res_company.py:18 +#: code:addons/rma/models/res_company.py:0 #, python-format msgid "RMA Code" msgstr "Código RMA" @@ -1008,7 +995,7 @@ msgid "RMA Deadline" msgstr "" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:82 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "RMA Delivery Orders" msgstr "Pedidos de Entrega RMA" @@ -1046,7 +1033,7 @@ msgid "RMA Out Type" msgstr "Tipo Saída RMA" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:73 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "RMA Receipts" msgstr "Recebimentos RMA" @@ -1135,7 +1122,8 @@ msgid "Receipt" msgstr "Recebimento" #. module: rma -#: model_terms:ir.ui.view,arch_db:rma.rma_view_search selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__received +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Received" msgstr "Recebido" @@ -1155,7 +1143,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:0 #: 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 @@ -1174,7 +1162,7 @@ msgid "Refund line" msgstr "Linha de Restituição" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__refunded msgid "Refunded" msgstr "Restituído" @@ -1194,8 +1182,8 @@ msgid "Repair" msgstr "Reparo" #. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma_delivery_wizard__type__replace #: model_terms:ir.ui.view,arch_db:rma.rma_view_form -#: selection:rma.delivery.wizard,type:0 #: model:rma.operation,name:rma.rma_operation_replace msgid "Replace" msgstr "Substituir" @@ -1206,12 +1194,12 @@ msgid "Replace Product" msgstr "Substituir Produto" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__replaced msgid "Replaced" msgstr "Substituído" #. module: rma -#: code:addons/rma/models/rma.py:1011 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Replacement: Move %s foi criada." #. module: rma -#: code:addons/rma/models/rma.py:1022 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Replacement:
Product %s foi criado." #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__returned msgid "Returned" msgstr "Retornado(a)" @@ -1295,6 +1283,12 @@ msgstr "Retornado(a)" msgid "Rma Count" msgstr "Contagem de RMA" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__message_has_sms_error +#: model:ir.model.fields,field_description:rma.field_rma_team__message_has_sms_error +msgid "SMS Delivery error" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__scheduled_date msgid "Scheduled Date" @@ -1326,13 +1320,13 @@ msgid "Sequence" msgstr "" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:48 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "Sequence RMA in" msgstr "Sequência de Entrada RMA" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:53 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "Sequence RMA out" msgstr "Sequência de Saída RMA" @@ -1364,7 +1358,7 @@ msgid "Split RMA" msgstr "Dividir RMA" #. module: rma -#: code:addons/rma/models/rma.py:889 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Split: %s has been " @@ -1380,7 +1374,7 @@ msgid "State" msgstr "Situação" #. module: rma -#: code:addons/rma/controllers/main.py:44 +#: code:addons/rma/controllers/main.py:0 #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #, python-format msgid "Status" @@ -1421,7 +1415,7 @@ msgid "Team Members" msgstr "Membros da Equipe" #. module: rma -#: sql_constraint:rma.operation:0 +#: model:ir.model.constraint,message:rma.constraint_rma_operation_name_uniq msgid "That operation name already exists !" msgstr "Esse nome de operação já existe!" @@ -1459,7 +1453,7 @@ msgstr "" "nenhum usuário do sistema for encontrado para esse endereço." #. module: rma -#: code:addons/rma/models/stock_move.py:64 +#: code:addons/rma/models/stock_move.py:0 #, python-format msgid "" "The quantity done for the product '%s' must be equal to its initial demand " @@ -1469,13 +1463,13 @@ 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:0 #, python-format msgid "The quantity to return is greater than remaining quantity." msgstr "A quantidade a retornar é maior que a quantidade restante." #. module: rma -#: code:addons/rma/models/account_invoice.py:22 +#: code:addons/rma/models/account_move.py:0 #, python-format msgid "" "There is at least one invoice lines whose quantity is less than the quantity " @@ -1485,19 +1479,19 @@ msgstr "" "especificada na sua RMA vinculada." #. module: rma -#: code:addons/rma/models/rma.py:782 +#: code:addons/rma/models/rma.py:0 #, 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:0 #, 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:0 #, python-format msgid "This RMA cannot perform a return." msgstr "Este RMA não pode executar uma devolução." @@ -1508,11 +1502,6 @@ msgstr "Este RMA não pode executar uma devolução." msgid "To Refund" msgstr "A Ser Restituído" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Today" -msgstr "Hoje" - #. module: rma #: model:ir.model,name:rma.model_stock_picking msgid "Transfer" @@ -1528,6 +1517,11 @@ msgstr "Tipo" msgid "Type of Operation" msgstr "Tipo de Operação" +#. module: rma +#: model:ir.model.fields,help:rma.field_rma__activity_exception_decoration +msgid "Type of the exception activity on record." +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Unassigned RMAs" @@ -1567,7 +1561,7 @@ msgid "UoM" msgstr "Unidade de Medida" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__2 msgid "Urgent" msgstr "Urgente" @@ -1587,17 +1581,17 @@ msgid "Users" msgstr "Usuários" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__3 msgid "Very Urgent" msgstr "Muito Urgente" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__waiting_replacement msgid "Waiting for replacement" msgstr "Aguardando Substituição" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__waiting_return msgid "Waiting for return" msgstr "Aguardando Devolução" @@ -1621,13 +1615,13 @@ 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:0 #, 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\"" #. module: rma -#: code:addons/rma/wizard/stock_picking_return.py:55 +#: code:addons/rma/wizard/stock_picking_return.py:0 #, python-format msgid "" "You must specify the 'Customer' in the 'Stock Picking' from which RMAs will " @@ -1636,6 +1630,11 @@ msgstr "" "Você deve especificar o 'Cliente' na 'Seleção de estoque' a partir do qual " "as RMAs serão criadas" +#. module: rma +#: model:ir.actions.report,print_report_name:rma.report_rma_action +msgid "object._get_report_base_filename()" +msgstr "" + #. module: rma #: model:res.groups,comment:rma.rma_group_user_all msgid "" @@ -1656,6 +1655,76 @@ msgstr "" "o usuário terá acesso à configuração RMA, bem como aos relatórios " "estatísticos." +#~ msgid "" +#~ "
\n" +#~ "

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

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

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

\n" +#~ "
\n" +#~ " " +#~ msgstr "" +#~ "
\n" +#~ "

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

\n" +#~ " Aqui está o RMA ${object.name} from ${object." +#~ "company_id.name}.\n" +#~ "

\n" +#~ " Não deixe de nos contactar se houver qualquer dúvida ou outra " +#~ "questão.\n" +#~ "

\n" +#~ "
\n" +#~ " " + +#~ msgid " Paid" +#~ msgstr " Pago" + +#~ msgid " Waiting Payment" +#~ msgstr " Aguardando Pagamento" + +#~ msgid "" +#~ "E-mail subject: %s\n" +#~ "\n" +#~ "E-mail body:\n" +#~ "%s" +#~ msgstr "" +#~ "Assunto do E-mail: %s\n" +#~ "\n" +#~ "Corpo do E-mail:\n" +#~ "%s" + +#~ msgid "If checked new messages require your attention." +#~ msgstr "Se marcada, novas mensagens requerem sua atenção." + +#~ msgid "Invoice" +#~ msgstr "Fatura" + +#~ msgid "Invoice Line" +#~ msgstr "Linha da Fatura" + +#~ msgid "Number of error" +#~ msgstr "Número de Erros" + +#~ msgid "Overdue" +#~ msgstr "Vencidos(as)" + +#~ msgid "Planned" +#~ msgstr "Planejado)a)" + +#~ msgid "Today" +#~ msgstr "Hoje" + #~ msgid "Waiting for refund" #~ msgstr "Aguardando Restituição" diff --git a/rma/i18n/rma.pot b/rma/i18n/rma.pot index 0e633fe8..36cce617 100644 --- a/rma/i18n/rma.pot +++ b/rma/i18n/rma.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * rma +# * rma # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -24,15 +24,22 @@ msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" msgstr "" #. module: rma -#: code:addons/rma/models/rma_team.py:46 +#: code:addons/rma/models/rma_team.py:0 #, python-format msgid "%s (copy)" msgstr "" +#. module: rma +#: code:addons/rma/models/rma.py:0 +#, python-format +msgid "E-mail subject: %s

E-mail body:
%s" +msgstr "" + #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_notification -msgid "
\n" -"

\n" +msgid "" +"

\n" +"

\n" " Dear ${object.partner_id.name}\n" " % if object.partner_id.parent_id:\n" " (${object.partner_id.parent_id.name})\n" @@ -42,7 +49,7 @@ msgid "

\n" "

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

\n" -"
\n" +"
\n" " " msgstr "" @@ -53,42 +60,58 @@ msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Paid" +msgid "" +"\n" +" Paid" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Waiting Payment" +msgid "" +"\n" +" Waiting Payment" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid "" +msgid "" +"" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid "" +msgid "" +"" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Cancelled" +msgid "" +" Cancelled" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Preparation" +msgid "" +" Preparation" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Shipped" +msgid "" +" Shipped" msgstr "" #. module: rma #: model_terms:ir.ui.view,arch_db:rma.portal_rma_page -msgid " Partially Available" +msgid "" +" Partially Available" msgstr "" #. module: rma @@ -209,7 +232,9 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_defaults -msgid "A Python dictionary that will be evaluated to provide default values when creating new records for this alias." +msgid "" +"A Python dictionary that will be evaluated to provide default values when " +"creating new records for this alias." msgstr "" #. module: rma @@ -238,6 +263,11 @@ msgstr "" msgid "Activities" msgstr "" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__activity_state msgid "Activity State" @@ -317,7 +347,7 @@ msgid "Cancel" msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__cancelled msgid "Canceled" msgstr "" @@ -359,8 +389,8 @@ msgid "Confirm" msgstr "" #. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma__state__confirmed #: model_terms:ir.ui.view,arch_db:rma.rma_view_search -#: selection:rma,state:0 msgid "Confirmed" msgstr "" @@ -404,7 +434,7 @@ msgid "Customer Portal URL" msgstr "" #. module: rma -#: code:addons/rma/controllers/main.py:42 +#: code:addons/rma/controllers/main.py:0 #: model:ir.model.fields,field_description:rma.field_rma__date #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -474,8 +504,8 @@ msgid "Display Name" msgstr "" #. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma__state__draft #: model_terms:ir.ui.view,arch_db:rma.rma_view_search -#: selection:rma,state:0 msgid "Draft" msgstr "" @@ -485,15 +515,6 @@ msgstr "" msgid "Draft RMA" msgstr "" -#. module: rma -#: code:addons/rma/models/rma.py:1098 -#, python-format -msgid "E-mail subject: %s\n" -"\n" -"E-mail body:\n" -"%s" -msgstr "" - #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_team_view_form msgid "Email" @@ -505,7 +526,7 @@ msgid "Email Alias" msgstr "" #. module: rma -#: code:addons/rma/wizard/rma_split.py:63 +#: code:addons/rma/wizard/rma_split.py:0 #, python-format msgid "Extracted RMA" msgstr "" @@ -549,59 +570,71 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_parent_thread_id -msgid "ID of the parent record holding the alias (example: project holding the task creation alias)" +msgid "" +"ID of the parent record holding the alias (example: project holding the task" +" creation alias)" msgstr "" #. module: rma -#: model:ir.model.fields,help:rma.field_rma__message_unread -#: model:ir.model.fields,help:rma.field_rma_team__message_unread -msgid "If checked new messages require your attention." +#: model:ir.model.fields,field_description:rma.field_rma__activity_exception_icon +msgid "Icon" +msgstr "" + +#. module: rma +#: model:ir.model.fields,help:rma.field_rma__activity_exception_icon +msgid "Icon to indicate an exception activity." msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_needaction +#: model:ir.model.fields,help:rma.field_rma__message_unread #: model:ir.model.fields,help:rma.field_rma_team__message_needaction +#: model:ir.model.fields,help:rma.field_rma_team__message_unread msgid "If checked, new messages require your attention." msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_has_error +#: model:ir.model.fields,help:rma.field_rma__message_has_sms_error #: model:ir.model.fields,help:rma.field_rma_team__message_has_error +#: model:ir.model.fields,help:rma.field_rma_team__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__active -msgid "If the active field is set to false, it will allow you to hide the RMA Team without removing it." +msgid "" +"If the active field is set to false, it will allow you to hide the RMA Team " +"without removing it." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1102 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "Incoming e-mail" msgstr "" -#. module: rma -#: model:ir.model,name:rma.model_account_invoice -msgid "Invoice" -msgstr "" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__partner_invoice_id msgid "Invoice Address" msgstr "" -#. module: rma -#: model:ir.model,name:rma.model_account_invoice_line -msgid "Invoice Line" -msgstr "" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_is_follower #: model:ir.model.fields,field_description:rma.field_rma_team__message_is_follower msgid "Is Follower" msgstr "" +#. module: rma +#: model:ir.model,name:rma.model_account_move +msgid "Journal Entries" +msgstr "" + +#. module: rma +#: model:ir.model,name:rma.model_account_move_line +msgid "Journal Item" +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 @@ -645,7 +678,7 @@ msgid "Lock" msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__locked msgid "Locked" msgstr "" @@ -678,7 +711,7 @@ msgid "Messages" msgstr "" #. module: rma -#: code:addons/rma/controllers/main.py:43 +#: code:addons/rma/controllers/main.py:0 #: model:ir.model.fields,field_description:rma.field_rma__name #: model:ir.model.fields,field_description:rma.field_rma_operation__name #: model:ir.model.fields,field_description:rma.field_rma_team__name @@ -687,9 +720,8 @@ msgid "Name" msgstr "" #. module: rma -#: 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:0 code:addons/rma/models/rma.py:0 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "New" msgstr "" @@ -710,24 +742,24 @@ msgid "Next Activity Type" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:772 +#: code:addons/rma/models/rma.py:0 #, 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:0 #, python-format msgid "None of the selected RMAs can perform a return." msgstr "" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__1 msgid "Normal" msgstr "" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__0 msgid "Not urgent" msgstr "" @@ -740,7 +772,7 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_has_error_counter #: model:ir.model.fields,field_description:rma.field_rma_team__message_has_error_counter -msgid "Number of error" +msgid "Number of errors" msgstr "" #. module: rma @@ -763,7 +795,10 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_force_thread_id -msgid "Optional ID of a thread (record) to which all incoming messages will be attached, even if they did not reply to it. If set, this will disable the creation of new records completely." +msgid "" +"Optional ID of a thread (record) to which all incoming messages will be " +"attached, even if they did not reply to it. If set, this will disable the " +"creation of new records completely." msgstr "" #. module: rma @@ -786,11 +821,6 @@ msgstr "" msgid "Other Information" msgstr "" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Overdue" -msgstr "" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_team__alias_user_id msgid "Owner" @@ -808,7 +838,10 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_parent_model_id -msgid "Parent model holding the alias. The model holding the alias reference is not necessarily the model given by alias_model_id (example: project (parent_model) and task (model))" +msgid "" +"Parent model holding the alias. The model holding the alias reference is not" +" necessarily the model given by alias_model_id (example: project " +"(parent_model) and task (model))" msgstr "" #. module: rma @@ -816,18 +849,13 @@ msgstr "" msgid "Partner" msgstr "" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Planned" -msgstr "" - #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_contact -msgid "Policy to post a message on the document using the mailgateway.\n" +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" -"" msgstr "" #. module: rma @@ -868,8 +896,8 @@ msgid "Quantity" msgstr "" #. module: rma -#: code:addons/rma/wizard/rma_delivery.py:49 -#: sql_constraint:rma.split.wizard:0 +#: code:addons/rma/wizard/rma_delivery.py:0 +#: model:ir.model.constraint,message:rma.constraint_rma_split_wizard_check_product_uom_qty_positive #, python-format msgid "Quantity must be greater than 0." msgstr "" @@ -880,9 +908,11 @@ msgid "Quantity to extract" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:805 +#: code:addons/rma/models/rma.py:0 #, 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 "" #. module: rma @@ -893,7 +923,7 @@ msgstr "" #. module: rma #: model:ir.actions.act_window,name:rma.rma_action #: model:ir.model,name:rma.model_rma -#: model:ir.model.fields,field_description:rma.field_account_invoice_line__rma_id +#: model:ir.model.fields,field_description:rma.field_account_move_line__rma_id #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__rma_id #: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma #: model:ir.module.category,name:rma.rma_module_category @@ -910,7 +940,7 @@ msgid "RMA #" msgstr "" #. module: rma -#: code:addons/rma/models/res_company.py:18 +#: code:addons/rma/models/res_company.py:0 #, python-format msgid "RMA Code" msgstr "" @@ -926,7 +956,7 @@ msgid "RMA Deadline" msgstr "" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:82 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "RMA Delivery Orders" msgstr "" @@ -964,7 +994,7 @@ msgid "RMA Out Type" msgstr "" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:73 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "RMA Receipts" msgstr "" @@ -1053,8 +1083,8 @@ msgid "Receipt" msgstr "" #. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma__state__received #: model_terms:ir.ui.view,arch_db:rma.rma_view_search -#: selection:rma,state:0 msgid "Received" msgstr "" @@ -1074,7 +1104,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:0 #: 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 @@ -1093,7 +1123,7 @@ msgid "Refund line" msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__refunded msgid "Refunded" msgstr "" @@ -1113,8 +1143,8 @@ msgid "Repair" msgstr "" #. module: rma +#: model:ir.model.fields.selection,name:rma.selection__rma_delivery_wizard__type__replace #: model_terms:ir.ui.view,arch_db:rma.rma_view_form -#: selection:rma.delivery.wizard,type:0 #: model:rma.operation,name:rma.rma_operation_replace msgid "Replace" msgstr "" @@ -1125,20 +1155,27 @@ msgid "Replace Product" msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__replaced msgid "Replaced" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1011 +#: code:addons/rma/models/rma.py:0 #, python-format -msgid "Replacement: Move %s (Picking %s) has been created." +msgid "" +"Replacement: Move %s (Picking %s) has been created." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1022 +#: code:addons/rma/models/rma.py:0 #, python-format -msgid "Replacement:
Product %s
Quantity %f %s
This replacement did not create a new move, but one of the previously created moves was updated with this data." +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 "" #. module: rma @@ -1152,7 +1189,7 @@ msgid "Requested operation" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:736 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "Required field(s):%s" msgstr "" @@ -1175,19 +1212,21 @@ msgstr "" #. module: rma #: model:ir.actions.act_window,name:rma.rma_delivery_wizard_action +#: model:ir.model.fields.selection,name:rma.selection__rma_delivery_wizard__type__return #: model_terms:ir.ui.view,arch_db:rma.rma_view_form -#: selection:rma.delivery.wizard,type:0 msgid "Return to customer" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:972 +#: code:addons/rma/models/rma.py:0 #, python-format -msgid "Return: %s has been created." +msgid "" +"Return: %s has been created." msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__returned msgid "Returned" msgstr "" @@ -1196,6 +1235,12 @@ msgstr "" msgid "Rma Count" msgstr "" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__message_has_sms_error +#: model:ir.model.fields,field_description:rma.field_rma_team__message_has_sms_error +msgid "SMS Delivery error" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__scheduled_date msgid "Scheduled Date" @@ -1227,13 +1272,13 @@ msgid "Sequence" msgstr "" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:48 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "Sequence RMA in" msgstr "" #. module: rma -#: code:addons/rma/models/stock_warehouse.py:53 +#: code:addons/rma/models/stock_warehouse.py:0 #, python-format msgid "Sequence RMA out" msgstr "" @@ -1265,9 +1310,11 @@ msgid "Split RMA" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:889 +#: code:addons/rma/models/rma.py:0 #, python-format -msgid "Split: %s has been created." +msgid "" +"Split: %s has been" +" created." msgstr "" #. module: rma @@ -1277,7 +1324,7 @@ msgid "State" msgstr "" #. module: rma -#: code:addons/rma/controllers/main.py:44 +#: code:addons/rma/controllers/main.py:0 #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #, python-format msgid "Status" @@ -1285,7 +1332,8 @@ msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma__activity_state -msgid "Status based on activities\n" +msgid "" +"Status based on activities\n" "Overdue: Due date is already passed\n" "Today: Activity date is today\n" "Planned: Future activities." @@ -1313,57 +1361,70 @@ msgid "Team Members" msgstr "" #. module: rma -#: sql_constraint:rma.operation:0 +#: model:ir.model.constraint,message:rma.constraint_rma_operation_name_uniq msgid "That operation name already exists !" msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_model_id -msgid "The model (Odoo Document Kind) to which this alias corresponds. Any incoming email that does not reply to an existing record will cause the creation of a new record of this model (e.g. a Project Task)" +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)" msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_name -msgid "The name of the email alias, e.g. 'jobs' if you want to catch emails for " +msgid "" +"The name of the email alias, e.g. 'jobs' if you want to catch emails for " +"" msgstr "" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_user_id -msgid "The owner of records created upon receiving emails on this alias. If this field is not set the system will attempt to find the right owner based on the sender (From) address, or will use the Administrator account if no system user is found for that address." +msgid "" +"The owner of records created upon receiving emails on this alias. If this " +"field is not set the system will attempt to find the right owner based on " +"the sender (From) address, or will use the Administrator account if no " +"system user is found for that address." msgstr "" #. module: rma -#: code:addons/rma/models/stock_move.py:64 +#: code:addons/rma/models/stock_move.py:0 #, python-format -msgid "The quantity done for the product '%s' must be equal to its initial demand because the stock move is linked to an RMA (%s)." +msgid "" +"The quantity done for the product '%s' must be equal to its initial demand " +"because the stock move is linked to an RMA (%s)." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:793 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "The quantity to return is greater than remaining quantity." msgstr "" #. module: rma -#: code:addons/rma/models/account_invoice.py:22 +#: code:addons/rma/models/account_move.py:0 #, python-format -msgid "There is at least one invoice lines whose quantity is less than the quantity specified in its linked RMA." +msgid "" +"There is at least one invoice lines whose quantity is less than the quantity" +" specified in its linked RMA." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:782 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "This RMA cannot be split." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:769 +#: code:addons/rma/models/rma.py:0 #, 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:0 #, python-format msgid "This RMA cannot perform a return." msgstr "" @@ -1374,11 +1435,6 @@ msgstr "" msgid "To Refund" msgstr "" -#. module: rma -#: selection:rma,activity_state:0 -msgid "Today" -msgstr "" - #. module: rma #: model:ir.model,name:rma.model_stock_picking msgid "Transfer" @@ -1394,6 +1450,11 @@ msgstr "" msgid "Type of Operation" msgstr "" +#. module: rma +#: model:ir.model.fields,help:rma.field_rma__activity_exception_decoration +msgid "Type of the exception activity on record." +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search msgid "Unassigned RMAs" @@ -1433,7 +1494,7 @@ msgid "UoM" msgstr "" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__2 msgid "Urgent" msgstr "" @@ -1453,17 +1514,17 @@ msgid "Users" msgstr "" #. module: rma -#: selection:rma,priority:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__priority__3 msgid "Very Urgent" msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__waiting_replacement msgid "Waiting for replacement" msgstr "" #. module: rma -#: selection:rma,state:0 +#: model:ir.model.fields.selection,name:rma.selection__rma__state__waiting_return msgid "Waiting for return" msgstr "" @@ -1487,20 +1548,28 @@ msgid "Website communication history" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:516 +#: code:addons/rma/models/rma.py:0 #, python-format msgid "You cannot delete RMAs that are not in draft state" msgstr "" #. module: rma -#: code:addons/rma/wizard/stock_picking_return.py:55 +#: code:addons/rma/wizard/stock_picking_return.py:0 #, python-format -msgid "You must specify the 'Customer' in the 'Stock Picking' from which RMAs will be created" +msgid "" +"You must specify the 'Customer' in the 'Stock Picking' from which RMAs will " +"be created" +msgstr "" + +#. module: rma +#: model:ir.actions.report,print_report_name:rma.report_rma_action +msgid "object._get_report_base_filename()" msgstr "" #. module: rma #: model:res.groups,comment:rma.rma_group_user_all -msgid "the user will have access to all records of everyone in the RMA application." +msgid "" +"the user will have access to all records of everyone in the RMA application." msgstr "" #. module: rma @@ -1510,6 +1579,7 @@ msgstr "" #. module: rma #: model:res.groups,comment:rma.rma_group_manager -msgid "the user will have an access to the RMA configuration as well as statistic reports." +msgid "" +"the user will have an access to the RMA configuration as well as statistic " +"reports." msgstr "" - diff --git a/rma/migrations/12.0.2.0.0/post-migration.py b/rma/migrations/12.0.2.0.0/post-migration.py deleted file mode 100644 index 6056dcab..00000000 --- a/rma/migrations/12.0.2.0.0/post-migration.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2020 Tecnativa - David Vidal -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - # Convert Text description field to Html - openupgrade.convert_field_to_html(env.cr, "rma", "description", "description") diff --git a/rma/models/__init__.py b/rma/models/__init__.py index 134da114..f3c5b7de 100644 --- a/rma/models/__init__.py +++ b/rma/models/__init__.py @@ -1,6 +1,6 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from . import account_invoice +from . import account_move from . import rma from . import rma_operation from . import rma_team diff --git a/rma/models/account_invoice.py b/rma/models/account_move.py similarity index 84% rename from rma/models/account_invoice.py rename to rma/models/account_move.py index 823a4989..3bd81e6c 100644 --- a/rma/models/account_invoice.py +++ b/rma/models/account_move.py @@ -6,10 +6,10 @@ from odoo.exceptions import ValidationError from odoo.tools import float_compare -class AccountInvoice(models.Model): - _inherit = "account.invoice" +class AccountMove(models.Model): + _inherit = "account.move" - def action_invoice_open(self): + def post(self): """ Avoids to validate a refund with less quantity of product than quantity in the linked RMA. """ @@ -33,7 +33,7 @@ class AccountInvoice(models.Model): "less than the quantity specified in its linked RMA." ) ) - return super().action_invoice_open() + return super().post() def unlink(self): rma = self.mapped("invoice_line_ids.rma_id") @@ -41,7 +41,7 @@ class AccountInvoice(models.Model): return super().unlink() -class AccountInvoiceLine(models.Model): - _inherit = "account.invoice.line" +class AccountMoveLine(models.Model): + _inherit = "account.move.line" rma_id = fields.Many2one(comodel_name="rma", string="RMA",) diff --git a/rma/models/res_partner.py b/rma/models/res_partner.py index d26f3845..45ff8f1b 100644 --- a/rma/models/res_partner.py +++ b/rma/models/res_partner.py @@ -16,9 +16,7 @@ class ResPartner(models.Model): rma_data = self.env["rma"].read_group( [("partner_id", "in", self.ids)], ["partner_id"], ["partner_id"] ) - mapped_data = { - r["partner_id"][0]: r["partner_id_count"] for r in rma_data - } + mapped_data = {r["partner_id"][0]: r["partner_id_count"] for r in rma_data} for record in self: record.rma_count = mapped_data.get(record.id, 0) diff --git a/rma/models/rma.py b/rma/models/rma.py index 4c6251a1..78b19acb 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -8,7 +8,6 @@ from odoo.exceptions import ValidationError from odoo.tests import Form from odoo.tools import html2plaintext -import odoo.addons.decimal_precision as dp from odoo.addons.stock.models.stock_move import PROCUREMENT_PRIORITIES @@ -34,7 +33,7 @@ class Rma(models.Model): ) origin = fields.Char( string="Source Document", - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)],}, + states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, help="Reference of the document that generated this RMA.", ) date = fields.Datetime( @@ -45,24 +44,26 @@ class Rma(models.Model): states={"draft": [("readonly", False)]}, ) deadline = fields.Date( - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)],}, + states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, ) user_id = fields.Many2one( comodel_name="res.users", string="Responsible", - track_visibility="always", - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)],}, + index=True, + default=lambda self: self.env.user, + tracking=True, + states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, ) team_id = fields.Many2one( comodel_name="rma.team", string="RMA team", index=True, - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)],}, + states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, ) company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)],}, + default=lambda self: self.env.company, + states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, ) partner_id = fields.Many2one( string="Customer", @@ -70,14 +71,14 @@ class Rma(models.Model): readonly=True, states={"draft": [("readonly", False)]}, index=True, - track_visibility="always", + tracking=True, ) partner_invoice_id = fields.Many2one( string="Invoice Address", comodel_name="res.partner", readonly=True, states={"draft": [("readonly", False)]}, - domain=[("customer", "=", True)], + domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", help="Refund address for current RMA.", ) commercial_partner_id = fields.Many2one( @@ -111,7 +112,7 @@ class Rma(models.Model): string="Quantity", required=True, default=1.0, - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", readonly=True, states={"draft": [("readonly", False)]}, ) @@ -158,10 +159,10 @@ class Rma(models.Model): ], default="draft", copy=False, - track_visibility="onchange", + tracking=True, ) description = fields.Html( - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)],}, + states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, ) # Reception fields location_id = fields.Many2one( @@ -178,10 +179,10 @@ class Rma(models.Model): ) # Refund fields refund_id = fields.Many2one( - comodel_name="account.invoice", string="Refund", readonly=True, copy=False, + comodel_name="account.move", string="Refund", readonly=True, copy=False, ) refund_line_id = fields.Many2one( - comodel_name="account.invoice.line", + comodel_name="account.move.line", string="Refund line", readonly=True, copy=False, @@ -200,26 +201,27 @@ class Rma(models.Model): ) delivered_qty = fields.Float( string="Delivered qty", - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", compute="_compute_delivered_qty", store=True, ) delivered_qty_done = fields.Float( string="Delivered qty done", - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", compute="_compute_delivered_qty", + compute_sudo=True, ) 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",) remaining_qty = fields.Float( string="Remaining delivered qty", - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", compute="_compute_remaining_qty", ) remaining_qty_to_done = fields.Float( string="Remaining delivered qty to done", - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", compute="_compute_remaining_qty", ) # Split fields @@ -457,7 +459,7 @@ class Rma(models.Model): and not self.location_id ): # If this condition is True, it is because a picking is not set - company = self.company_id or self.env.user.company_id + company = self.company_id or self.env.company warehouse = self.env["stock.warehouse"].search( [("company_id", "=", company.id)], limit=1 ) @@ -465,19 +467,21 @@ class Rma(models.Model): return {"domain": {"product_uom": domain_product_uom}} # CRUD methods (ORM overrides) - @api.model - def create(self, vals): - if vals.get("name", _("New")) == _("New"): - ir_sequence = self.env["ir.sequence"] - if "company_id" in vals: - ir_sequence = ir_sequence.with_context(force_company=vals["company_id"]) - vals["name"] = ir_sequence.next_by_code("rma") - # Assign a default team_id which will be the first in the sequence - if "team_id" not in vals: - vals["team_id"] = self.env["rma.team"].search([], limit=1).id - return super().create(vals) + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + if vals.get("name", _("New")) == _("New"): + ir_sequence = self.env["ir.sequence"] + if "company_id" in vals: + ir_sequence = ir_sequence.with_context( + force_company=vals["company_id"] + ) + vals["name"] = ir_sequence.next_by_code("rma") + # Assign a default team_id which will be the first in the sequence + if "team_id" not in vals: + vals["team_id"] = self.env["rma.team"].search([], limit=1).id + return super().create(vals_list) - @api.multi def copy(self, default=None): team = super().copy(default) for follower in self.message_follower_ids: @@ -529,9 +533,7 @@ class Rma(models.Model): reception_move = self._create_receptions_from_picking() else: reception_move = self._create_receptions_from_product() - self.write( - {"reception_move_id": reception_move.id, "state": "confirmed",} - ) + self.write({"reception_move_id": reception_move.id, "state": "confirmed"}) if self.partner_id not in self.message_partner_ids: self.message_subscribe([self.partner_id.id]) @@ -547,24 +549,24 @@ class Rma(models.Model): for rmas in group_dict.values(): origin = ", ".join(rmas.mapped("name")) invoice_form = Form( - self.env["account.invoice"].with_context( + self.env["account.move"].with_context( default_type="out_refund", company_id=rmas[0].company_id.id, ), - "account.invoice_form", + "account.view_move_form", ) rmas[0]._prepare_refund(invoice_form, origin) refund = invoice_form.save() for rma in rmas: + # For each iteration the Form is edited, a new invoice line + # is added and then saved. This is to generate the other + # lines of the accounting entry and to specify the associated + # RMA to that new invoice line. + invoice_form = Form(refund) with invoice_form.invoice_line_ids.new() as line_form: rma._prepare_refund_line(line_form) - # rma_id is not present in the form view, so we need to get - # the 'values to save' to add the rma id and use the - # create method instead of save the form. We also need - # the new refund line id to be linked to the rma. - refund_vals = invoice_form._values_to_save(all_fields=True) - line_vals = refund_vals["invoice_line_ids"][-1][2] - line_vals.update(invoice_id=refund.id, rma_id=rma.id) - line = self.env["account.invoice.line"].create(line_vals) + refund = invoice_form.save() + line = refund.invoice_line_ids.filtered(lambda r: not r.rma_id) + line.rma_id = rma.id rma.write( { "refund_line_id": line.id, @@ -572,6 +574,7 @@ class Rma(models.Model): "state": "refunded", } ) + refund.invoice_origin = origin refund.message_post_with_view( "mail.message_origin_link", values={"self": refund, "origin": rmas}, @@ -683,8 +686,8 @@ class Rma(models.Model): "type": "ir.actions.act_window", "view_type": "form", "view_mode": "form", - "res_model": "account.invoice", - "views": [(self.env.ref("account.invoice_form").id, "form")], + "res_model": "account.move", + "views": [(self.env.ref("account.view_move_form").id, "form")], "res_id": self.refund_id.id, } @@ -800,12 +803,15 @@ class Rma(models.Model): self.ensure_one() create_vals = {} if self.location_id: - create_vals["location_id"] = self.location_id.id + create_vals.update( + location_id=self.location_id.id, picking_id=self.picking_id.id, + ) return_wizard = ( self.env["stock.return.picking"] .with_context(active_id=self.picking_id.id, active_ids=self.picking_id.ids,) .create(create_vals) ) + return_wizard._onchange_picking_id() return_wizard.product_return_moves.filtered( lambda r: r.move_id != self.move_id ).unlink() @@ -843,7 +849,6 @@ class Rma(models.Model): return picking.move_lines def _prepare_picking(self, picking_form): - picking_form.company_id = self.company_id picking_form.origin = self.name picking_form.partner_id = self.partner_id picking_form.location_dest_id = self.location_id @@ -898,9 +903,7 @@ class Rma(models.Model): rma.action_refund """ self.ensure_one() - invoice_form.company_id = self.company_id invoice_form.partner_id = self.partner_invoice_id - invoice_form.origin = origin def _prepare_refund_line(self, line_form): """ Hook method for preparing a refund line Form. @@ -914,7 +917,7 @@ class Rma(models.Model): self.ensure_one() line_form.product_id = self.product_id line_form.quantity = self.product_uom_qty - line_form.uom_id = self.product_uom + line_form.product_uom_id = self.product_uom line_form.price_unit = self._get_refund_line_price_unit() def _get_refund_line_price_unit(self): @@ -928,7 +931,8 @@ class Rma(models.Model): self._ensure_can_be_returned() self._ensure_qty_to_return(qty, uom) group_dict = {} - for record in self.filtered("can_be_returned"): + rmas_to_return = self.filtered("can_be_returned") + for record in rmas_to_return: key = (record.partner_id.id, record.company_id.id, record.warehouse_id) group_dict.setdefault(key, self.env["rma"]) group_dict[key] |= record @@ -972,11 +976,10 @@ class Rma(models.Model): values={"self": picking, "origin": rmas}, subtype_id=self.env.ref("mail.mt_note").id, ) - self.write({"state": "waiting_return"}) + rmas_to_return.write({"state": "waiting_return"}) def _prepare_returning_picking(self, picking_form, origin=None): picking_form.picking_type_id = self.warehouse_id.rma_out_type_id - picking_form.company_id = self.company_id picking_form.origin = origin or self.name picking_form.partner_id = self.partner_id @@ -1052,15 +1055,18 @@ class Rma(models.Model): values = self._prepare_procurement_values( self.procurement_group_id, scheduled_date, warehouse ) - self.env["procurement.group"].run( + procurement = self.env["procurement.group"].Procurement( product, qty, uom, self.partner_id.property_stock_customer, self.product_id.display_name, self.procurement_group_id.name, + self.company_id, values, ) + self.env["procurement.group"].run([procurement]) + return True def _prepare_procurement_values( self, group_id, scheduled_date, warehouse, @@ -1077,11 +1083,11 @@ class Rma(models.Model): } # Mail business methods - def _track_subtype(self, init_values): - self.ensure_one() - if "state" in init_values and self.state == "draft": - return "rma.mt_rma_draft" - return super()._track_subtype(init_values) + def _creation_subtype(self): + if self.state in ("draft", "confirmed"): + return self.env.ref("rma.mt_rma_draft") + else: + return super()._creation_subtype() def message_new(self, msg_dict, custom_values=None): """Extract the needed values from an incoming rma emails data-set @@ -1091,7 +1097,10 @@ class Rma(models.Model): custom_values = {} subject = msg_dict.get("subject", "") body = html2plaintext(msg_dict.get("body", "")) - desc = _("E-mail subject: %s\n\nE-mail body:\n%s") % (subject, body) + desc = _("E-mail subject: %s

E-mail body:
%s") % ( + subject, + body, + ) defaults = { "description": desc, "name": _("New"), diff --git a/rma/models/rma_team.py b/rma/models/rma_team.py index 11faca12..4bb2e7d7 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 _, api, fields, models +from odoo import _, fields, models class RmaTeam(models.Model): @@ -20,7 +20,7 @@ class RmaTeam(models.Model): company_id = fields.Many2one( comodel_name="res.company", string="Company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, ) user_id = fields.Many2one( comodel_name="res.users", @@ -32,7 +32,6 @@ class RmaTeam(models.Model): comodel_name="res.users", inverse_name="rma_team_id", string="Team Members", ) - @api.multi def copy(self, default=None): self.ensure_one() if default is None: diff --git a/rma/models/stock_move.py b/rma/models/stock_move.py index 3912b122..a1b702c8 100644 --- a/rma/models/stock_move.py +++ b/rma/models/stock_move.py @@ -43,7 +43,7 @@ class StockMove(models.Model): cancelled_moves.mapped("rma_id").update_replaced_state() return res - def _action_done(self): + def _action_done(self, cancel_backorder=False): """ Avoids to validate stock.move with less quantity than the quantity in the linked receiver RMA. It also set the appropriated linked RMA to 'received' or 'delivered'. diff --git a/rma/models/stock_picking.py b/rma/models/stock_picking.py index 449e1fe3..e343ae3a 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 api, fields, models +from odoo import fields, models class StockPicking(models.Model): @@ -13,7 +13,6 @@ 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"): diff --git a/rma/models/stock_warehouse.py b/rma/models/stock_warehouse.py index 86fc2cf0..0b1c3091 100644 --- a/rma/models/stock_warehouse.py +++ b/rma/models/stock_warehouse.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 StockWarehouse(models.Model): @@ -23,21 +23,33 @@ class StockWarehouse(models.Model): ) rma_loc_id = fields.Many2one(comodel_name="stock.location", string="RMA Location",) - def _get_locations_values(self, vals): - values = super()._get_locations_values(vals) - values.update( - { - "rma_loc_id": { - "name": "RMA", - "active": True, - "return_location": True, - "usage": "internal", - "company_id": vals.get("company_id", self.company_id.id), - "location_id": self.view_location_id.id, - }, - } - ) - return values + @api.model_create_multi + def create(self, vals_list): + """ To create an RMA location and link it with a new warehouse, + this method is overridden instead of '_get_locations_values' + method because the locations that are created with the + values ​​returned by that method are forced to be children + of view_location_id, and we don't want that. + """ + res = super().create(vals_list) + stock_location = self.env["stock.location"] + for record in res: + rma_location_vals = record._get_rma_location_values() + record.rma_loc_id = stock_location.create(rma_location_vals).id + return res + + def _get_rma_location_values(self): + """ this method is intended to be used by 'create' method + to create a new RMA location to be linked to a new warehouse. + """ + return { + "name": self.view_location_id.name, + "active": True, + "return_location": True, + "usage": "internal", + "company_id": self.company_id.id, + "location_id": self.env.ref("rma.stock_location_rma").id, + } def _get_sequence_values(self): values = super()._get_sequence_values() @@ -79,6 +91,8 @@ class StockWarehouse(models.Model): "default_location_src_id": False, "default_location_dest_id": self.rma_loc_id.id, "sequence": max_sequence + 1, + "sequence_code": "RMA/IN", + "company_id": self.company_id.id, }, "rma_out_type_id": { "name": _("RMA Delivery Orders"), @@ -88,6 +102,8 @@ class StockWarehouse(models.Model): "default_location_src_id": self.rma_loc_id.id, "default_location_dest_id": False, "sequence": max_sequence + 2, + "sequence_code": "RMA/OUT", + "company_id": self.company_id.id, }, } ) @@ -97,8 +113,8 @@ class StockWarehouse(models.Model): data = super()._get_picking_type_update_values() data.update( { - "rma_in_type_id": {"default_location_dest_id": self.rma_loc_id.id,}, - "rma_out_type_id": {"default_location_src_id": self.rma_loc_id.id,}, + "rma_in_type_id": {"default_location_dest_id": self.rma_loc_id.id}, + "rma_out_type_id": {"default_location_src_id": self.rma_loc_id.id}, } ) return data diff --git a/rma/security/rma_security.xml b/rma/security/rma_security.xml index 81385aa1..e7c42289 100644 --- a/rma/security/rma_security.xml +++ b/rma/security/rma_security.xml @@ -69,7 +69,7 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + >['|',('company_id','=',False),('company_id','in',company_ids)] RMA team multi-company @@ -77,7 +77,7 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + >['|',('company_id','=',False),('company_id','in',company_ids)] diff --git a/rma/static/description/index.html b/rma/static/description/index.html index 88523ce3..f99fdcde 100644 --- a/rma/static/description/index.html +++ b/rma/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/rma Translate me on Weblate Try me on Runbot

+

Production/Stable License: AGPL-3 OCA/rma Translate me on Weblate Try me on Runbot

This module allows you to manage Return Merchandise Authorization (RMA). RMA documents can be created from scratch, from a delivery order or from an incoming email. Product receptions and returning delivery operations @@ -477,7 +477,7 @@ the product of that move is.

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -508,7 +508,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

ernestotejeda

-

This module is part of the OCA/rma project on GitHub.

+

This module is part of the OCA/rma project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/rma/tests/test_rma.py b/rma/tests/test_rma.py index db80078b..b917f269 100644 --- a/rma/tests/test_rma.py +++ b/rma/tests/test_rma.py @@ -2,9 +2,10 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.exceptions import UserError, ValidationError -from odoo.tests import Form, SavepointCase +from odoo.tests import Form, SavepointCase, tagged +@tagged("post_install", "-at_install") class TestRma(SavepointCase): @classmethod def setUpClass(cls): @@ -16,27 +17,11 @@ class TestRma(SavepointCase): [("company_id", "=", cls.company.id)], limit=1 ) cls.rma_loc = cls.warehouse_company.rma_loc_id - account_pay = cls.env["account.account"].create( - { - "code": "X1111", - "name": "Creditors - (test)", - "user_type_id": cls.env.ref("account.data_account_type_payable").id, - "reconcile": True, - } - ) - cls.journal = cls.env["account.journal"].create( - { - "name": "sale_0", - "code": "SALE0", - "type": "sale", - "default_debit_account_id": account_pay.id, - } - ) cls.product = cls.product_product.create( - {"name": "Product test 1", "type": "product",} + {"name": "Product test 1", "type": "product"} ) account_type = cls.env["account.account.type"].create( - {"name": "RCV type", "type": "receivable",} + {"name": "RCV type", "type": "receivable", "internal_group": "income"} ) cls.account_receiv = cls.env["account.account"].create( { @@ -116,7 +101,6 @@ class TestRma(SavepointCase): ), view="stock.view_picking_form", ) - picking_form.company_id = self.company picking_form.partner_id = self.partner with picking_form.move_ids_without_package.new() as move: move.product_id = self.product @@ -148,7 +132,7 @@ class TestRma(SavepointCase): } ) product_2 = self.product_product.create( - {"name": "Product test 2", "type": "product", "uom_id": uom_ten.id,} + {"name": "Product test 2", "type": "product", "uom_id": uom_ten.id} ) outgoing_picking_type = self.env["stock.picking.type"].search( [ @@ -165,8 +149,6 @@ class TestRma(SavepointCase): ), view="stock.view_picking_form", ) - picking_form.company_id = self.company - picking_form.partner_id = self.partner picking_form.partner_id = self.partner with picking_form.move_ids_without_package.new() as move: move.product_id = product_2 @@ -275,16 +257,20 @@ class TestRma(SavepointCase): self.assertEqual(rma.refund_id.state, "draft") 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.uom_id, rma.product_uom) + self.assertEqual(rma.refund_line_id.product_uom_id, rma.product_uom) self.assertEqual(rma.state, "refunded") self.assertFalse(rma.can_be_refunded) self.assertFalse(rma.can_be_returned) self.assertFalse(rma.can_be_replaced) - rma.refund_line_id.quantity = 9 + with Form(rma.refund_line_id.move_id) as refund_form: + with refund_form.invoice_line_ids.edit(0) as refund_line: + refund_line.quantity = 9 with self.assertRaises(ValidationError): - rma.refund_id.action_invoice_open() - rma.refund_line_id.quantity = 10 - rma.refund_id.action_invoice_open() + rma.refund_id.post() + with Form(rma.refund_line_id.move_id) as refund_form: + with refund_form.invoice_line_ids.edit(0) as refund_line: + refund_line.quantity = 10 + rma.refund_id.post() self.assertFalse(rma.can_be_refunded) self.assertFalse(rma.can_be_returned) self.assertFalse(rma.can_be_replaced) @@ -354,14 +340,18 @@ class TestRma(SavepointCase): for rma in all_rmas: self.assertEqual(rma.product_id, rma.refund_line_id.product_id) self.assertEqual(rma.product_uom_qty, rma.refund_line_id.quantity) - self.assertEqual(rma.product_uom, rma.refund_line_id.uom_id) + self.assertEqual(rma.product_uom, rma.refund_line_id.product_uom_id) # Less quantity -> error on confirm - rma_2.refund_line_id.quantity = 14 + with Form(rma_2.refund_line_id.move_id) as refund_form: + with refund_form.invoice_line_ids.edit(1) as refund_line: + refund_line.quantity = 14 with self.assertRaises(ValidationError): - refund_1.action_invoice_open() - rma_2.refund_line_id.quantity = 15 - refund_1.action_invoice_open() - refund_2.action_invoice_open() + refund_1.post() + with Form(rma_2.refund_line_id.move_id) as refund_form: + with refund_form.invoice_line_ids.edit(1) as refund_line: + refund_line.quantity = 15 + refund_1.post() + refund_2.post() def test_replace(self): # Create, confirm and receive an RMA @@ -573,8 +563,9 @@ class TestRma(SavepointCase): return_wizard = ( self.env["stock.return.picking"] .with_context(active_id=origin_delivery.id, active_ids=origin_delivery.ids,) - .create({"create_rma": True}) + .create({"create_rma": True, "picking_id": origin_delivery.id}) ) + return_wizard._onchange_picking_id() picking_action = return_wizard.create_returns() # Each origin move is linked to a different RMA origin_moves = origin_delivery.move_lines @@ -657,7 +648,11 @@ class TestRma(SavepointCase): def test_rma_picking_type_default_values(self): warehouse = self.env["stock.warehouse"].create( - {"name": "Stock - RMA Test", "code": "SRT",} + {"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) + + def test_quantities_on_hand(self): + rma = self._create_confirm_receive(self.partner, self.product, 10, self.rma_loc) + self.assertEqual(rma.product_id.qty_available, 0) diff --git a/rma/views/rma_portal_templates.xml b/rma/views/rma_portal_templates.xml index 30b404fa..ef0ea47d 100644 --- a/rma/views/rma_portal_templates.xml +++ b/rma/views/rma_portal_templates.xml @@ -28,7 +28,7 @@ priority="30" > - + RMA Orders @@ -157,9 +157,9 @@
Contact
Contact - +
Date:
RMA team rma.team - form tree,form

diff --git a/rma/views/rma_views.xml b/rma/views/rma_views.xml index a9434bc3..f270b8da 100644 --- a/rma/views/rma_views.xml +++ b/rma/views/rma_views.xml @@ -352,7 +352,6 @@ RMA rma - form tree,form,pivot,calendar,activity {"search_default_user_id": uid} diff --git a/rma/wizard/rma_delivery.py b/rma/wizard/rma_delivery.py index 21ebaae0..ae7c0f42 100644 --- a/rma/wizard/rma_delivery.py +++ b/rma/wizard/rma_delivery.py @@ -4,8 +4,6 @@ from odoo import _, api, fields, models from odoo.exceptions import ValidationError -import odoo.addons.decimal_precision as dp - class RmaReDeliveryWizard(models.TransientModel): _name = "rma.delivery.wizard" @@ -13,7 +11,7 @@ class RmaReDeliveryWizard(models.TransientModel): rma_count = fields.Integer() type = fields.Selection( - selection=[("replace", "Replace"), ("return", "Return to customer"),], + selection=[("replace", "Replace"), ("return", "Return to customer")], string="Type", required=True, ) @@ -21,10 +19,10 @@ class RmaReDeliveryWizard(models.TransientModel): comodel_name="product.product", string="Replace Product", ) product_uom_qty = fields.Float( - string="Product qty", digits=dp.get_precision("Product Unit of Measure"), + string="Product qty", digits="Product Unit of Measure", ) - product_uom = fields.Many2one(comodel_name="uom.uom", string="Unit of measure",) - scheduled_date = fields.Datetime(required=True, default=fields.Datetime.now(),) + product_uom = fields.Many2one(comodel_name="uom.uom", string="Unit of measure") + scheduled_date = fields.Datetime(required=True, default=fields.Datetime.now()) warehouse_id = fields.Many2one( comodel_name="stock.warehouse", string="Warehouse", required=True, ) diff --git a/rma/wizard/rma_delivery_views.xml b/rma/wizard/rma_delivery_views.xml index c8ae4153..ae3ace93 100644 --- a/rma/wizard/rma_delivery_views.xml +++ b/rma/wizard/rma_delivery_views.xml @@ -57,13 +57,11 @@ diff --git a/rma/wizard/rma_split.py b/rma/wizard/rma_split.py index f4fc5d9f..1ac646a9 100644 --- a/rma/wizard/rma_split.py +++ b/rma/wizard/rma_split.py @@ -3,8 +3,6 @@ from odoo import _, api, fields, models -import odoo.addons.decimal_precision as dp - class RmaReSplitWizard(models.TransientModel): _name = "rma.split.wizard" @@ -13,7 +11,7 @@ class RmaReSplitWizard(models.TransientModel): rma_id = fields.Many2one(comodel_name="rma", string="RMA",) product_uom_qty = fields.Float( string="Quantity to extract", - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", required=True, help="Quantity to extract to a new RMA.", ) diff --git a/rma/wizard/rma_split_views.xml b/rma/wizard/rma_split_views.xml index bf38f8f9..68807503 100644 --- a/rma/wizard/rma_split_views.xml +++ b/rma/wizard/rma_split_views.xml @@ -31,7 +31,6 @@ Split RMA rma.split.wizard - form form new diff --git a/rma/wizard/stock_picking_return.py b/rma/wizard/stock_picking_return.py index 9d80b472..b337e73a 100644 --- a/rma/wizard/stock_picking_return.py +++ b/rma/wizard/stock_picking_return.py @@ -25,14 +25,28 @@ class ReturnPicking(models.TransientModel): if self.create_rma: warehouse = self.picking_id.picking_type_id.warehouse_id self.location_id = warehouse.rma_loc_id.id - rma_loc = warehouse.search([]).mapped("rma_loc_id") + rma_loc = warehouse.search( + [("company_id", "=", self.picking_id.company_id.id)] + ).mapped("rma_loc_id") rma_loc_domain = [("id", "child_of", rma_loc.ids)] else: - self.location_id = self.default_get(["location_id"])["location_id"] + # If self.create_rma is not True, the value of the location and + # the location domain will be the same as assigned by default. + location_id = self.picking_id.location_id.id + return_picking_type = self.picking_id.picking_type_id.return_picking_type_id + if return_picking_type.default_location_dest_id.return_location: + location_id = return_picking_type.default_location_dest_id.id + self.location_id = location_id rma_loc_domain = [ "|", ("id", "=", self.picking_id.location_id.id), + "|", + "&", ("return_location", "=", True), + ("company_id", "=", False), + "&", + ("return_location", "=", True), + ("company_id", "=", self.picking_id.company_id.id), ] return {"domain": {"location_id": rma_loc_domain}}