diff --git a/rma/README.rst b/rma/README.rst index b46e91f0..d0ef4f57 100644 --- a/rma/README.rst +++ b/rma/README.rst @@ -14,13 +14,13 @@ Return Merchandise Authorization Management :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/14.0/rma + :target: https://github.com/OCA/rma/tree/15.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-14-0/rma-14-0-rma + :target: https://translation.odoo-community.org/projects/rma-15-0/rma-15-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/14.0 + :target: https://runbot.odoo-community.org/runbot/145/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -138,7 +138,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. @@ -158,6 +158,7 @@ Contributors * Ernesto Tejeda * Pedro M. Baeza * David Vidal + * Víctor Martínez * Chafique Delli * Giovanni Serra - Ooops @@ -183,6 +184,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 1805ac98..d0817e53 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Return Merchandise Authorization Management", "summary": "Return Merchandise Authorization (RMA)", - "version": "14.0.3.1.0", + "version": "15.0.1.0.0", "development_status": "Production/Stable", "category": "RMA", "website": "https://github.com/OCA/rma", diff --git a/rma/data/mail_data.xml b/rma/data/mail_data.xml index 4293a84b..f1d8afa2 100644 --- a/rma/data/mail_data.xml +++ b/rma/data/mail_data.xml @@ -30,31 +30,42 @@ team_id + + RMA Notification - ${object.user_id.email_formatted |safe} - ${object.partner_id.id} + {{object.user_id.email_formatted}} + {{object.partner_id.id}} ${object.company_id.name} RMA (Ref ${object.name or 'n/a' }) + >{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }}) - ${(object.name or '')} - ${object.partner_id.lang} + {{(object.name or '')}} + {{object.partner_id.lang}}

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

- Here is the RMA ${object.name} from ${object.company_id.name}. -

- Do not hesitate to contact us if you have any question. -

+ Dear + + + + +
+
+ Here is the RMA + + + + from + + . +
+
+ Do not hesitate to contact us if you have any question. +

@@ -62,58 +73,73 @@ RMA Receipt Notification - ${object.user_id.email_formatted |safe} - ${object.partner_id.id} + {{object.user_id.email_formatted }} + {{object.partner_id.id}} ${object.company_id.name} RMA (Ref ${object.name or 'n/a' }) products received + >{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }}) products received - ${(object.name or '')} - ${object.partner_id.lang} + {{(object.name or '')}} + {{object.partner_id.lang}} -
-

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

- The products for your RMA ${object.name} - from ${object.company_id.name} have been received in our warehouse. -

- Do not hesitate to contact us if you have any question. -

-
+
+

+ Dear + + + + +
+
+ The products for your RMA + + + + from + + have been received in our warehouse. +
+
+ Do not hesitate to contact us if you have any question. +

+
RMA Draft Notification - ${object.user_id.email_formatted |safe} - ${object.partner_id.id} + {{object.user_id.email_formatted}} + {{object.partner_id.id}} ${object.company_id.name} Your RMA has been succesfully created (Ref ${object.name or 'n/a' }) + >{{object.company_id.name}} Your RMA has been succesfully created (Ref {{object.name or 'n/a' }}) - ${(object.name or '')} - ${object.partner_id.lang} + {{(object.name or '')}} + {{object.partner_id.lang}} -
-

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

- You've succesfully placed your RMA ${object.name} - on ${object.company_id.name}. Our team will check it and will validate - it as soon as possible. -

- Do not hesitate to contact us if you have any question. -

-
+
+

+ Dear + + + + +
+
+ You've succesfully placed your RMA + + + + on + + . Our team will check it and will validate it as soon as possible. +
+
+ Do not hesitate to contact us if you have any question. +

+
diff --git a/rma/i18n/es.po b/rma/i18n/es.po index bbcc85a5..5218c230 100644 --- a/rma/i18n/es.po +++ b/rma/i18n/es.po @@ -6,47 +6,16 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 20:11+0000\n" -"PO-Revision-Date: 2022-01-17 12:39+0000\n" +"POT-Creation-Date: 2022-08-09 08:07+0000\n" +"PO-Revision-Date: 2022-08-09 10:16+0200\n" "Last-Translator: xavigutipujol \n" "Language-Team: \n" -"Language: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" - -#. module: rma -#: model:mail.template,report_name:rma.mail_template_rma_draft_notification -#: model:mail.template,report_name:rma.mail_template_rma_notification -#: model:mail.template,report_name:rma.mail_template_rma_receipt_notification -msgid "${(object.name or '')}" -msgstr "${(object.name or '')}" - -#. module: rma -#: model:mail.template,subject:rma.mail_template_rma_notification -msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" -msgstr "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" - -#. module: rma -#: model:mail.template,subject:rma.mail_template_rma_receipt_notification -#, fuzzy -msgid "" -"${object.company_id.name} RMA (Ref ${object.name or 'n/a' }) products " -"received" -msgstr "" -"${object.company_id.name} RMA (Ref ${object.name or 'n/a' }) productos " -"recibidos" - -#. module: rma -#: model:mail.template,subject:rma.mail_template_rma_draft_notification -msgid "" -"${object.company_id.name} Your RMA has been succesfully created (Ref " -"${object.name or 'n/a' })" -msgstr "" -"${object.company_id.name} Su RMA se ha creado con éxito (Ref ${object.name " -"or 'n/a' })" +"X-Generator: Poedit 2.3\n" #. module: rma #: code:addons/rma/models/rma_team.py:0 @@ -61,27 +30,54 @@ msgstr "" #. module: rma #: code:addons/rma/models/rma.py:0 -#, python-format -msgid "E-mail subject: %s

E-mail body:
%s" +#, fuzzy, python-format +#| msgid "E-mail subject: %s

E-mail body:
%s" +msgid "" +"E-mail subject: %(subject)s

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

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

