summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxLarue <mla@odoo.com>2019-08-30 15:39:19 +0000
committerGeoffroy Larue <gla@odoo.com>2019-09-18 12:05:19 +0000
commitecd8d38fdcbd48da1496f8e44b0ccb2d6fab48e5 (patch)
tree8388c6c2530703049daa860c20ed86b128e2e498
parent8291fae0ef268125484eedd32a5ff3442d75ad5b (diff)
[FIX] sale_timesheet: fix action_timesheet_from_invoice
The action_timesheet_from_invoice was not working anymore, it was redirecting to a list of all timesheet instead of only those linked to the actual invoice. It seems like the action was using a filter since it passed a search_default_* key in the context, but that filter is nowhere to be found. In order to fix the action, it was converted int a python method which gave access to the active move id. related task 2047389
-rw-r--r--addons/sale_timesheet/views/account_invoice_views.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_timesheet/views/account_invoice_views.xml b/addons/sale_timesheet/views/account_invoice_views.xml
index fceb01f7446..d9b15dc7358 100644
--- a/addons/sale_timesheet/views/account_invoice_views.xml
+++ b/addons/sale_timesheet/views/account_invoice_views.xml
@@ -6,7 +6,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.line</field>
<field name="view_mode">tree,form,graph</field>
- <field name="context">{'search_default_timesheet_invoice_id': active_id}</field>
+ <field name="domain">[('timesheet_invoice_id', '=', active_id)]</field>
</record>
<record id="account_invoice_view_form_inherit_sale_timesheet" model="ir.ui.view">