Files
rma/rma_sale/models/stock_move.py
Ernesto Tejeda fbffdc71b2 [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.
2020-08-20 08:37:52 -04:00

14 lines
395 B
Python

# 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