server-tools icon indicating copy to clipboard operation
server-tools copied to clipboard

[ADD] field_float_nullable: New field type float that supports NULL v…

Open samirGuesmi opened this issue 7 months ago • 3 comments

New field type float that supports NULL values instead of defaulting to 0.0

In standard Odoo, fields.Float does not support distinguishing between 0.0 and NULL (i.e., an unset value). By default, if a float field is left empty in the UI, it is stored as 0.0 in the database. The goal is to allow users and developers to identify whether a float field has been filled in or not — something that cannot be reliably determined when 0.0 is used by default. The module also integrates fully with Odoo’s UI (form views, list views, export, custom filters

samirGuesmi avatar May 08 '25 11:05 samirGuesmi

Thanks @sbidoul for the review! I've applied the suggested changes.

samirGuesmi avatar May 09 '25 09:05 samirGuesmi

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

OCA-git-bot avatar May 13 '25 11:05 OCA-git-bot

Thans @sbidoul and @AnizR for the review. here is the updated version.

samirGuesmi avatar May 21 '25 15:05 samirGuesmi