-
-
Notifications
You must be signed in to change notification settings - Fork 89
[14.0][mig] cms_form #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][mig] cms_form #145
Conversation
**Attributes become fields**
All attributes that configure a form are now odoo fields.
Fields that are just for configuration/behavior
(meaning that shouldn't be consider in form rendering)
must have the flag `form_tech=True`.
Default configuration can be set by overriding fields' defaults.
For instance, to declare the model::
form_model_name = fields.Char(default="res.partner")
or to declare which fields to use::
form_model_fields = Serialized(default=("name", "country_id"))
Same story for widgets.
**Fields lookup API change**
`form_fields()` and `form_fieldsets()` are not available anymore.
You must use `form.form_fields_get()` and `form.form_fieldsets_get`.
When the transaction is rolled back due to an pg error use a new env to be able to inject the status message otherwise a dead request will be used.
You can now use form_widget={...} field attribute
to provide your own widget for the form.
Centralize lookup for attributes via private api
Allows forms to customize the html name of each widget. Very handy in case you want to combine multiple forms together.
Transform inputs to list of dict values
Before this change the session was not stored at all on the filesystem
Form fields have precedence over model fields. However, it's handy to override just few params instead of the whole field.
Form fields can now be hidden via ´form_hidden' attr.
Currently translated at 100.0% (128 of 128 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/es/
Handy to force redirect down the stack.
Currently translated at 100.0% (128 of 128 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 35.1% (45 of 128 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/ca/
These tests require some adaptations for the ``mock`` lib version that is now working properly w/ py3.6 used in the OCA build.
713c227 to
2901ca2
Compare
Submit a btn variable to have full control of behavior when no filter has been submitted.
Some browsers like FF do not set the item as selected when autocomplete is on.
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Module already avail in v14 as uninstalled.
Here's a backport from v16 of all the improvements + adaptations for v14.