summaryrefslogtreecommitdiff
path: root/addons/base_sparse_field/models
AgeCommit message (Collapse)Author
2020-06-18[IMP] *: replace to new _() syntaxMartin Trigaux
Using a few regex like \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\) ($1, $3)) Old syntax is still compatible but starts the migration to the new syntax that catches error.
2020-04-07[IMP] fields: add validation of parameter namesRaphael Collet
2020-04-03[IMP] core: reflect models, fields and selections in batchRaphael Collet
This saves 4.5% of the total installation time. X-original-commit: 8519064dce975af542ccd30dc14c56b9bb36d07b
2020-04-03[IMP] core: remove `Field._slots`Raphael Collet
This optimization is no longer necessary. Thanks to Python 3.6's new implementation of dicts, the memory footprint difference between slots and dicts is now around 5%, which is no longer worth the complexity and performance cost. This saves 2% of the total installation time. X-original-commit: c7f17770803744cbbb741fc11265ee914641aed7
2020-03-30[FIX] *: set ondelete policy of required Selection fieldsAdrian Torres
With this commit, Selection fields with `required=True` which are extended via `selection_add` are given proper ondelete policies to ensure the cleanup of records containing these extended options during uninstall of the extending module. This commit also cleans up leftover uninstall hooks that were being used to handle the same set of problems prior to the ondelete mechanism being implemented for Selection fields. closes odoo/odoo#46325 Related: odoo/enterprise#9117 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-10-10[FIX] base_sparse_field,mail: handle None _instanciate_attrs overridefw-bot
The parent was expected to return a dict, but it can also return None in some cases. When that happens, the overrides were crashing because it is impossible to assign a key/val to None. Note that using `if` conditions like this also prevents from writing on the dict if it is existing but empty, but due to the definition of the parent, if there is a dict, it will not be empty. closes odoo/odoo#38316 X-original-commit: 3525fad3b1729286d139b19a4a92f1821d94ad88 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-08-20[IMP] models: ORM speedupRaphael Collet
This branch is the combination of several optimizations in the ORM: * store field values once in the cache: the cache reflects more faithfully the database, only fields that explicitly depend on the context have an extra indirection in the cache; * delay recomputations by default: use method `recompute` to explicitly flush out pending recomputations; * delay updates in method `write`: updates are stored in a data structure that can be flushed efficiently to the database with method `flush` (which also flush out recomputations); * make method `modified` take advantage of inverse fields to inverse dependencies; * filter records by evaluating a domain on records in Python; * a computed field with `readonly=False` behaves like a normal field with an onchange method; * computed fields are computed in superuser mode by default. Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien Pinckaers. closes odoo/odoo#35659 Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-07-17[REM] *: calls to @api.multiAdrian Torres
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2018-09-26[FIX] base: perform field reflection in batchRaphael Collet
Speedup 4% of installation time.
2018-09-21[IMP]base_*: Improvement in model descriptionNimesh Jethva
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
2018-08-21[MERGE] forward port branch 11.0 up to fbfb91799eeChristophe Simonis
2018-08-21[MERGE] forward port branch saas-15 up to 9cf0dbe2267Christophe Simonis
2018-08-21[FIX] base_sparse_field: improve fields' viewChristophe Simonis
Set default values when creating serialized field from contained field.
2018-07-23[MERGE] forward port branch 11.0 up to 219d2296d67Christophe Simonis
2018-07-19[FIX] undefined variables (potential nameerror)Xavier Morel
Backport 9ec0455abc041b855dcab18e8e185baf806b9f14 and 6a601fe6dc848cdeca2ab8429210e3b5087275d9 as they fixed various possible NameError but did so in later sub-releases.
2018-01-16[REF] models: improve code of `_create`/`_write`Raphael Collet
Also remove method `self._check_selection_field_value`, and perform the check in field method `convert_to_column`.
2017-12-05[MERGE] forward port branch saas-14 up to e9c2dcd28ddChristophe Simonis
2017-05-18[FIX] Always round monetary values in database (#17010)Raphael Collet
Let `create` and `write` round monetary field values before sending them to the database. Pass the values to be written to `field.convert_to_column`, so that the currency can be retrieved from the values, and the value be rounded.
2017-05-03[REF] registry: replace `partial` by attribute `registry.loaded`Raphael Collet
2017-02-22[FIX] base_sparse_field: remove pre_init_hookRaphael Collet
2017-02-22[REF] base: refactor the API of model, field, constraint and relation reflectionRaphael Collet
Simplify the API as much as possible, and delegate all the implementation details to the models `ir.model`, `ir.model.fields`, `ir.model.constraint` and `ir.model.relation`.
2017-01-19[REF] move support for sparse fields into a separate module (#15070)Raphael Collet
This removal has led to a necessary refactoring: - make the setup of field attributes extensible; - make the instantiation of custom fields extensible; - delegate model and field reflection to `ir.model` and `ir.model.fields`; - move the implementation of sparse and serialized fields to module `base_sparse_field`;