Skip to content
Snippets Groups Projects
Commit e0591346 authored by Quentin De Paoli's avatar Quentin De Paoli
Browse files

[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
parent b6642f1b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment