Skip to content

Commit

Permalink
Merge pull request #637 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/reporting-engine (16.0)
  • Loading branch information
bt-admin authored Jan 30, 2024
2 parents 7cbf05f + 69488d0 commit 6f01698
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Available addons
addon | version | maintainers | summary
--- | --- | --- | ---
[base_comment_template](base_comment_template/) | 16.0.2.2.1 | | Add conditional mako template to any reporton models that inherits comment.template.
[bi_sql_editor](bi_sql_editor/) | 16.0.1.1.0 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | BI Views builder, based on Materialized or Normal SQL Views
[bi_sql_editor](bi_sql_editor/) | 16.0.1.1.1 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | BI Views builder, based on Materialized or Normal SQL Views
[bi_view_editor](bi_view_editor/) | 16.0.1.1.0 | | Graphical BI views builder for Odoo
[bi_view_editor_spreadsheet_dashboard](bi_view_editor_spreadsheet_dashboard/) | 16.0.1.0.0 | | Glue module for BI View Editor and Spreadsheet Dashboard
[report_async](report_async/) | 16.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Central place to run reports live or async
Expand Down
2 changes: 1 addition & 1 deletion bi_sql_editor/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BI SQL Editor
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:327d027ee785e0d7ff932ba533aef3579798872320e6ea84057f7f224e144198
!! source digest: sha256:f10760dc18043c9ccf1eb3c0a1d4663407a6016eb9c7397d9612e66f6d68252c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion bi_sql_editor/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "BI SQL Editor",
"summary": "BI Views builder, based on Materialized or Normal SQL Views",
"version": "16.0.1.1.0",
"version": "16.0.1.1.1",
"license": "AGPL-3",
"category": "Reporting",
"author": "GRAP,Odoo Community Association (OCA)",
Expand Down
23 changes: 16 additions & 7 deletions bi_sql_editor/models/bi_sql_view_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,19 @@ def _prepare_search_field(self):

def _prepare_search_filter_field(self):
self.ensure_one()
if not self.is_group_by:
return ""
return (
f"""<filter name="group_by_{self.name}" """
f"""string="{self.field_description}" """
f"""context="{{'group_by':'{self.name}'}}"/>\n"""
)
group_by_filter = ""
field_filter = ""
if self.is_group_by:
group_by_filter = (
f"""<filter name="group_by_{self.name}" """
f"""string="{self.field_description}" """
f"""context="{{'group_by':'{self.name}'}}"/>\n"""
)
if self.ttype in ["date", "datetime"]:
field_filter = (
f"""<filter name="filter_{self.name}" """
f"""string="{self.field_description}" """
f"""date="{self.name}"/>\n"""
)
res = "%s%s" % (field_filter, group_by_filter)
return res
2 changes: 1 addition & 1 deletion bi_sql_editor/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">BI SQL Editor</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:327d027ee785e0d7ff932ba533aef3579798872320e6ea84057f7f224e144198
!! source digest: sha256:f10760dc18043c9ccf1eb3c0a1d4663407a6016eb9c7397d9612e66f6d68252c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/16.0/bi_sql_editor"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_sql_editor"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of reporting, to support creation
Expand Down

0 comments on commit 6f01698

Please sign in to comment.