mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX] fix filter rma location based on the sale order company
This commit is contained in:
committed by
Alex Vining
parent
d26235fde4
commit
24889128cd
@@ -9,7 +9,12 @@ class SaleOrderRmaWizard(models.TransientModel):
|
|||||||
_description = "Sale Order Rma Wizard"
|
_description = "Sale Order Rma Wizard"
|
||||||
|
|
||||||
def _domain_location_id(self):
|
def _domain_location_id(self):
|
||||||
rma_loc = self.env["stock.warehouse"].search([]).mapped("rma_loc_id")
|
sale = self.env["sale.order"].browse(self.env.context.get("active_id"))
|
||||||
|
rma_loc = (
|
||||||
|
self.env["stock.warehouse"]
|
||||||
|
.search([("company_id", "=", sale.company_id.id)])
|
||||||
|
.mapped("rma_loc_id")
|
||||||
|
)
|
||||||
return [("id", "child_of", rma_loc.ids)]
|
return [("id", "child_of", rma_loc.ids)]
|
||||||
|
|
||||||
order_id = fields.Many2one(
|
order_id = fields.Many2one(
|
||||||
|
|||||||
Reference in New Issue
Block a user