Closed
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Module already avail in v14 as uninstalled.
Here's a backport from v16 of all the improvements + adaptations for v14.