Skip to content

[19.0][MIG] bi_sql_editor: Migration to 19.0#1102

Merged
OCA-git-bot merged 125 commits intoOCA:19.0from
adhoc-dev:19.0-mig-bi_sql_editor
Feb 2, 2026
Merged

[19.0][MIG] bi_sql_editor: Migration to 19.0#1102
OCA-git-bot merged 125 commits intoOCA:19.0from
adhoc-dev:19.0-mig-bi_sql_editor

Conversation

@lef-adhoc
Copy link
Contributor

@lef-adhoc lef-adhoc commented Nov 28, 2025

legalsylvain and others added 30 commits November 28, 2025 11:22
…fresh date time on the action name of each sql materialized view
Fix error '... is not a table or foreign table'
Fix view (colors + oe_highlight)
Fix tests
Fix README + manifest
Fix back to draft
Fix cron call + default values
Use Postgres version 9.6 for travis builds
* [IMP] is_materialized field non readonly on sql_valid state ; [FIX] block possibility to set indexes on non materialized view

* [FIX] set domain_force, group_ids readonly if state > sql_valid

* [IMP] better display of the field group_ids

* [IMP] possibility to reorder menu items from sql views

* [IMP] Do not warn user when setting sql view to draft if state is sql_valid

* [REF]

* [FIX] Set Date of the first execution in the action name
[UPD] Update bi_sql_editor.pot

[UPD] Update bi_sql_editor.pot

[UPD] Update bi_sql_editor.pot
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
bi_sql_editor 12.0.1.1.0

[UPD] README.rst

[UPD] README.rst
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: reporting-engine-12.0/reporting-engine-12.0-bi_sql_editor
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-bi_sql_editor/
Currently translated at 29.1% (32 of 110 strings)

Translation: reporting-engine-12.0/reporting-engine-12.0-bi_sql_editor
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-bi_sql_editor/de/
def _get_user(cls, access_level=False):
if access_level == "manager":
cls.demo_user.write({"groups_id": [(6, 0, cls.group_bi_manager.ids)]})
cls.demo_user.write({"group_ids": [(6, 0, cls.group_bi_manager.ids)]})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check the commit “[MIG] bi_sql_editor: Migration to 19.0”? It's like that.

Copy link
Contributor

@yankinmax yankinmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of suggestions

@lef-adhoc lef-adhoc force-pushed the 19.0-mig-bi_sql_editor branch from 4927854 to 3144fdc Compare December 16, 2025 14:56
@lef-adhoc lef-adhoc force-pushed the 19.0-mig-bi_sql_editor branch 2 times, most recently from 8cc1347 to b66eb95 Compare December 31, 2025 15:04
Copy link

@vvrossem vvrossem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @yankinmax: it would be a nice opportunity to use Command instead of keeping the "old" way

</record>
<record id="sql_request_abstract.group_sql_request_user" model="res.groups">
<field name="users" eval="[(4, ref('base.user_demo'))]" />
<field name="user_ids" eval="[(4, ref('base.user_demo'))]" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="user_ids" eval="[(4, ref('base.user_demo'))]" />
<field name="user_ids" eval="[Command.link(ref('base.user_demo'))]" />

@@ -3,11 +3,11 @@

from odoo.exceptions import AccessError, UserError, ValidationError
from odoo.tests import tagged
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from odoo.tests import tagged
from odoo.tests import new_test_user, tagged

cls.group_bi_no_access = cls.env.ref("base.group_user")
cls.demo_user = cls.env.ref("base.user_demo")
cls.view = cls.env.ref("bi_sql_editor.partner_sql_view")
cls.demo_user = cls.env["res.users"].create(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cls.demo_user = cls.env["res.users"].create(
cls.demo_user = new_test_user(cls.env, login='demo_bi_sql', groups='base.group_user', name='Demo User', email='demo@example.com')

@psugne
Copy link

psugne commented Jan 13, 2026

@lef-adhoc how is going with this one?

@lef-adhoc lef-adhoc force-pushed the 19.0-mig-bi_sql_editor branch from b66eb95 to 887773e Compare January 13, 2026 14:49
@lef-adhoc
Copy link
Contributor Author

@vvrossem @psugne Done!

@psugne
Copy link

psugne commented Jan 27, 2026

@lef-adhoc Would it be possible to update TestBiSqlViewEditor.test_security to search for the view by ID instead of name? For example:
def test_security(self): with self.assertRaises(AccessError): self.bi_sql_view.with_user(self._get_user()).search( [("id", "=", self.view.id)] ) bi = self.bi_sql_view.with_user(self._get_user("manager")).search( [("id", "=", self.view.id)] ) self.assertEqual( len(bi), 1, f"BI Manager should have access to the specific record: {self.view.name}", )

When running this test in my module, it currently fails due to search mismatches:
AssertionError: 2 != 1 : BI Manager should have access to bi Partners View
Searching by ID instead of name should make the test more deterministic and avoid collisions when multiple records share the same name.

@yankinmax
Copy link
Contributor

Hello @lef-adhoc , can you pls address the suggestions and finish the migration?

@lef-adhoc lef-adhoc force-pushed the 19.0-mig-bi_sql_editor branch from 887773e to f31b335 Compare February 2, 2026 15:01
@lef-adhoc
Copy link
Contributor Author

@yankinmax Done!

@yankinmax
Copy link
Contributor

@lef-adhoc the related PR is merged, and we can ping maintainers to merge this one. Can you update?

@lef-adhoc lef-adhoc force-pushed the 19.0-mig-bi_sql_editor branch from f31b335 to 088160d Compare February 2, 2026 15:44
@yankinmax
Copy link
Contributor

Hello @HviorForgeFlow
Sorry, pinging you directly.
Can we probably merge this migration PR?

@lef-adhoc
Copy link
Contributor Author

@yankinmax Done, I deleted the commit

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@HviorForgeFlow
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 19.0-ocabot-merge-pr-1102-by-HviorForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit fdd707b into OCA:19.0 Feb 2, 2026
5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 429646a. Thanks a lot for contributing to OCA. ❤️

@lef-adhoc lef-adhoc deleted the 19.0-mig-bi_sql_editor branch February 2, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.