diff --git a/rma/__manifest__.py b/rma/__manifest__.py index f63ea855..fe9c9af8 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Return Merchandise Authorization Management", "summary": "Return Merchandise Authorization (RMA)", - "version": "12.0.1.4.3", + "version": "12.0.1.6.0", "development_status": "Beta", "category": "RMA", "website": "https://github.com/OCA/rma", diff --git a/rma/controllers/main.py b/rma/controllers/main.py index aeb6d1c8..d590b0f0 100644 --- a/rma/controllers/main.py +++ b/rma/controllers/main.py @@ -13,7 +13,11 @@ class PortalRma(CustomerPortal): def _prepare_portal_layout_values(self): values = super()._prepare_portal_layout_values() - values['rma_count'] = request.env['rma'].search_count([]) + if request.env['rma'].check_access_rights( + 'read', raise_exception=False): + values['rma_count'] = request.env['rma'].search_count([]) + else: + values['rma_count'] = 0 return values def _rma_get_page_view_values(self, rma, access_token, **kwargs): diff --git a/rma/i18n/es.po b/rma/i18n/es.po index dd2e0d74..b807bbd7 100644 --- a/rma/i18n/es.po +++ b/rma/i18n/es.po @@ -7,8 +7,8 @@ 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-08-22 13:59+0000\n" -"Last-Translator: Pedro M. Baeza \n" +"PO-Revision-Date: 2020-10-06 14:16+0000\n" +"Last-Translator: David Vidal \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" @@ -455,7 +455,7 @@ msgid "Customer Portal URL" msgstr "URL del portal de cliente" #. module: rma -#: code:addons/rma/controllers/main.py:38 +#: code:addons/rma/controllers/main.py:42 #: 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 @@ -536,7 +536,7 @@ msgid "Draft RMA" msgstr "RMA en estado Borrador" #. module: rma -#: code:addons/rma/models/rma.py:1097 +#: code:addons/rma/models/rma.py:1098 #, python-format msgid "" "E-mail subject: %s\n" @@ -639,7 +639,7 @@ msgstr "" "sin eliminarlo." #. module: rma -#: code:addons/rma/models/rma.py:1101 +#: code:addons/rma/models/rma.py:1102 #, python-format msgid "Incoming e-mail" msgstr "Correo electrónico entrante" @@ -692,6 +692,11 @@ msgstr "Última actualización por" msgid "Last Updated on" msgstr "Última actualización el" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search +msgid "Late RMAs" +msgstr "RMAs retrasados" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__location_id msgid "Location" @@ -736,7 +741,7 @@ msgid "Messages" msgstr "Mensajes" #. module: rma -#: code:addons/rma/controllers/main.py:39 +#: code:addons/rma/controllers/main.py:43 #: 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 @@ -746,7 +751,7 @@ msgstr "Nombre" #. module: rma #: code:addons/rma/models/rma.py:31 code:addons/rma/models/rma.py:494 -#: code:addons/rma/models/rma.py:1100 +#: code:addons/rma/models/rma.py:1101 #, python-format msgid "New" msgstr "Nuevo" @@ -993,6 +998,16 @@ msgstr "RMA nº" msgid "RMA Code" msgstr "Código de RMA" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search +msgid "RMA Date" +msgstr "Fecha de RMA" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search +msgid "RMA Deadline" +msgstr "RMA fecha límite" + #. module: rma #: code:addons/rma/models/stock_warehouse.py:82 #, python-format @@ -1106,6 +1121,16 @@ msgstr "Equipo de RMA" msgid "RMAs" msgstr "RMAs" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search +msgid "RMAs which deadline has passed" +msgstr "RMAs pasados de fecha límite" + +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search +msgid "RMAs yet to be fully processed" +msgstr "RMAs pendientes de ser procesados por completo" + #. module: rma #: model_terms:ir.ui.view,arch_db:rma.rma_view_form msgid "Receipt" @@ -1188,7 +1213,7 @@ msgid "Replaced" msgstr "Reemplazado" #. module: rma -#: code:addons/rma/models/rma.py:1010 +#: code:addons/rma/models/rma.py:1011 #, python-format msgid "" "Replacement: Move %s) ha sido creado." #. module: rma -#: code:addons/rma/models/rma.py:1021 +#: code:addons/rma/models/rma.py:1022 #, python-format msgid "" "Replacement:
Product %s%s foi criada." #. module: rma -#: code:addons/rma/models/rma.py:1021 +#: code:addons/rma/models/rma.py:1022 #, python-format msgid "" "Replacement:
Product %s%s (Picking %s) has been created." msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:1021 +#: code:addons/rma/models/rma.py:1022 #, python-format msgid "Replacement:
Product %s
Quantity %f %s
This replacement did not create a new move, but one of the previously created moves was updated with this data." msgstr "" @@ -1156,7 +1181,7 @@ msgid "Return to customer" msgstr "" #. module: rma -#: code:addons/rma/models/rma.py:971 +#: code:addons/rma/models/rma.py:972 #, python-format msgid "Return: %s has been created." msgstr "" @@ -1252,7 +1277,7 @@ msgid "State" msgstr "" #. module: rma -#: code:addons/rma/controllers/main.py:40 +#: code:addons/rma/controllers/main.py:44 #: model_terms:ir.ui.view,arch_db:rma.portal_my_rmas #, python-format msgid "Status" @@ -1397,6 +1422,11 @@ msgstr "" msgid "Unread Messages Counter" msgstr "" +#. module: rma +#: model_terms:ir.ui.view,arch_db:rma.rma_view_search +msgid "Unresolved RMAs" +msgstr "" + #. module: rma #: model:ir.model.fields,field_description:rma.field_rma__product_uom msgid "UoM" diff --git a/rma/migrations/12.0.2.0.0/post-migration.py b/rma/migrations/12.0.2.0.0/post-migration.py new file mode 100644 index 00000000..77fe95b4 --- /dev/null +++ b/rma/migrations/12.0.2.0.0/post-migration.py @@ -0,0 +1,10 @@ +# 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/rma.py b/rma/models/rma.py index 191bc965..ee40d060 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -176,7 +176,7 @@ class Rma(models.Model): copy=False, track_visibility="onchange", ) - description = fields.Text( + description = fields.Html( states={ 'locked': [('readonly', True)], 'cancelled': [('readonly', True)], @@ -965,8 +965,9 @@ class Rma(models.Model): picking_id=picking.id, rma_id=rma.id, move_orig_ids=[(4, rma.reception_move_id.id)], + company_id=picking.company_id.id, ) - self.env['stock.move'].create(move_vals) + self.env['stock.move'].sudo().create(move_vals) rma.message_post( body=_( 'Return:
RMA Note: -

+

diff --git a/rma/views/rma_portal_templates.xml b/rma/views/rma_portal_templates.xml index 9219c044..33b6e98e 100644 --- a/rma/views/rma_portal_templates.xml +++ b/rma/views/rma_portal_templates.xml @@ -16,7 +16,7 @@