Skip to content

[19.0] Port modules as not installable from 16 - #151

Closed
simahawk wants to merge 395 commits into
OCA:19.0from
camptocamp:19-port-from-16
Closed

simahawk wants to merge 395 commits into
OCA:19.0from
camptocamp:19-port-from-16

Conversation

@simahawk

Copy link
Copy Markdown
Contributor

No description provided.

simahawk and others added 30 commits July 12, 2023 11:53
You can now set custom domain rules via `_form_search_domain_rules`.

The mapping: `field name: (leaf field name, operator, format value),`.
Example: `product_id: (product_id.name, ilike, %{}%),`.

In this way the value of `product_id` field in the form will be search on the name
with ilike operator and everywhere in the string.
Cleanup render values and remove form fields' values.

When you submit a form and there's an error odoo will give you back
all submitted values into `kw` but:

1. we don't need them since all values are encapsulated
   into form.form_render_values
   and are already accessible on each widget

2. this can break website rendering because you might have fields
   w/ a name that overrides a rendering value not related to a form.
   Most common example: field named `website` will override
   odoo record for current website.
You can now specify `_form_fields_hidden = ('foo', )`
to get hidden inputs. All fields declared here
will be rendered as `<input type="hidden" />`.
When calling `form_fields` w/ hidden=True/False
the order of the fields was not respected anymore.

This a regression from commit 56b37ca
`fields.Selection` can hold both strings and integer values.
Till the value was not converted automatically
and using selection fields w/ integer values was a bit complex
as you had to convert it yourself or use a str selection field.

Now the widget inspects selection options
and converts request value accordingly.
If `groups` attribute was assigned to a field
it made fields ordering crash as the field is not there
when groups are not satisfied
Form extractor ignores non required fields if their values is `None`.
In the case of the date field, the util was returning `False`
even if the value was not submitted, leading to an ORM error
whenever the missing field was required.

Now we return `None` and let the extractor deal with proper values
and validation.
Hidden input values pass through requests as chars.
This means that any m2o or selection field with integer values
won't be really happy.

Here we rely on request marshallers to convert those values
to correct values based on field type.

NOTE: this is the preliminary step for adopting marshallers
for all field types/widgets when needed.
OCA-git-bot and others added 20 commits January 28, 2025 14:44
Signed-off-by simahawk
Signed-off-by simahawk
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: website-cms-16.0/website-cms-16.0-cms_form
Translate-URL: https://translation.odoo-community.org/projects/website-cms-16-0/website-cms-16-0-cms_form/
Currently translated at 100.0% (132 of 132 strings)

Translation: website-cms-16.0/website-cms-16.0-cms_form
Translate-URL: https://translation.odoo-community.org/projects/website-cms-16-0/website-cms-16-0-cms_form/it/
Currently translated at 100.0% (132 of 132 strings)

Translation: website-cms-16.0/website-cms-16.0-cms_form
Translate-URL: https://translation.odoo-community.org/projects/website-cms-16-0/website-cms-16-0-cms_form/it/
Currently translated at 100.0% (9 of 9 strings)

Translation: website-cms-16.0/website-cms-16.0-cms_status_message
Translate-URL: https://translation.odoo-community.org/projects/website-cms-16-0/website-cms-16-0-cms_status_message/it/
[16.0] Sync from addons repo template
Signed-off-by simahawk
Signed-off-by simahawk
@OCA-git-bot OCA-git-bot added mod:cms_status_message Module cms_status_message mod:cms_form Module cms_form mod:cms_info Module cms_info series:19.0 labels Oct 19, 2026
@simahawk simahawk changed the title Port modules as not installable from 16 [19.0] Port modules as not installable from 16 Oct 19, 2026
@simahawk simahawk closed this Oct 20, 2026
@simahawk
simahawk deleted the 19-port-from-16 branch October 20, 2026 07:35
@simahawk
simahawk restored the 19-port-from-16 branch October 20, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:cms_form Module cms_form mod:cms_info Module cms_info mod:cms_status_message Module cms_status_message series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.