Skip to content

[ADD] base_sparse_field_jsonb#3480

Open
bosd wants to merge 3 commits intoOCA:19.0from
bosd:19.0-add-base_sparse_field_jsonb
Open

[ADD] base_sparse_field_jsonb#3480
bosd wants to merge 3 commits intoOCA:19.0from
bosd:19.0-add-base_sparse_field_jsonb

Conversation

@bosd
Copy link
Copy Markdown
Contributor

@bosd bosd commented Jan 2, 2026

References
· PostgreSQL JSONB documentation: https://www.postgresql.org/docs/current/datatype-json.html
· GIN index documentation: https://www.postgresql.org/docs/current/gin.html
· OCA attribute_set: https://github.com/OCA/odoo-pim
· Related issue: OCA/odoo-pim#153

@bosd bosd force-pushed the 19.0-add-base_sparse_field_jsonb branch from 5fba59d to 820929f Compare January 2, 2026 15:50
@rvalyi
Copy link
Copy Markdown
Member

rvalyi commented Jan 3, 2026

@bosd I'm not sure I understand why you depend on attribute_set here. You want to build a supercharged attribute_set module with JSONB, right? That sounds legit but should this be done inside the server-tools base_sparse_fields_jsonb module? Wouldn't it be better to leave base_sparse_fields_jsonb without attribute_set dependency and create another attribute_set_jsonb module in OCA/odoo-pim or make attribute_set depend on base_sparse_fields_jsonb eventually?

Disclaimer I didn't read your code carefully yet.

@bosd
Copy link
Copy Markdown
Contributor Author

bosd commented Jan 3, 2026

Wouldn't it be better to leave base_sparse_fields_jsonb without attribute_set dependency and create another attribute_set_jsonb module in OCA/odoo-pim or make attribute_set depend on base_sparse_fields_jsonb eventually?

@rvalyi I was indeed contemplating about this. Placing it in a separeate module in the pim repo would keep this base implementation more basic, clean and flexible. But there are some more modules / improvements to get to a full working stack. Wanted to prevent, that we end up with a lot of glue modules and puzzle to get it up and running.

I will later separate the latest commits and place it in their own module.

This module as it sits here, could potentially be merged into base_sparse, but for now i think it is better to keep it separate.

@rvalyi
Copy link
Copy Markdown
Member

rvalyi commented Jan 24, 2026

@bosd this starts to look pretty solid. kudos for the work! I would say what is missing for now are some tests inside this module. You can probably adapt some tests from the original module https://github.com/odoo/odoo/blob/19.0/addons/base_sparse_field/tests/test_sparse_fields.py
Tell us when it's ready for review. cc @sebastienbeau

@bosd bosd force-pushed the 19.0-add-base_sparse_field_jsonb branch from d14cd63 to 5c47e95 Compare January 24, 2026 14:16
@bosd bosd force-pushed the 19.0-add-base_sparse_field_jsonb branch from dd4086a to d9495a2 Compare January 24, 2026 14:58
@bosd bosd marked this pull request as ready for review January 24, 2026 15:02
@bosd
Copy link
Copy Markdown
Contributor Author

bosd commented Jan 24, 2026

@rvalyi , @sebastienbeau , cc: @alexis-via It is ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants