mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX+IMP] rma, rma_sale: fix bugs and add improvements
- Fix thrown error when trying to download a picking from the portal. - Add the hook method to prepare RMA values from the return pick wizard. - Add the access rule for portal users. - Show the portal 'Request RMAs' button on the sales page only to users related to the sales order. [UPD] Update rma_sale.pot rma_sale 12.0.1.3.0 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: rma-12.0/rma-12.0-rma_sale Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/
This commit is contained in:
committed by
Alex Vining
parent
26ecb18f95
commit
ea60be4787
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Return Merchandise Authorization Management - Link with Sales",
|
||||
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
|
||||
"version": "12.0.1.2.0",
|
||||
"version": "12.0.1.3.0",
|
||||
"development_status": "Beta",
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
|
||||
@@ -34,6 +34,9 @@ class CustomerPortal(CustomerPortal):
|
||||
rma = wizard.sudo().create_rma(from_portal=True)
|
||||
for rec in rma:
|
||||
rec.origin += _(' (Portal)')
|
||||
# Add the user as follower of the created RMAs so they can
|
||||
# later view them.
|
||||
rma.message_subscribe([request.env.user.partner_id.id])
|
||||
if len(rma) == 0:
|
||||
route = order_sudo.get_portal_url()
|
||||
else:
|
||||
|
||||
@@ -307,6 +307,11 @@ msgstr "Asistente de Orden de Venta - RMA"
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Línea de pedido de venta"
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model,name:rma_sale.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimiento"
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
|
||||
msgid "Unit of Measure"
|
||||
@@ -336,6 +341,3 @@ msgstr "Solo puedes crear RMAs desde una orden de venta confirmada o hecha."
|
||||
#~| msgid "Delivery"
|
||||
#~ msgid "Is Sale Delivery"
|
||||
#~ msgstr "Es entrega de orden de venta"
|
||||
|
||||
#~ msgid "Stock Move"
|
||||
#~ msgstr "Movimiento"
|
||||
|
||||
@@ -305,6 +305,11 @@ msgstr "Assistente do Pedido de Venda RMA"
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Linha do Pedido de Venda"
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model,name:rma_sale.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
|
||||
msgid "Unit of Measure"
|
||||
|
||||
@@ -287,6 +287,11 @@ msgstr ""
|
||||
msgid "Sales Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model,name:rma_sale.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__uom_id
|
||||
msgid "Unit of Measure"
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
|
||||
from . import rma
|
||||
from . import sale
|
||||
from . import stock_move
|
||||
|
||||
@@ -77,7 +77,6 @@ class SaleOrder(models.Model):
|
||||
def get_portal_delivery_rma_data(self):
|
||||
self.ensure_one()
|
||||
data = []
|
||||
|
||||
rma_product = self.rma_ids.mapped('product_id')
|
||||
for line in self.order_line.filtered(
|
||||
lambda r: r.product_id not in rma_product):
|
||||
|
||||
13
rma_sale/models/stock_move.py
Normal file
13
rma_sale/models/stock_move.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
_inherit = "stock.move"
|
||||
|
||||
def _prepare_return_rma_vals(self, original_picking):
|
||||
res = super()._prepare_return_rma_vals(original_picking)
|
||||
res.update(order_id=original_picking.sale_id.id)
|
||||
return res
|
||||
Reference in New Issue
Block a user