mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
- 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.
14 lines
395 B
Python
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
|