mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
This module extends the `rma_procurement_customer` module to ensure that the customer information is automatically propagated to any stock pickings created as part of an RMA process.
16 lines
412 B
Python
16 lines
412 B
Python
# Copyright 2024 ACSONE SA/NV
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import models
|
|
|
|
|
|
class Rma(models.Model):
|
|
|
|
_inherit = "rma"
|
|
|
|
def _prepare_procurement_group_vals(self):
|
|
res = super()._prepare_procurement_group_vals()
|
|
if self.move_id.picking_id.customer_id:
|
|
res["customer_id"] = self.move_id.picking_id.customer_id.id
|
|
return res
|