Skip to content

WIP: [IMP] session_db: Add a way to parse binary data from session data#167

Open
JonathanOsAlc wants to merge 6 commits intoVauxoo:16.0from
vauxoo-dev:16.0-issue3011-jonathanosalc
Open

WIP: [IMP] session_db: Add a way to parse binary data from session data#167
JonathanOsAlc wants to merge 6 commits intoVauxoo:16.0from
vauxoo-dev:16.0-issue3011-jonathanosalc

Conversation

@JonathanOsAlc
Copy link

@JonathanOsAlc JonathanOsAlc commented Jun 5, 2025

Description of the issue/feature this PR addresses:

Current behaviour before PR:

  • When the session has a key with a binary value and uses the session_db module, it triggers an error because the binary value can't be written to the database of session_db.
  • Also, it trigger error when the value is int or float and Odoo wants to render that value like monetary.

Desired behavior after PR is merged:

  • Add a way to detect the binary values to parse as strings when saving the session to the database.
    • To identify the data, that was converted from binary to str, add a prefix base64:: to the string.
    • Then when the session needs to be read, detect the values modified, and parse again to base64.
  • Also verify if some value of session is a monetary value and parse to float type.

OCA PR: OCA#3496

@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-issue3011-jonathanosalc branch from 846fe5e to 5c07589 Compare June 5, 2025 20:14
@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-issue3011-jonathanosalc branch 2 times, most recently from 6ee9f42 to 6e83a37 Compare July 10, 2025 04:10
@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-issue3011-jonathanosalc branch from 6e83a37 to f5a8872 Compare September 4, 2025 22:54
@moylop260
Copy link

Do you think it could be std for OCA?

@JonathanOsAlc
Copy link
Author

Do you think it could be std for OCA?

Yes, I think so.
Without it, when we send binary data via sessions using session_db, it will trigger an error.

@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-issue3011-jonathanosalc branch from f5a8872 to 25580a2 Compare October 29, 2025 03:56
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (16.0@24ee7e3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             16.0     #167   +/-   ##
=======================================
  Coverage        ?   84.31%           
=======================================
  Files           ?       34           
  Lines           ?     1039           
  Branches        ?      119           
=======================================
  Hits            ?      876           
  Misses          ?      121           
  Partials        ?       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-issue3011-jonathanosalc branch from 25580a2 to 9fa9191 Compare October 29, 2025 05:08
@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-issue3011-jonathanosalc branch from a0dbe34 to ba19b2e Compare November 12, 2025 23:24
@moylop260
Copy link

Could you create the PR to OCA and tag to the authors, please?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants