Skip to content
Snippets Groups Projects

Fix analytic_get_view function

Merged oury.balde requested to merge topic/16.0/ob into branch/16.0

An AttributeError occurs when including analytics from the wrong analytic model.

The error message indicates that the object does not have the attribute "_required_analytic_fields". To resolve this, replace the line:

required = self.env[view["model"]]._required_analytic_fields()

with:

model_analytic = model.replace("_", ".") required = self.env[model_analytic]._required_analytic_fields()

This change ensures that the correct analytic model is referenced, avoiding the AttributeError and enabling the retrieval of the required analytics fields.

--HG-- branch : 16.0

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading