- Aug 07, 2014
-
-
Olivier Dony authored
The extra parsing check is not necessary when we're not validating inputs, because in that case the values come from the database and are valid. The validation is quite expensive due to calls to strptime() + strftime().
-
Olivier Dony authored
-
Christophe Simonis authored
-
- Aug 06, 2014
-
-
Olivier Dony authored
Due to the use of a sudo env, the records were being added to the sudo cache one by one instead of all at once. This meant the prefetching was not able to load all records at once, leading to prohibitive times when processing thousands of records.
-
Raphael Collet authored
If a selection field is defined by a list as selection, such as: state = fields.Selection([('a', 'A'), ('b', 'B')]) one can extend it by inheritance by redefining the field, as: state = fields.Selection(selection_add=[('c', 'C')]) The result is that the selection field will have the list [('a', 'A'), ('b', 'B'), ('c', 'C')] as selection.
-
Christophe Simonis authored
As `_inherits` fields are now handled via `related` fields (not stored, obviously), a new descriptor `searchable` has been added to `fields_get()` result to indicated if the field is searchable or not.
-
Raphael Collet authored
The existing code was buggy when writing on *2many fields with a list of commands: the value was converted for the cache, but taking an empty recordset as the current value of the field.
-
- Aug 04, 2014
-
-
Olivier Dony authored
See #1527
-
Raphael Collet authored
When a new record is returned as the value for a many2one on a new record, the method Many2one.convert_to_write() now returns a NewID, and default_get() then discards that value from its result. This makes it consistent with its former behavior. Manual rebase of #1547
-
Raphael Collet authored
The fix consists in this: when setting up models, ignore manual fields that refer to unknown models if all models have not been loaded yet.
-
- Jul 30, 2014
-
-
Olivier Dony authored
This was added in master-apiculture at f1f16a8 to permit special function fields that return structured JSON-like data. This is unnecessary and caused typing problems, for example for the type field of ir.model.fields, or when you decide to store them. It is simpler to explicitly declare these fields as fields.Char and have them serialize their results to JSON strings, or to declate them as fields.Binary and return any opaque data they want.
-
- Jul 23, 2014
-
-
Olivier Dony authored
In the previous implementation of the new API fields, both fields.Selection and fields.Reference were performing early validation of their `value` as soon as it entered the cache, either by being read, written, or computed. This is a source of trouble and performance problems, and is unnecessary, as we should consider that the database always contains valid values. If that is not the case it means it was modified externally and is an exception that should be handled externally as well. Revalidating selection/reference values can be expensive when the domain of values is dynamic and requires extra database queries, with extra access rights control, etc. This patch adds a `validate` parameter to `convert_to_cache`, allowing to turn off the re-validation on demand. The ORM will turn off validation whenever the value being converted is supposed to be already validated, such as when reading it from the database. The parameter is currently ignored by all other fields, and defaults to True so validation is performed in all other caes.
-
- Jul 20, 2014
-
-
Sebastien Alix authored
-
- Jul 08, 2014
-
-
Raphael Collet authored
-
Raphael Collet authored
-
Raphael Collet authored
-
Raphael Collet authored
-
- Jul 06, 2014
-
-
Raphael Collet authored
A squashed merge is required as the conversion of the apiculture branch from bzr to git was not correctly done. The git history contains irrelevant blobs and commits. This branch brings a lot of changes and fixes, too many to list exhaustively. - New orm api, objects are now used instead of ids - Environements to encapsulates cr uid context while maintaining backward compatibility - Field compute attribute is a new object oriented way to define function fields - Shared browse record cache - New onchange protocol - Optional copy flag on fields - Documentation update - Dead code cleanup - Lots of fixes
-