Daily updates from Odoo
Navigate
Branch
Thursday, July 23, 2020
7 changes
Enhancements to existing features
This update streamlines how Odoo prepares default values when users create new records, avoiding unnecessary work and reducing the risk of inconsistent defaults. It also fixes some company-specific default value issues, helping forms and wizards open more reliably across several business apps.
Original PR description
##### `default_get` is one of the main Odoo methods: * Form views opening with new records triggers one default_get, requesting the values of the fields in the view * Records creation (`create`…
##### `default_get` is one of the main Odoo methods: * Form views opening with new records triggers one default_get, requesting the values of the fields in the view * Records creation (`create` calls) goes through 1 default_get call by values pair (unless all fields values are given to the create). Therefore, `default_get` overrides have to be correctly designed, to avoid any unnecessary operations (and guarantee the consistency and coherence of default values). 1) Do not specify unwanted defaults in `default_get`: When default_get is called, the wanted fields are specified through the `fields_list` arg. Providing the defaults for unrequested fields will only lead to unnecessary operations. 2) Leave generic `default_get` behavior to the ORM level as much as possible: * `default_` context keys should only be managed at ORM level. The `default_get` overrides shouldn't use the value in context, only the values returned by the `super` call. NB: to ensure that the ORM `default_get` correctly consider those context keys, the fields should be in present in the view. * Replace/shorten `default_get` overrides when a `default` can be specified on the field itself instead. The ORM won't call it when the field default is not needed. 3) Fix some defaults issues when found: * Potentially wrong defaults in multi-company environments * Defaults of fields depending on other fields defaults should be specified in `default_get` overrides, not in the `default` attribute of the field 4) When possible, remove/simplify operations done in `default_get` overrides. Enterprise counterpart of https://github.com/odoo/odoo/pull/54246
This update improves how messages are translated across several Odoo Enterprise apps, especially error and user-facing messages. It helps translators produce clearer wording and reduces the risk of confusing translated text for users in different languages.
Original PR description
Enterprise counterpart of https://github.com/odoo/odoo/pull/54635
Studio now works better with an underlying performance improvement that skips loading fields hidden by default. Users can still choose to show invisible fields when editing forms, while benefiting from faster form rendering in normal use.
Original PR description
Community PR odoo/odoo#54368 implements an optimization of the form renderer consisting in skipping the rendering of invisible fields (invisible="1"). However, in Studio, we sometimes need to display them (in 'show invisible' mode). We thus toggle the given flag when necessary. This commit allows adapt tests accordingly.
Code cleanup and technical improvements
The Project Timesheet synchronization app has been rebuilt on Odoo’s newer interface framework. This helps keep the app maintainable and ready for future improvements while preserving its core purpose for users tracking project time.
Miscellaneous changes
Since 172e8a4f3df759ad6261563222f5b65eb5e12149 `date_from` and `date_to` are not available in the context any more. However, they are accessible in the `options`. This commit fixes the issue for the reports Partner VAT Listing and Partner VAT Intra that returned zero lines. Forward-Port-Of: odoo/enterprise#11980
Original PR description
Since 172e8a4f3df759ad6261563222f5b65eb5e12149 `date_from` and `date_to` are not available in the context any more. However, they are accessible in the `options`. This commit fixes the issue for the reports Partner VAT Listing and Partner VAT Intra that returned zero lines. Forward-Port-Of: odoo/enterprise#11980
Now the complement for ``donatarias`` need the version 1.1, was updated the URL to get XSD files for that version This version was introduced on 74dec3a83c75366cc9e6a1e61e72a7f0c12c4e34, but by mistake was removed on 47f1ad82f7a40157496618fb9ccf64365af37b8b Forward-Port-Of: odoo/enterprise#11978
Original PR description
Now the complement for ``donatarias`` need the version 1.1, was updated the URL to get XSD files for that version This version was introduced on 74dec3a83c75366cc9e6a1e61e72a7f0c12c4e34, but by mistake was removed on 47f1ad82f7a40157496618fb9ccf64365af37b8b Forward-Port-Of: odoo/enterprise#11978
opw-2282234 Forward-Port-Of: odoo/enterprise#11967 Forward-Port-Of: odoo/enterprise#11959
Original PR description
opw-2282234 Forward-Port-Of: odoo/enterprise#11967 Forward-Port-Of: odoo/enterprise#11959