Skip to content

Conversation

@ivantodorovich
Copy link
Contributor

Empty values in the source must be treated as False to be aligned with Odoo's ORM.

For example, 'ref': '' must be treated as False, which translates to a NULL value in the database.

Otherwise, the value is set to an empty string, which is a bit unexpected by the ORM, and may cause unexpected behaviors like UNIQUE constraint violations, usually not possible to reproduce with standard Odoo's flow

@OCA-git-bot
Copy link
Contributor

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

@ivantodorovich ivantodorovich marked this pull request as ready for review December 16, 2025 18:53
@ivantodorovich ivantodorovich force-pushed the 18.0-imp-dynamic-mapper-empty-value branch from 18a0b3c to bf27251 Compare December 23, 2025 16:32
Empty values in the source must be treated as `False` to be aligned with Odoo's
ORM.

For example, 'ref': '' must be treated as `False`, which translates to a NULL
value in the database.

Otherwise, the value is set to an empty string, which is a bit unexpected by the
ORM, and may cause unexpected behaviors like UNIQUE constraint violations,
usually not possible to reproduce with standard Odoo's flows.
…e_id

The new warning caught this silent error, so this fixes it.

```
WARNING odoo [importer]: Field `title_id` not found in model `res.partner`
```
@ivantodorovich ivantodorovich force-pushed the 18.0-imp-dynamic-mapper-empty-value branch from bf27251 to a231a93 Compare December 23, 2025 17:24
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