Cuerpo del correo " +"electrónico:
%(body)s" #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_notification +#, fuzzy +#| 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" +#| " " 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" +" Dear\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"
\n" +" Here is the RMA\n" +" \n" +" \n" +" \n" +" from\n" +" \n" +" .\n" +"
\n" +"
\n" +" Do not hesitate to contact us if you have any question.\n" +"

\n" "
\n" " " msgstr "" @@ -102,20 +98,44 @@ msgstr "" #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_receipt_notification +#, fuzzy +#| 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" +#| " The products for your RMA ${object.name}\n" +#| " from ${object.company_id.name} have been received in our warehouse.\n" +#| "

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

\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" -" % endif\n" -"

\n" -" The products for your RMA ${object.name}\n" -" from ${object.company_id.name} have been received in our warehouse.\n" -"

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

\n" -"
\n" +"

\n" +" Dear\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"
\n" +" The products for your RMA\n" +" \n" +" \n" +" \n" +" from\n" +" \n" +" have been received in our warehouse.\n" +"
\n" +"
\n" +" Do not hesitate to contact us if you have any question.\n" +"

\n" +" \n" " " msgstr "" "
\n" @@ -135,21 +155,47 @@ msgstr "" #. module: rma #: model:mail.template,body_html:rma.mail_template_rma_draft_notification +#, fuzzy +#| 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" +#| " You've succesfully placed your RMA ${object.name}\n" +#| " on ${object.company_id.name}. Our team will check it and will " +#| "validate\n" +#| " it as soon as possible.\n" +#| "

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

\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" -" % endif\n" -"

\n" -" You've succesfully placed your RMA ${object.name}\n" -" on ${object.company_id.name}. Our team will check it and will validate\n" -" it as soon as possible.\n" -"

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

\n" -"
\n" +"

\n" +" Dear\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"
\n" +" You've succesfully placed your RMA\n" +" \n" +" \n" +" \n" +" on\n" +" \n" +" . Our team will check it and will validate it as soon as " +"possible.\n" +"
\n" +"
\n" +" Do not hesitate to contact us if you have any question.\n" +"

