File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
crm_claim_analytic/models Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,11 @@ def _compute_analytic_amount(self):
3232
3333 def button_account_analytic_line_action (self ):
3434 self .ensure_one ()
35- action = self .env .ref ("analytic.account_analytic_line_action_entries" )
36- action_dict = action .read ()[0 ] if action else {}
37- action_dict ["context" ] = safe_eval (action_dict .get ("context" , "{}" ))
38- action_dict ["context" ].update (
35+ action = self .env ["ir.actions.act_window" ]._for_xml_id (
36+ "analytic.account_analytic_line_action_entries"
37+ )
38+ action ["context" ] = safe_eval (action .get ("context" , "{}" ))
39+ action ["context" ].update (
3940 {
4041 "search_default_claim_id" : self .id ,
4142 "default_claim_id" : self .id ,
@@ -48,5 +49,5 @@ def button_account_analytic_line_action(self):
4849 safe_eval (action .domain or "[]" ),
4950 ]
5051 )
51- action_dict .update ({"domain" : domain })
52- return action_dict
52+ action .update ({"domain" : domain })
53+ return action
You can’t perform that action at this time.
0 commit comments