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
Pedro M. Baeza
parent
1b470773f9
commit
dfb9c20919
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Return Merchandise Authorization Management - Link with Sales",
|
||||
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "14.0.1.0.1",
|
||||
"development_status": "Production/Stable",
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
|
||||
@@ -9,7 +9,12 @@ class SaleOrderRmaWizard(models.TransientModel):
|
||||
_description = "Sale Order Rma Wizard"
|
||||
|
||||
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)]
|
||||
|
||||
order_id = fields.Many2one(
|
||||
|
||||
Reference in New Issue
Block a user