[IMP] stock: don't show layout config before Routes diagram

When an external report layout has not been setup and an admin user
tries to click on Routes: View Diagram within a product form > Inventory
then the document template setup would open even though it is not
necessary for this diagram.

Specification 10 of inventory usability task.
Task: 2206279
Related Enterprise PR: odoo/enterprise#10723
This commit is contained in:
Tiffany Chang (tic)
2020-06-22 11:55:26 +00:00
parent 8f7fb1843f
commit 688824ed30
+1 -1
View File
@@ -797,7 +797,7 @@ class ProductTemplate(models.Model):
return self.env.ref('stock.action_report_stock_rule').report_action(None, data={
'product_id': products.id,
'warehouse_ids': warehouse.ids,
})
}, config=False)
action = self.env.ref('stock.action_stock_rules_report').read()[0]
action['context'] = self.env.context
return action