OCA / mis-builder-contrib

Modules that provide additional features on top of MIS Builder. A kind of incubator for MIS Builder features that may land in the core in the future.
GNU Affero General Public License v3.0
8 stars 43 forks source link

[12.0][ADD] mis builder query drilldown #13

Closed sergiocorato closed 11 months ago

sergiocorato commented 4 years ago

This PR add the ability to drilldown the values shown on the report. Depends on https://github.com/OCA/mis-builder/pull/368

AntoniRomera commented 3 years ago

I have tested the module and it works correctly except for two things, to make the tests I have added the change you have made in the 12.0 branch directly to this module, I copy the example code to you. In V13 work fine

_inherit = "mis.report"

    def _fetch_queries(self, date_from, date_to, get_additional_query_filter=None):
        self.ensure_one()
        res = super()._fetch_queries(date_from, date_to, get_additional_query_filter)

        for query in self.query_ids:
            eval_context = {
                "env": self.env,
                "time": time,
                "datetime": datetime,
                "dateutil": dateutil,
                # deprecated
                "uid": self.env.uid,
                "context": self.env.context,
            }
            domain = query.domain and safe_eval(query.domain, eval_context) or []

            res.update({query: {"domain": domain}})

        return res
sergiocorato commented 3 years ago

Thanks @AntoniRomera. @OCA/mis-builder-maintainers: is anybody interested?

AntoniRomera commented 3 years ago

I think it's a good functionality, but I think it would be necessary to extend it to work with subkpi, but the module itself seems to me super useful.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.