\n" +"
\n" " " msgstr "" "
\n" @@ -418,7 +464,7 @@ msgstr "Actividades" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__activity_exception_decoration msgid "Activity Exception Decoration" -msgstr "" +msgstr "Decoración de excepción de actividad" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__activity_state @@ -534,7 +580,7 @@ msgstr "Cancelado" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__uom_category_id msgid "Category" -msgstr "" +msgstr "Categoría" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__uom_category_id @@ -697,12 +743,12 @@ msgstr "Entregar" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__delivered_qty -msgid "Delivered qty" +msgid "Delivered Qty" msgstr "Ctd. entregada" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__delivered_qty_done -msgid "Delivered qty done" +msgid "Delivered Qty Done" msgstr "Ctd. entregada realizada" #. module: rma @@ -727,12 +773,6 @@ msgid "Description" msgstr "Descripción" #. module: rma -#: model:ir.model.fields,field_description:rma.field_account_move__display_name -#: model:ir.model.fields,field_description:rma.field_account_move_line__display_name -#: model:ir.model.fields,field_description:rma.field_res_company__display_name -#: model:ir.model.fields,field_description:rma.field_res_config_settings__display_name -#: model:ir.model.fields,field_description:rma.field_res_partner__display_name -#: model:ir.model.fields,field_description:rma.field_res_users__display_name #: model:ir.model.fields,field_description:rma.field_rma__display_name #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_finalization__display_name @@ -741,11 +781,6 @@ msgstr "Descripción" #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_tag__display_name #: model:ir.model.fields,field_description:rma.field_rma_team__display_name -#: model:ir.model.fields,field_description:rma.field_stock_move__display_name -#: model:ir.model.fields,field_description:rma.field_stock_picking__display_name -#: model:ir.model.fields,field_description:rma.field_stock_return_picking__display_name -#: model:ir.model.fields,field_description:rma.field_stock_rule__display_name -#: model:ir.model.fields,field_description:rma.field_stock_warehouse__display_name msgid "Display Name" msgstr "Nombre mostrado" @@ -871,12 +906,6 @@ msgstr "Finalizado" msgid "Followers" msgstr "Seguidores" -#. module: rma -#: model:ir.model.fields,field_description:rma.field_rma__message_channel_ids -#: model:ir.model.fields,field_description:rma.field_rma_team__message_channel_ids -msgid "Followers (Channels)" -msgstr "Seguidores (Canales)" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_partner_ids #: model:ir.model.fields,field_description:rma.field_rma_team__message_partner_ids @@ -908,12 +937,12 @@ msgstr "" "Agrupar las devoluciones de RMA a cliente por dirección de envío y almacén" #. module: rma -#: model:ir.model.fields,field_description:rma.field_account_move__id -#: model:ir.model.fields,field_description:rma.field_account_move_line__id -#: model:ir.model.fields,field_description:rma.field_res_company__id -#: model:ir.model.fields,field_description:rma.field_res_config_settings__id -#: model:ir.model.fields,field_description:rma.field_res_partner__id -#: model:ir.model.fields,field_description:rma.field_res_users__id +#: model:ir.model.fields,field_description:rma.field_rma__has_message +#: model:ir.model.fields,field_description:rma.field_rma_team__has_message +msgid "Has Message" +msgstr "" + +#. module: rma #: model:ir.model.fields,field_description:rma.field_rma__id #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_finalization__id @@ -922,13 +951,8 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_tag__id #: model:ir.model.fields,field_description:rma.field_rma_team__id -#: model:ir.model.fields,field_description:rma.field_stock_move__id -#: model:ir.model.fields,field_description:rma.field_stock_picking__id -#: model:ir.model.fields,field_description:rma.field_stock_return_picking__id -#: model:ir.model.fields,field_description:rma.field_stock_rule__id -#: model:ir.model.fields,field_description:rma.field_stock_warehouse__id msgid "ID" -msgstr "" +msgstr "ID" #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_parent_thread_id @@ -947,7 +971,7 @@ msgstr "Icono" #. module: rma #: model:ir.model.fields,help:rma.field_rma__activity_exception_icon msgid "Icon to indicate an exception activity." -msgstr "" +msgstr "Icono para indicar una actividad de excepción." #. module: rma #: model:ir.model.fields,help:rma.field_rma__message_needaction @@ -1011,7 +1035,7 @@ msgstr "Es un seguidor" #. module: rma #: model:ir.model,name:rma.model_account_move msgid "Journal Entry" -msgstr "" +msgstr "Asiento contable" #. module: rma #: model:ir.model,name:rma.model_account_move_line @@ -1019,12 +1043,6 @@ msgid "Journal Item" msgstr "Apunte contable" #. module: rma -#: model:ir.model.fields,field_description:rma.field_account_move____last_update -#: model:ir.model.fields,field_description:rma.field_account_move_line____last_update -#: model:ir.model.fields,field_description:rma.field_res_company____last_update -#: model:ir.model.fields,field_description:rma.field_res_config_settings____last_update -#: model:ir.model.fields,field_description:rma.field_res_partner____last_update -#: model:ir.model.fields,field_description:rma.field_res_users____last_update #: model:ir.model.fields,field_description:rma.field_rma____last_update #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_finalization____last_update @@ -1033,11 +1051,6 @@ msgstr "Apunte contable" #: model:ir.model.fields,field_description:rma.field_rma_split_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_tag____last_update #: model:ir.model.fields,field_description:rma.field_rma_team____last_update -#: model:ir.model.fields,field_description:rma.field_stock_move____last_update -#: model:ir.model.fields,field_description:rma.field_stock_picking____last_update -#: model:ir.model.fields,field_description:rma.field_stock_return_picking____last_update -#: model:ir.model.fields,field_description:rma.field_stock_rule____last_update -#: model:ir.model.fields,field_description:rma.field_stock_warehouse____last_update msgid "Last Modified on" msgstr "Última modificación en" @@ -1180,7 +1193,7 @@ msgstr "Ninguno de los RMAs seleccionados puede realizar una devolución." #. module: rma #: model:ir.model.fields.selection,name:rma.selection__rma__priority__0 msgid "Normal" -msgstr "" +msgstr "Normal" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_needaction_counter @@ -1347,11 +1360,11 @@ msgstr "Cantidad a extraer" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Quantity to extract cannot be greater than remaining delivery quantity (%s " -"%s)" +"Quantity to extract cannot be greater than remaining delivery quantity " +"(%(remaining_qty)s %(product_uom)s)" msgstr "" "La cantidad a extraer no puede ser mayor que la cantidad de entrega " -"restante(%s %s)" +"restante(%(remaining_qty)s %(product_uom)s)" #. module: rma #: model:ir.model.fields,help:rma.field_rma_split_wizard__product_uom_qty @@ -1409,6 +1422,11 @@ msgstr "Órdenes de entrega de RMA" msgid "RMA Delivery Wizard" msgstr "Asistente de entrega de RMA" +#. module: rma +#: model:mail.template,name:rma.mail_template_rma_draft_notification +msgid "RMA Draft Notification" +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_form msgid "RMA Finalization" @@ -1423,7 +1441,6 @@ msgstr "Motivo de finalización de RMA" #: model:ir.actions.act_window,name:rma.action_rma_finalization #: model:ir.ui.menu,name:rma.rma_configuration_rma_finalization_menu #: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search -#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_list msgid "RMA Finalization Reasons" msgstr "Motivos de finalización de RMA" @@ -1450,6 +1467,7 @@ msgstr "" #. module: rma #: model:mail.message.subtype,name:rma.mt_rma_notification #: model:mail.message.subtype,name:rma.mt_rma_team_rma_notification +#: model:mail.template,name:rma.mail_template_rma_notification msgid "RMA Notification" msgstr "Notificación de RMA" @@ -1475,6 +1493,11 @@ msgstr "Tipo de operación para entrega de RMA" msgid "RMA Receipt Confirmation Email" msgstr "Correo de confirmación de recepción de RMA" +#. module: rma +#: model:mail.template,name:rma.mail_template_rma_receipt_notification +msgid "RMA Receipt Notification" +msgstr "" + #. module: rma #: code:addons/rma/models/stock_warehouse.py:0 #, python-format @@ -1501,7 +1524,6 @@ msgstr "Etiqueta RMA" #: model:ir.model,name:rma.model_rma_tag #: model:ir.ui.menu,name:rma.rma_configuration_rma_tag_menu #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search -#: model_terms:ir.ui.view,arch_db:rma.view_rma_tag_list msgid "RMA Tags" msgstr "Etiquetas RMA" @@ -1629,16 +1651,16 @@ msgstr "Referencia al documento que generó este RMA." msgid "Refund" msgstr "Factura rectificativa" +#. module: rma +#: model:ir.model.fields,field_description:rma.field_rma__refund_line_id +msgid "Refund Line" +msgstr "" + #. module: rma #: model:ir.model.fields,help:rma.field_rma__partner_invoice_id msgid "Refund address for current RMA." msgstr "Dirección de facturación de este RMA." -#. module: rma -#: model:ir.model.fields,field_description:rma.field_rma__refund_line_id -msgid "Refund line" -msgstr "Línea de factura rectificativa" - #. module: rma #: model:ir.model.fields.selection,name:rma.selection__rma__state__refunded msgid "Refunded" @@ -1680,27 +1702,29 @@ msgstr "Reemplazado" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Replacement: Move %s (Picking %s) has been created." +"Replacement: Move %(move_name)s (Picking %(picking_name)s) has " +"been created." msgstr "" "Reemplazo: El movimiento %s (Orden de entrega %s) ha sido creado." +"id=\"%(move_id)d\">%(move_name)s (Orden de entrega %(picking_name)s) " +"ha sido creado." #. module: rma #: code:addons/rma/models/rma.py:0 #, python-format msgid "" "Replacement:
Product %s
Quantity %f %s
This replacement did not " -"create a new move, but one of the previously created moves was updated with " -"this data." +"data-oe-id=\"%(id)d\">%(name)s
Quantity %(qty)s %(uom)s
This " +"replacement did not create a new move, but one of the previously created " +"moves was updated with this data." msgstr "" "Reemplazo:
Producto %s
Cantidad %f %s
El reemplazo realizado no creó un " -"movimiento nuevo, pero uno de los movimientos creados anteriormente fué " -"actualizado con estos datos." +"oe-id=\"%(id)d\">%(name)s
Cantidad %(qty) s%(uom)s
El reemplazo " +"realizado no creó un movimiento nuevo, pero uno de los movimientos creados " +"anteriormente fué actualizado con estos datos." #. module: rma #: model:ir.ui.menu,name:rma.rma_reporting_menu @@ -1745,11 +1769,11 @@ msgstr "Devolver al cliente" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Return: %s has been created." +"Return: " +"%(name)s has been created." msgstr "" "Devolución: La orden de entrega %s ha sido creada." +"\" data-oe-id=\"%(id)d\">%(name)s ha sido creada." #. module: rma #: model:ir.model.fields.selection,name:rma.selection__rma__state__returned @@ -1887,11 +1911,11 @@ msgstr "Dividir RMA" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Split: %s has been " -"created." +"Split: %(name)s has been created." msgstr "" -"División: El RMA %s ha sido creado." +"División: El RMA " +"%(name)s ha sido creado." #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__state @@ -1968,7 +1992,7 @@ msgstr "¡El nombre de operación ya existe!" #. module: rma #: model:ir.model.fields,help:rma.field_rma_tag__active msgid "The active field allows you to hide the category without removing it." -msgstr "" +msgstr "El campo activo le permite ocultar la clase sin tener que eliminarla." #. module: rma #: model:ir.model.fields,help:rma.field_rma_team__alias_model_id @@ -2008,11 +2032,11 @@ msgstr "" #: code:addons/rma/models/stock_move.py:0 #, python-format msgid "" -"The quantity done for the product '%s' must be equal to its initial demand " -"because the stock move is linked to an RMA (%s)." +"The quantity done for the product '%(id)s' must be equal to its initial " +"demand because the stock move is linked to an RMA (%(name)s)." msgstr "" -"La cantidad realizada para el producto '%s' debe ser igual a la demanda " -"inicial porque el movimiento está enlazado a un RMA (%s)." +"La cantidad realizada para el producto '%(id)s' debe ser igual a la demanda " +"inicial porque el movimiento está enlazado a un RMA (%(name)s)." #. module: rma #: code:addons/rma/models/rma.py:0 @@ -2077,7 +2101,7 @@ 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 "" +msgstr "Tipo de actividad de excepción en registro." #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_search @@ -2247,3 +2271,36 @@ msgid "" msgstr "" "El usuario tendrá acceso a la configuración de RMA y a los informes " "estadísticos." + +#. module: rma +#: model:mail.template,report_name:rma.mail_template_rma_draft_notification +#: model:mail.template,report_name:rma.mail_template_rma_notification +#: model:mail.template,report_name:rma.mail_template_rma_receipt_notification +msgid "{{(object.name or '')}}" +msgstr "{{(object.name or '')}}" + +#. module: rma +#: model:mail.template,subject:rma.mail_template_rma_notification +msgid "{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }})" +msgstr "{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }})" + +#. module: rma +#: model:mail.template,subject:rma.mail_template_rma_receipt_notification +msgid "" +"{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }}) products " +"received" +msgstr "" +"{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }}) productos " +"recibidos" + +#. module: rma +#: model:mail.template,subject:rma.mail_template_rma_draft_notification +msgid "" +"{{object.company_id.name}} Your RMA has been succesfully created (Ref " +"{{object.name or 'n/a' }})" +msgstr "" +"{{object.company_id.name}} Su RMA se ha creado con éxito (Ref {{object.name " +"or 'n/a' }})" + +#~ msgid "Followers (Channels)" +#~ msgstr "Seguidores (Canales)" diff --git a/rma/i18n/it.po b/rma/i18n/it.po index 07944e22..8fb7f7c3 100644 --- a/rma/i18n/it.po +++ b/rma/i18n/it.po @@ -2255,6 +2255,3 @@ msgid "" "the user will have an access to the RMA configuration as well as statistic " "reports." msgstr "l'utente avrà accesso alla configurazione RMA e ai report statistici." - -#~ msgid "Invoicing address:" -#~ msgstr "Indirizzo di fatturazione:" diff --git a/rma/i18n/pt.po b/rma/i18n/pt.po index f4179561..b80fca20 100644 --- a/rma/i18n/pt.po +++ b/rma/i18n/pt.po @@ -2188,6 +2188,3 @@ msgid "" msgstr "" "o utilizador terá acesso à configuração RMA, bem como aos relatórios " "estatísticos." - -#~ msgid "Invoicing address:" -#~ msgstr "Endereço de Cobrança:" diff --git a/rma/i18n/pt_BR.po b/rma/i18n/pt_BR.po index 725841c5..a87e7285 100644 --- a/rma/i18n/pt_BR.po +++ b/rma/i18n/pt_BR.po @@ -2183,88 +2183,3 @@ msgid "" msgstr "" "o usuário terá acesso à configuração RMA, bem como aos relatórios " "estatísticos." - -#~ msgid "Invoicing address:" -#~ msgstr "Endereço de Cobrança:" - -#~ msgid "Not urgent" -#~ msgstr "Não é urgente" - -#~ msgid "Very Urgent" -#~ msgstr "Muito Urgente" - -#~ 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" - -#~ msgid "New RMA in draft state" -#~ msgstr "Novo Rascunho de RMA" diff --git a/rma/i18n/rma.pot b/rma/i18n/rma.pot index 83aa4dbf..a3a1e121 100644 --- a/rma/i18n/rma.pot +++ b/rma/i18n/rma.pot @@ -4,8 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-09 08:07+0000\n" +"PO-Revision-Date: 2022-08-09 08:07+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -13,32 +15,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: rma -#: model:mail.template,report_name:rma.mail_template_rma_draft_notification -#: model:mail.template,report_name:rma.mail_template_rma_notification -#: model:mail.template,report_name:rma.mail_template_rma_receipt_notification -msgid "${(object.name or '')}" -msgstr "" - -#. module: rma -#: model:mail.template,subject:rma.mail_template_rma_notification -msgid "${object.company_id.name} RMA (Ref ${object.name or 'n/a' })" -msgstr "" - -#. module: rma -#: model:mail.template,subject:rma.mail_template_rma_receipt_notification -msgid "" -"${object.company_id.name} RMA (Ref ${object.name or 'n/a' }) products " -"received" -msgstr "" - -#. module: rma -#: model:mail.template,subject:rma.mail_template_rma_draft_notification -msgid "" -"${object.company_id.name} Your RMA has been succesfully created (Ref " -"${object.name or 'n/a' })" -msgstr "" - #. module: rma #: code:addons/rma/models/rma_team.py:0 #, python-format @@ -53,7 +29,8 @@ msgstr "" #. module: rma #: code:addons/rma/models/rma.py:0 #, python-format -msgid "E-mail subject: %s

E-mail body:
%s" +msgid "" +"E-mail subject: %(subject)s

E-mail body:
%(body)s" msgstr "" #. module: rma @@ -61,15 +38,24 @@ msgstr "" 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" +" Dear\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"
\n" +" Here is the RMA\n" +" \n" +" \n" +" \n" +" from\n" +" \n" +" .\n" +"
\n" +"
\n" +" Do not hesitate to contact us if you have any question.\n" +"

\n" "
\n" " " msgstr "" @@ -78,18 +64,26 @@ msgstr "" #: model:mail.template,body_html:rma.mail_template_rma_receipt_notification 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" -" The products for your RMA ${object.name}\n" -" from ${object.company_id.name} have been received in our warehouse.\n" -"

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

\n" -"
\n" +"

\n" +" Dear\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"
\n" +" The products for your RMA\n" +" \n" +" \n" +" \n" +" from\n" +" \n" +" have been received in our warehouse.\n" +"
\n" +"
\n" +" Do not hesitate to contact us if you have any question.\n" +"

\n" +"
\n" " " msgstr "" @@ -97,19 +91,26 @@ msgstr "" #: model:mail.template,body_html:rma.mail_template_rma_draft_notification 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" -" You've succesfully placed your RMA ${object.name}\n" -" on ${object.company_id.name}. Our team will check it and will validate\n" -" it as soon as possible.\n" -"

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

\n" -"
\n" +"

\n" +" Dear\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"
\n" +" You've succesfully placed your RMA\n" +" \n" +" \n" +" \n" +" on\n" +" \n" +" . Our team will check it and will validate it as soon as possible.\n" +"
\n" +"
\n" +" Do not hesitate to contact us if you have any question.\n" +"

\n" +" \n" " " msgstr "" @@ -622,12 +623,12 @@ msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__delivered_qty -msgid "Delivered qty" +msgid "Delivered Qty" msgstr "" #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__delivered_qty_done -msgid "Delivered qty done" +msgid "Delivered Qty Done" msgstr "" #. module: rma @@ -652,12 +653,6 @@ msgid "Description" msgstr "" #. module: rma -#: model:ir.model.fields,field_description:rma.field_account_move__display_name -#: model:ir.model.fields,field_description:rma.field_account_move_line__display_name -#: model:ir.model.fields,field_description:rma.field_res_company__display_name -#: model:ir.model.fields,field_description:rma.field_res_config_settings__display_name -#: model:ir.model.fields,field_description:rma.field_res_partner__display_name -#: model:ir.model.fields,field_description:rma.field_res_users__display_name #: model:ir.model.fields,field_description:rma.field_rma__display_name #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_finalization__display_name @@ -666,11 +661,6 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__display_name #: model:ir.model.fields,field_description:rma.field_rma_tag__display_name #: model:ir.model.fields,field_description:rma.field_rma_team__display_name -#: model:ir.model.fields,field_description:rma.field_stock_move__display_name -#: model:ir.model.fields,field_description:rma.field_stock_picking__display_name -#: model:ir.model.fields,field_description:rma.field_stock_return_picking__display_name -#: model:ir.model.fields,field_description:rma.field_stock_rule__display_name -#: model:ir.model.fields,field_description:rma.field_stock_warehouse__display_name msgid "Display Name" msgstr "" @@ -794,12 +784,6 @@ msgstr "" msgid "Followers" msgstr "" -#. module: rma -#: model:ir.model.fields,field_description:rma.field_rma__message_channel_ids -#: model:ir.model.fields,field_description:rma.field_rma_team__message_channel_ids -msgid "Followers (Channels)" -msgstr "" - #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__message_partner_ids #: model:ir.model.fields,field_description:rma.field_rma_team__message_partner_ids @@ -829,12 +813,12 @@ msgid "Group RMA returns by customer and warehouse." msgstr "" #. module: rma -#: model:ir.model.fields,field_description:rma.field_account_move__id -#: model:ir.model.fields,field_description:rma.field_account_move_line__id -#: model:ir.model.fields,field_description:rma.field_res_company__id -#: model:ir.model.fields,field_description:rma.field_res_config_settings__id -#: model:ir.model.fields,field_description:rma.field_res_partner__id -#: model:ir.model.fields,field_description:rma.field_res_users__id +#: model:ir.model.fields,field_description:rma.field_rma__has_message +#: model:ir.model.fields,field_description:rma.field_rma_team__has_message +msgid "Has Message" +msgstr "" + +#. module: rma #: model:ir.model.fields,field_description:rma.field_rma__id #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_finalization__id @@ -843,11 +827,6 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_rma_split_wizard__id #: model:ir.model.fields,field_description:rma.field_rma_tag__id #: model:ir.model.fields,field_description:rma.field_rma_team__id -#: model:ir.model.fields,field_description:rma.field_stock_move__id -#: model:ir.model.fields,field_description:rma.field_stock_picking__id -#: model:ir.model.fields,field_description:rma.field_stock_return_picking__id -#: model:ir.model.fields,field_description:rma.field_stock_rule__id -#: model:ir.model.fields,field_description:rma.field_stock_warehouse__id msgid "ID" msgstr "" @@ -936,12 +915,6 @@ msgid "Journal Item" msgstr "" #. module: rma -#: model:ir.model.fields,field_description:rma.field_account_move____last_update -#: model:ir.model.fields,field_description:rma.field_account_move_line____last_update -#: model:ir.model.fields,field_description:rma.field_res_company____last_update -#: model:ir.model.fields,field_description:rma.field_res_config_settings____last_update -#: model:ir.model.fields,field_description:rma.field_res_partner____last_update -#: model:ir.model.fields,field_description:rma.field_res_users____last_update #: model:ir.model.fields,field_description:rma.field_rma____last_update #: model:ir.model.fields,field_description:rma.field_rma_delivery_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_finalization____last_update @@ -950,11 +923,6 @@ msgstr "" #: model:ir.model.fields,field_description:rma.field_rma_split_wizard____last_update #: model:ir.model.fields,field_description:rma.field_rma_tag____last_update #: model:ir.model.fields,field_description:rma.field_rma_team____last_update -#: model:ir.model.fields,field_description:rma.field_stock_move____last_update -#: model:ir.model.fields,field_description:rma.field_stock_picking____last_update -#: model:ir.model.fields,field_description:rma.field_stock_return_picking____last_update -#: model:ir.model.fields,field_description:rma.field_stock_rule____last_update -#: model:ir.model.fields,field_description:rma.field_stock_warehouse____last_update msgid "Last Modified on" msgstr "" @@ -1249,8 +1217,8 @@ msgstr "" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Quantity to extract cannot be greater than remaining delivery quantity (%s " -"%s)" +"Quantity to extract cannot be greater than remaining delivery quantity " +"(%(remaining_qty)s %(product_uom)s)" msgstr "" #. module: rma @@ -1309,6 +1277,11 @@ msgstr "" msgid "RMA Delivery Wizard" msgstr "" +#. module: rma +#: model:mail.template,name:rma.mail_template_rma_draft_notification +msgid "RMA Draft Notification" +msgstr "" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_form msgid "RMA Finalization" @@ -1323,7 +1296,6 @@ msgstr "" #: model:ir.actions.act_window,name:rma.action_rma_finalization #: model:ir.ui.menu,name:rma.rma_configuration_rma_finalization_menu #: model_terms:ir.ui.view,arch_db:rma.rma_finalization_view_search -#: model_terms:ir.ui.view,arch_db:rma.view_rma_finalization_list msgid "RMA Finalization Reasons" msgstr "" @@ -1350,6 +1322,7 @@ msgstr "" #. module: rma #: model:mail.message.subtype,name:rma.mt_rma_notification #: model:mail.message.subtype,name:rma.mt_rma_team_rma_notification +#: model:mail.template,name:rma.mail_template_rma_notification msgid "RMA Notification" msgstr "" @@ -1375,6 +1348,11 @@ msgstr "" msgid "RMA Receipt Confirmation Email" msgstr "" +#. module: rma +#: model:mail.template,name:rma.mail_template_rma_receipt_notification +msgid "RMA Receipt Notification" +msgstr "" + #. module: rma #: code:addons/rma/models/stock_warehouse.py:0 #, python-format @@ -1401,7 +1379,6 @@ msgstr "" #: model:ir.model,name:rma.model_rma_tag #: model:ir.ui.menu,name:rma.rma_configuration_rma_tag_menu #: model_terms:ir.ui.view,arch_db:rma.rma_tag_view_search -#: model_terms:ir.ui.view,arch_db:rma.view_rma_tag_list msgid "RMA Tags" msgstr "" @@ -1529,13 +1506,13 @@ msgid "Refund" msgstr "" #. module: rma -#: model:ir.model.fields,help:rma.field_rma__partner_invoice_id -msgid "Refund address for current RMA." +#: model:ir.model.fields,field_description:rma.field_rma__refund_line_id +msgid "Refund Line" msgstr "" #. module: rma -#: model:ir.model.fields,field_description:rma.field_rma__refund_line_id -msgid "Refund line" +#: model:ir.model.fields,help:rma.field_rma__partner_invoice_id +msgid "Refund address for current RMA." msgstr "" #. module: rma @@ -1580,8 +1557,9 @@ msgstr "" #, python-format msgid "" "Replacement: Move %s (Picking %s) has been created." +"id=\"%(move_id)d\">%(move_name)s (Picking %(picking_name)s)" +" has been created." msgstr "" #. module: rma @@ -1589,9 +1567,9 @@ msgstr "" #, 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." +"data-oe-id=\"%(id)d\">%(name)s
Quantity %(qty)s %(uom)s
This " +"replacement did not create a new move, but one of the previously created " +"moves was updated with this data." msgstr "" #. module: rma @@ -1638,7 +1616,7 @@ msgstr "" #, python-format msgid "" "Return: %s has been created." +"id=\"%(id)d\">%(name)s has been created." msgstr "" #. module: rma @@ -1777,8 +1755,8 @@ msgstr "" #: code:addons/rma/models/rma.py:0 #, python-format msgid "" -"Split: %s has been" -" created." +"Split: %(name)s has been created." msgstr "" #. module: rma @@ -1882,8 +1860,8 @@ msgstr "" #: code:addons/rma/models/stock_move.py:0 #, python-format msgid "" -"The quantity done for the product '%s' must be equal to its initial demand " -"because the stock move is linked to an RMA (%s)." +"The quantity done for the product '%(id)s' must be equal to its initial " +"demand because the stock move is linked to an RMA (%(name)s)." msgstr "" #. module: rma @@ -2113,3 +2091,29 @@ msgid "" "the user will have an access to the RMA configuration as well as statistic " "reports." msgstr "" + +#. module: rma +#: model:mail.template,report_name:rma.mail_template_rma_draft_notification +#: model:mail.template,report_name:rma.mail_template_rma_notification +#: model:mail.template,report_name:rma.mail_template_rma_receipt_notification +msgid "{{(object.name or '')}}" +msgstr "" + +#. module: rma +#: model:mail.template,subject:rma.mail_template_rma_notification +msgid "{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }})" +msgstr "" + +#. module: rma +#: model:mail.template,subject:rma.mail_template_rma_receipt_notification +msgid "" +"{{object.company_id.name}} RMA (Ref {{object.name or 'n/a' }}) products " +"received" +msgstr "" + +#. module: rma +#: model:mail.template,subject:rma.mail_template_rma_draft_notification +msgid "" +"{{object.company_id.name}} Your RMA has been succesfully created (Ref " +"{{object.name or 'n/a' }})" +msgstr "" diff --git a/rma/i18n/ro.po b/rma/i18n/ro.po index 30d5d9e8..bb122b14 100644 --- a/rma/i18n/ro.po +++ b/rma/i18n/ro.po @@ -2174,12 +2174,3 @@ msgid "" "the user will have an access to the RMA configuration as well as statistic " "reports." msgstr "" - -#~ msgid "Invoicing address:" -#~ msgstr "Adresă facturare:" - -#~ msgid "Not urgent" -#~ msgstr "Nu e urgent" - -#~ msgid "Very Urgent" -#~ msgstr "Forate urgent" diff --git a/rma/models/rma.py b/rma/models/rma.py index bc82a99f..8f2101b5 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -1,6 +1,6 @@ # Copyright 2020 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - +import logging from collections import Counter from odoo import _, api, fields, models @@ -10,6 +10,8 @@ from odoo.tools import html2plaintext from odoo.addons.stock.models.stock_move import PROCUREMENT_PRIORITIES +_logger = logging.getLogger(__name__) + class Rma(models.Model): _name = "rma" @@ -31,7 +33,6 @@ class Rma(models.Model): # General fields sent = fields.Boolean() name = fields.Char( - string="Name", index=True, readonly=True, states={"draft": [("readonly", False)]}, @@ -40,31 +41,43 @@ 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( - default=lambda self: fields.Datetime.now(), + default=fields.Datetime.now, index=True, required=True, readonly=True, 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", index=True, tracking=True, - states={"locked": [("readonly", True)], "cancelled": [("readonly", 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)], + }, ) tag_ids = fields.Many2many(comodel_name="rma.tag", string="Tags") finalization_id = fields.Many2one( @@ -72,13 +85,18 @@ class Rma(models.Model): comodel_name="rma.finalization", copy=False, readonly=True, - domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", + domain=( + "['|', ('company_id', '=', False), ('company_id', '='," " company_id)]" + ), tracking=True, ) company_id = fields.Many2one( comodel_name="res.company", default=lambda self: self.env.company, - states={"locked": [("readonly", True)], "cancelled": [("readonly", True)]}, + states={ + "locked": [("readonly", True)], + "cancelled": [("readonly", True)], + }, ) partner_id = fields.Many2one( string="Customer", @@ -100,7 +118,9 @@ class Rma(models.Model): comodel_name="res.partner", readonly=True, states={"draft": [("readonly", False)]}, - domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", + domain=( + "['|', ('company_id', '=', False), ('company_id', '='," " company_id)]" + ), help="Refund address for current RMA.", ) commercial_partner_id = fields.Many2one( @@ -110,21 +130,25 @@ class Rma(models.Model): picking_id = fields.Many2one( comodel_name="stock.picking", string="Origin Delivery", - domain="[" - " ('state', '=', 'done')," - " ('picking_type_id.code', '=', 'outgoing')," - " ('partner_id', 'child_of', commercial_partner_id)," - "]", + domain=( + "[" + " ('state', '=', 'done')," + " ('picking_type_id.code', '=', 'outgoing')," + " ('partner_id', 'child_of', commercial_partner_id)," + "]" + ), readonly=True, states={"draft": [("readonly", False)]}, ) move_id = fields.Many2one( comodel_name="stock.move", string="Origin move", - domain="[" - " ('picking_id', '=', picking_id)," - " ('picking_id', '!=', False)" - "]", + domain=( + "[" + " ('picking_id', '=', picking_id)," + " ('picking_id', '!=', False)" + "]" + ), readonly=True, states={"draft": [("readonly", False)]}, ) @@ -159,7 +183,6 @@ class Rma(models.Model): }, ) priority = fields.Selection( - string="Priority", selection=PROCUREMENT_PRIORITIES, default="1", readonly=True, @@ -188,7 +211,10 @@ class Rma(models.Model): 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( @@ -210,13 +236,11 @@ class Rma(models.Model): # Refund fields refund_id = fields.Many2one( comodel_name="account.move", - string="Refund", readonly=True, copy=False, ) refund_line_id = fields.Many2one( comodel_name="account.move.line", - string="Refund line", readonly=True, copy=False, ) @@ -234,13 +258,11 @@ class Rma(models.Model): compute="_compute_delivery_picking_count", ) delivered_qty = fields.Float( - string="Delivered qty", digits="Product Unit of Measure", compute="_compute_delivered_qty", store=True, ) delivered_qty_done = fields.Float( - string="Delivered qty done", digits="Product Unit of Measure", compute="_compute_delivered_qty", compute_sudo=True, @@ -447,7 +469,11 @@ class Rma(models.Model): # Constrains methods (@api.constrains) @api.constrains( - "state", "partner_id", "partner_shipping_id", "partner_invoice_id", "product_id" + "state", + "partner_id", + "partner_shipping_id", + "partner_invoice_id", + "product_id", ) def _check_required_after_draft(self): """Check that RMAs are being created or edited with the @@ -695,6 +721,7 @@ class Rma(models.Model): # in other models action = ( self.env.ref("rma.rma_delivery_wizard_action") + .sudo() .with_context(active_id=self.id) .read()[0] ) @@ -717,6 +744,7 @@ class Rma(models.Model): # in other models action = ( self.env.ref("rma.rma_delivery_wizard_action") + .sudo() .with_context(active_id=self.id) .read()[0] ) @@ -736,6 +764,7 @@ class Rma(models.Model): # in other models action = ( self.env.ref("rma.rma_split_wizard_action") + .sudo() .with_context(active_id=self.id) .read()[0] ) @@ -751,6 +780,7 @@ class Rma(models.Model): # in other models action = ( self.env.ref("rma.rma_finalization_wizard_action") + .sudo() .with_context(active_id=self.id) .read()[0] ) @@ -792,6 +822,7 @@ class Rma(models.Model): # in other models action = ( self.env.ref("stock.action_picking_tree_all") + .sudo() .with_context(active_id=self.id) .read()[0] ) @@ -820,6 +851,7 @@ class Rma(models.Model): """Invoked when 'Delivery' smart button in rma form view is clicked.""" action = ( self.env.ref("stock.action_picking_tree_all") + .sudo() .with_context(active_id=self.id) .read()[0] ) @@ -929,10 +961,15 @@ class Rma(models.Model): if to_split_uom_qty > self.remaining_qty: raise ValidationError( _( - "Quantity to extract cannot be greater than remaining " - "delivery quantity (%s %s)" + "Quantity to extract cannot be greater than remaining" + " delivery quantity (%(remaining_qty)s %(product_uom)s)" + ) + % ( + { + "remaining_qty": self.remaining_qty, + "product_uom": self.product_uom.name, + } ) - % (self.remaining_qty, self.product_uom.name) ) # Reception business methods @@ -1030,12 +1067,9 @@ class Rma(models.Model): self.message_post( body=_( 'Split: %s has been created.' - ) - % ( - extracted_rma.id, - extracted_rma.name, + 'data-oe-id="%(id)d">%(name)s has been created.' ) + % ({"id": extracted_rma.id, "name": extracted_rma.name}) ) return extracted_rma @@ -1143,9 +1177,9 @@ class Rma(models.Model): rma.message_post( body=_( 'Return: %s has been created.' + 'data-oe-id="%(id)d">%(name)s has been created.' ) - % (picking.id, picking.name) + % ({"id": picking.id, "name": picking.name}) ) picking.action_confirm() picking.action_assign() @@ -1180,17 +1214,19 @@ class Rma(models.Model): if new_move: self.message_post( body=_( - "Replacement: " - 'Move %s (Picking %s) ' - "has been created." + 'Replacement: Move %(move_name)s (Picking %(picking_name)s) has' + " been created." ) % ( - new_move.id, - new_move.name_get()[0][1], - new_move.picking_id.id, - new_move.picking_id.name, + { + "move_id": new_move.id, + "move_name": new_move.name_get()[0][1], + "picking_id": new_move.picking_id.id, + "picking_name": new_move.picking_id.name, + } ) ) else: @@ -1198,12 +1234,19 @@ class Rma(models.Model): body=_( "Replacement:
" 'Product %s
' - "Quantity %f %s
" + 'data-oe-id="%(id)d">%(name)s
' + "Quantity %(qty)s %(uom)s
" "This replacement did not create a new move, but one of " "the previously created moves was updated with this data." ) - % (product.id, product.display_name, qty, uom.name) + % ( + { + "id": product.id, + "name": product.display_name, + "qty": qty, + "uom": uom.name, + } + ) ) if self.state != "waiting_replacement": self.state = "waiting_replacement" @@ -1291,10 +1334,10 @@ class Rma(models.Model): custom_values = {} subject = msg_dict.get("subject", "") body = html2plaintext(msg_dict.get("body", "")) - desc = _("E-mail subject: %s

