From e0591346a4ad4d256bc2e4e49bfa5a8e21f22f45 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 7 Jun 2018 11:28:11 +0200 Subject: [PATCH] [FIX] purchase: fix test_main_flows. The action 'account.action_invoice_tree2' has been changed into a server action, so we want to open the tree view of invoices by modifying some values of the action we should now use the xml reference 'account.action_vendor_bill_template'. Additionally, the help tooltip is now completed as would do the server action --- addons/purchase/models/purchase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 7390b81287a..0b795300c3e 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -367,7 +367,7 @@ class PurchaseOrder(models.Model): This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately. ''' - action = self.env.ref('account.action_invoice_tree2') + action = self.env.ref('account.action_vendor_bill_template') result = action.read()[0] # override the context to get rid of the default filtering @@ -385,6 +385,10 @@ class PurchaseOrder(models.Model): res = self.env.ref('account.invoice_supplier_form', False) result['views'] = [(res and res.id or False, 'form')] result['res_id'] = self.invoice_ids.id + + # complete the help tooltip + new_help = self.env['account.invoice'].complete_empty_list_help() + result['help'] = result.get('help', '') + new_help return result @api.multi