Skip to content

Conversation

@JonathanOsAlc
Copy link

@JonathanOsAlc JonathanOsAlc commented Jan 19, 2026

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 as monetary.
  • And when using debug in the URL parameter and the value is a number, for example: URL?debug=1

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.
  • And keep string type in the value of the 'debug' website parameter.

@OCA-git-bot
Copy link
Contributor

Hi @sbidoul,
some modules you are maintaining are being modified, check this out!

@JonathanOsAlc JonathanOsAlc changed the title [][IMP] session_db: Modify the way to parse data from session data [16.0][IMP] session_db: Modify the way to parse data from session data Jan 19, 2026
@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-imp_session_db-jonathanosalc branch 2 times, most recently from 5eff4a6 to 91caeee Compare January 20, 2026 01:58
- 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.
- Verify if some value of the session is a monetary value and parse
  it to a float type.
- Keep string type in the value of the 'debug' website parameter.
@JonathanOsAlc JonathanOsAlc force-pushed the 16.0-imp_session_db-jonathanosalc branch from f1b2a8c to 749bb90 Compare January 20, 2026 02:16
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.

2 participants