E-mail body:
%s") % ( - subject, - body, - ) + desc = _( + "E-mail subject: %(subject)s

E-mail" + " body:
%(body)s" + ) % ({"subject": subject, "body": body}) defaults = { "description": desc, "name": _("New"), @@ -1336,8 +1379,8 @@ class Rma(models.Model): record._message_add_suggested_recipient( recipients, partner=record.partner_id, reason=_("Customer") ) - except AccessError: # no read access rights - pass + except AccessError as e: # no read access rights + _logger.debug(e) return recipients # Reporting business methods diff --git a/rma/models/stock_move.py b/rma/models/stock_move.py index 635db5d6..1e846eec 100644 --- a/rma/models/stock_move.py +++ b/rma/models/stock_move.py @@ -60,11 +60,16 @@ class StockMove(models.Model): if rma_receiver and move.quantity_done != rma_receiver.product_uom_qty: raise ValidationError( _( - "The quantity done for the product '%s' must " + "The quantity done for the product '%(id)s' must " "be equal to its initial demand because the " - "stock move is linked to an RMA (%s)." + "stock move is linked to an RMA (%(name)s)." + ) + % ( + { + "id": move.product_id.name, + "name": move.rma_receiver_ids.name, + } ) - % (move.product_id.name, move.rma_receiver_ids.name) ) res = super()._action_done(cancel_backorder=cancel_backorder) move_done = self.filtered(lambda r: r.state == "done").sudo() diff --git a/rma/readme/CONTRIBUTORS.rst b/rma/readme/CONTRIBUTORS.rst index c93f1606..75646b6d 100644 --- a/rma/readme/CONTRIBUTORS.rst +++ b/rma/readme/CONTRIBUTORS.rst @@ -3,6 +3,7 @@ * Ernesto Tejeda * Pedro M. Baeza * David Vidal + * Víctor Martínez * Chafique Delli * Giovanni Serra - Ooops diff --git a/rma/static/description/index.html b/rma/static/description/index.html index 7ebc384b..c4c225af 100644 --- a/rma/static/description/index.html +++ b/rma/static/description/index.html @@ -3,7 +3,7 @@ - + Return Merchandise Authorization Management