mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[12.0][FIX] Stock Request Order purchase button fix
This commit is contained in:
committed by
Jesús Alan Ramos Rodríguez
parent
a5bdd55a38
commit
7b73ae547a
@@ -33,6 +33,10 @@ class StockRequestOrder(models.Model):
|
||||
purchases = self.mapped('purchase_ids')
|
||||
if len(purchases) > 1:
|
||||
action['domain'] = [('id', 'in', purchases.ids)]
|
||||
action['views'] = [
|
||||
(self.env.ref('purchase.purchase_order_tree').id, 'tree'),
|
||||
(self.env.ref('purchase.purchase_order_form').id, 'form'),
|
||||
]
|
||||
elif purchases:
|
||||
action['views'] = [
|
||||
(self.env.ref('purchase.purchase_order_form').id, 'form')]
|
||||
|
||||
Reference in New Issue
Block a user