Commit Graph
419 Commits
Author SHA1 Message Date
Cédric Krier 2e8ec5f5df Replace SPLIT_PART by SUBSTR and POSITION
SPLIT_PART is not a standard SQL function (it is not supported by MySQL).
SUBSTR is used even if it is not standard SQL because SUBSTRING is not
supported by SQLite. This will change once we will migrate to python-sql.

review784002
2013-04-14 23:17:55 +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 68d7948b10 Add missing reference origin clause when search on xxx2many
review770002
2013-04-08 23:52:05 +02:00
Pierre-Louis Bonicoli b5245c82e1 View: remove encoding declaration (fix lxml usage)
issue3119
review765002
2013-04-08 10:57:39 +02:00
Cédric Krier 83eee68713 Fallback to order by id when ordering Many2One 2013-04-01 16:57:02 +02:00
Cédric Krier 2fc5214e4f Remove left/right check on create
It was introduced in changeset c7804c288ca3 but tools like proteus will set the
value on creation because there is a default value on such field as they are
required. So such test is not doable on creation.

issue3019
2013-03-21 21:40:10 +01:00
Cédric Krier 15961b9e67 Allow to search on target of Reference field
review716002
2013-03-21 18:20:39 +01: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 84240b78c3 Add dynamic label and prefix, suffix on tree view
review689003
2013-03-15 21:44:22 +01:00
Cédric Krier b7ab51697b Fix check of _sql_error_messages 2013-03-12 11:47:14 +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 1887c2c564 Enforce usage of None instead of False
review685002
2013-03-05 10:33:18 +01:00
Cédric Krier 10b2b5cfda Fix check of _sql_error_messages
issue3021
review682002
2013-03-04 21:30:17 +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 690c066c35 Add documentation for Dict field and standardize options
review672003
2013-02-23 18:26:01 +01:00
Cédric Krier 63a2b16aa9 Fields with set was not always called since new create API
review668003
2013-02-15 19:24:22 +01:00
Cédric Krier 5a3568fd31 Fix strip as selection could be str or unicode
issue2978
review668002
2013-02-11 10:38:51 +01:00
Cédric Krier 3cb9f0468f Always update attributes and store view per id
This is needed to allow the client to choose the right view when the same field
is displayed multiple times with different views.

review656002
2013-02-05 19:31:22 +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 8e248e9922 Fix wrong access check read -> write
Typo introduced in changeset cc8493263998
2013-01-21 12:46:24 +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 0c577dd660 Improve getattr lookup in fields.Function.get
review612003
2012-12-23 22:58:13 +01:00
Cédric Krier ec554ef6b3 Fix read relate value when id is 0
review618002
2012-12-23 22:56:09 +01:00
Albert Cervera i Areny ec1761ddca Use None instead of False in ModelSingleton
issue2932
review617002
2012-12-16 23:54:41 +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 290791e0df Use instance in One2Many.get to re-use cache
review585007
2012-11-28 23:12:39 +01:00
Cédric Krier cf0636e095 Add ModelFieldAccess.get_access
review598002
2012-11-28 22:42:51 +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 0e4df2b246 Add missing context when filling cache from search 2012-11-22 22:49:41 +01:00
Cédric Krier c3c344c658 Prevent fuzzing translations when copying
review590005
2012-11-22 22:42:45 +01:00
Cédric Krier 10f28ebdec Set lazy loading on Reference field 2012-11-22 22:39:22 +01:00
Cédric Krier 1464a38a9d Delete translations when deleting records
review594003
2012-11-22 22:22:13 +01:00
Cédric Krier 80f00f7ec0 Prevent double browse as search returns instance 2012-11-01 22:40:07 +01:00
Cédric Krier d5f3fbd2aa Don't read Function fields when copying records 2012-10-19 23:01:11 +02:00
Cédric Krier b57f044ba8 Fix pep8 and pyflakes 2012-10-19 12:29:05 +02:00
Nicolas Évrard 34fd945a68 Add comment about previous change 2012-10-17 15:51:05 +02:00