Skip to content

Conversation

@JonathanOsAlc
Copy link

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!

- 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 5c49968 to 3c70bb6 Compare January 20, 2026 04:50
@sbidoul
Copy link
Member

sbidoul commented Jan 20, 2026

Hello and thanks for contributing!

To help me understand your PR, can you elaborate the problem you are addressing? In particular do they also occur with the standard Odoo session or only with session_db? Do they occur with standard Odoo modules or custom code?

Can you also elaborate what the problem with debug=1, as I personally never noticed any problem in debug mode with session_db.

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