summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorqdp-odoo <qdp@odoo.com>2018-06-07 11:28:11 +0200
committerqdp-odoo <qdp@odoo.com>2018-06-07 11:28:11 +0200
commite0591346a4ad4d256bc2e4e49bfa5a8e21f22f45 (patch)
tree383b92d2cbb36892546d790c379c8b021a9671cb /addons
parentb6642f1b702fc32f765dfd24e855a652572a83e1 (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/purchase/models/purchase.py6
1 files changed, 5 insertions, 1 deletions
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