Skip to content

add support for default values in types system#1921

Merged
mcm-odoo merged 2 commits into
masterfrom
master-default-values-ged
Jun 11, 2026
Merged

add support for default values in types system#1921
mcm-odoo merged 2 commits into
masterfrom
master-default-values-ged

Conversation

@ged-odoo

@ged-odoo ged-odoo commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@ged-odoo ged-odoo force-pushed the master-default-values-ged branch 4 times, most recently from c3b19c4 to b083014 Compare June 11, 2026 08:43
ged-odoo added 2 commits June 11, 2026 10:46
With this commit, we introduce a more powerful api to define default and
optional values:

- types.string().default("abc")
- types.string().optional()

These two modifiers allow to define some metadata with the schema to be
validated. We also can apply the default values with the applyDefault
function.
Since all examples rename the import alias as t, we might as well
provide a nice alias to make it more convenient
@ged-odoo ged-odoo force-pushed the master-default-values-ged branch from b083014 to 50bd43c Compare June 11, 2026 08:47
@mcm-odoo mcm-odoo merged commit 739fc96 into master Jun 11, 2026
2 checks passed
@mcm-odoo mcm-odoo deleted the master-default-values-ged branch June 11, 2026 08:52
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