Skip to content

Commit

Permalink
[FIX] report_substitute: handle reports without xml_id
Browse files Browse the repository at this point in the history
The change replaces self._for_xml_id(action_report.xml_id) with action_report.read()[0] to avoid errors when reports do not have an xml_id, such as when they are created via the interface.
  • Loading branch information
lef-adhoc committed Aug 30, 2024
1 parent f93dd61 commit 2b1fc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion report_substitute/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_substitution_report_action(self, action, active_ids):
substitution_report = action_report._get_substitution_report(
action_report.model, active_ids
)
action.update(self._for_xml_id(action_report.xml_id))
action.update(action_report.read()[0])

return action

Expand Down

0 comments on commit 2b1fc31

Please sign in to comment.