Cédric Krier
eada306375
Always validate field that depends on Function fields
...
As it is not possible to know if a Function field has changed, field that
depends on it must always be validated.
issue3829
review4901003
2014-04-12 23:48:13 +02:00
Cédric Krier
7c151984e0
Let raise user error in import_data
...
issue3767
review4441002
2014-03-18 19:49:51 +01:00
Nicolas Évrard
498bc47097
Use create multi in import_data
...
review3011003
2014-03-16 20:45:12 +01:00
Cédric Krier
9d1dc45b6e
Skip domain validation for Dict field
2014-03-16 15:30:13 +01:00
Cédric Krier
20028f86ec
Fix wrong assumption to compute relations in domain validation
2014-03-16 15:28:53 +01:00
Cédric Krier
f72b983c0f
Check relation access in fields_get and for default fields in read
...
issue3750
review4261002
2014-03-15 11:01:14 +01:00
Cédric Krier
a130816cbd
Add support of domain for non-relation field
...
issue3743
review4181002
2014-03-15 10:44:45 +01:00
Cédric Krier
97ad256c00
Add unique filter on the cache ids in ModelStorage.__getattr__
...
_ids must be kept with duplicates because it is important to keep the right
order/proximity of records in the cache. But when reading the values, the ids
must be filtered to be unique to not read it twice.
issue3710
review3781003
2014-02-25 19:12:02 +01:00
Cédric Krier
66a5f7b6f4
When saving record don't store target link for one2many to create
...
When saving an instance if the relation field of a one2many item is set, it
should not try to save it as it will be replaced by the current record. And in
the worst case, the target set could not be valid and so it prevents to store
the instance which doesn't need of this target.
issue3501
review3601003
2014-02-24 19:20:47 +01:00
Cédric Krier
d9e064dde6
Add memoize to import data search functions
...
As during the processing of imported data, there is no creation of new records,
the result of the search calls could be cached.
review2981002
2014-02-09 23:58:45 +01:00
Cédric Krier
bc6acd08ee
Drop support of Python 2.6
...
review2691002
2014-01-31 00:02:03 +01:00
Cédric Krier
905343c900
Add fields.depends decorator
...
issue3487
review2301002
2014-01-26 14:27:24 +01:00
Cédric Krier
390f196559
Validate only modified and dependant fields on model write
...
issue3445
review1371002
2013-12-23 20:47:25 +01:00
Sergi Almacellas Abellana
e54317cfca
Improve error messages by showing the failing value
...
issue3489
review1671002
2013-12-22 10:24:05 +01:00
Cédric Krier
472b7e5d57
Rationalize relation actions
...
* Remove relation field actions:
- delete_all
- unlink_all
- set
* Rename relation field action unlink into remove
issue3457
review2271002
2013-12-20 12:32:07 +01:00
Cédric Krier
f52fe8e45f
Use a sequence of records, values in write
...
issue3499
review1641003
2013-12-19 14:44:01 +01:00
Laurent Defert
d143acdd0a
Add a 'copy' action to One2Many and Many2Many's set method
...
issue3341
review1271002
2013-11-19 11:04:33 +01:00
Cédric Krier
20bb98ec44
Fix wrong name collision fix introduced in changeset 1dd74c6f22e7
2013-10-06 10:23:06 +02:00
Cédric Krier
5ad27258fd
Fix flake8
2013-10-05 18:18:42 +02:00
Cédric Krier
e9401fc8d3
Reference field should contain model in EvalEnvironment
...
review1101002
2013-09-30 18:18:24 +02:00
Nicolas Évrard
c52889a1d2
Do not take into account active field when doing domain validation
...
review908002
2013-09-17 17:14:14 +02:00
Cédric Krier
fc6c6cfdda
Migration to python-sql
...
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method
review1001002
2013-09-06 22:32:37 +02:00
Udo Spallek
d798452aae
Allow field One2One in check_recursion.
...
issue3347
review1048002
2013-09-04 12:35:02 +00:00
Cédric Krier
fc88a03955
Fix recursion_error message when parent is many2many
...
issue3290
review977002
2013-07-22 14:32:20 +02:00
Cédric Krier
6c97a9ea7e
No need to change user to validate
...
Validation of record should not depend on the user.
review948002
2013-07-04 19:28:27 +02:00
Cédric Krier
d86b984753
Fix domain concatenation between list and tuple
2013-06-01 00:17:33 +02:00
Cédric Krier
5243a43d73
Fix validation of domain for One2One fields
...
issue3206
review852003
2013-05-18 19:13:12 +02:00
Cédric Krier
3492e90308
Use None instead of False in ModelStorage.copy
2013-04-14 23:17:07 +02:00
Ralf Peschke
9c6ff8c0e0
Use value instead of record instance on import_data
...
Importing records with m2o- and m2m-relations import_data gives record instances
to the create-method of the object instead of record-id's. Creating the same
object using the GUI the client gives record-id's.
On error the record-instances can't be serialized by JSON and the common error
"500 internal server error" will be reported to the client
issue3124
review767002
2013-04-13 11:07:33 +02:00
Ralf Peschke
2956c8c068
Fix: on import_data zero values shouldn't be converted to None
...
import_data method converts zero values to None. As a consequence such records
don't pass the required constraint for such fields
issue3136
review779002
2013-04-13 10:28:07 +02:00
Cédric Krier
a95ae0dad9
Remove _inherits
...
review670002
2013-03-20 22:49:16 +01:00
Cédric Krier
a8755c51ea
Fix uninitialized new_records in ModelStorage.copy
2013-03-17 00:17:19 +01:00
Cédric Krier
18e7ff87c3
clear _values before save values
...
This is to allow to use the instance passed to write and then having the real
stored values.
review707002
2013-03-12 10:34:14 +01:00
Albert Cervera i Areny
25463800c9
Replace _constraints with validate in ModelStorage and improve user messages.
...
issue2616
review371002
2013-03-07 16:53:19 +01:00
Cédric Krier
5e01f5c068
Fix flake8
2013-02-27 22:50:31 +01:00
Cédric Krier
2af1936eb1
Ensure the existing record are always set on xxx2many
...
review662005
2013-02-23 18:29:14 +01:00
Cédric Krier
d49fb4318d
Add selection_change_with on Selection and Reference fields
...
review587002
2013-02-05 19:06:16 +01:00
Cédric Krier
b2d11b6df5
local_cache and model2ids must depend on datetime
...
review650002
2013-02-04 20:08:10 +01:00
Cédric Krier
60d4e28911
Fix copy when relation field is a Reference
...
review654003
2013-02-04 20:02:37 +01:00
Cédric Krier
fd01a724f8
Add Dict fields
...
review501007
2013-01-26 15:18:41 +01:00
Cédric Krier
d5ba4e67c0
Call only once _save_values in ModelStorage.save
2013-01-20 14:16:32 +01:00
Albert Cervera i Areny
30b1403cdc
Use a list of dictionaries in create().
...
issue2358
review266002
2013-01-06 22:18:13 +01:00
Cédric Krier
5fc611575c
Factorize selection validation
...
review603002
2012-12-13 19:18:37 +01:00
Cédric Krier
eb820df535
Use globale cache also for Many2One and Reference fields
...
review590007
2012-12-10 16:15:24 +01:00
Cédric Krier
c1fd506f77
Add global search
...
review582002
2012-12-05 13:25:18 +01:00
Cédric Krier
489e297cf2
Store transaction counter on local cache
...
As the cache is shared with many instances, the counter must also be shared.
review599004
2012-11-28 22:37:57 +01:00
Cédric Krier
1cdf1ffaef
Ensure records are readable also for constraints
...
review595004
2012-11-28 22:34:10 +01:00
Cédric Krier
936dcca53a
Store default language in database
...
review592004
2012-11-23 17:59:04 +01:00
Cédric Krier
26a3127b8f
Don't alter context with empty _datetime
...
Avoiding useless context change make the global cache more efficient.
2012-11-22 22:54:07 +01:00
Cédric Krier
c3c344c658
Prevent fuzzing translations when copying
...
review590005
2012-11-22 22:42:45 +01:00