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
c08724f2ef
Don't stop setting Many2Many if first values is empty
2014-04-11 15:41:55 +02:00
Cédric Krier
9dbc025011
Add restore_history to ModelSQL
...
issue3456
review1441003
2014-03-18 20:07:03 +01:00
Cédric Krier
6d1be2574b
Allow to customize field column and fix numeric search for SQLite
...
issue3733
issue3648
review4421002
2014-03-18 19:59:04 +01:00
Cédric Krier
335b0b6851
Add history revisions
...
issue3678
review3551002
2014-03-18 19:54:32 +01:00
Cédric Krier
7c151984e0
Let raise user error in import_data
...
issue3767
review4441002
2014-03-18 19:49:51 +01:00
Cédric Krier
5082be317a
Fix wrong Concat in the translation join for ir.model
2014-03-18 16:24:23 +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
88a4bce42d
Ensure to read the last history record
...
history records for the same id could have the exact same timestamp so to always
read the same record, the last one inserted is used by ordering on __id.
issue3741
review4161002
2014-03-10 20:26:56 +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
2680d1b746
Use a sequence of ids, values to set fields
...
review3331003
2014-02-24 19:15:57 +01:00
Cédric Krier
19f3ab64cb
Fix error message "foreign_model_exist"
...
The value argument has no meaning for this error message and the way it is
retreived in changeset dbbbe6cae2bb is buggy.
review3381002
2014-02-14 00:22:45 +01:00
Cédric Krier
729aaa8a00
Better guess "selection_change_with" attribute
...
Testing on the instance for Selection field is not enough because some field
selection could come from a Function field.
So it is better to use a duck typing style in this case.
issue3649
review3451002
2014-02-14 00:04:31 +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
8a95fa6d5b
No good reason to make get_translation_join private
...
review3241003
2014-02-06 22:59:42 +01:00
Nicolas Évrard
96d4de1709
_validate records in bunch of RECORD_CACHE_SIZE
...
This is required in order to prevent invalidating the LRU cache too often
review3061002
2014-02-03 16:30:18 +01:00
Cédric Krier
bc6acd08ee
Drop support of Python 2.6
...
review2691002
2014-01-31 00:02:03 +01:00
Cédric Krier
2e7c28d348
Add with_on_change switch to default_get
...
default_get should not call on_change when called in create because it could
modify values set by the caller.
issue3602
review2781002
2014-01-26 21:57:15 +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
Cédric Krier
a371793507
Fix _rebuild_tree to take in account inactive records
...
issue3509
review2401002
2013-12-23 20:22:52 +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
Cédric Krier
c2fa4958f5
Remove type test on limit and offset
...
Those types are enforced in python-sql
review1701002
2013-11-25 12:16:20 +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
bc1215af41
Fix history search to remove only past deleted records
...
review1481002
2013-11-05 17:20:08 +01:00
Cédric Krier
3f5dba2235
Add relation_field for many2one
...
issue3173
review1201002
2013-10-27 19:31:36 +01:00
Cédric Krier
51abc3fb62
field_childs in generated view must be None instead of False
...
issue3403
2013-10-08 20:26:29 +02:00
Cédric Krier
478fad1001
Don't create translation for field with a "set" method
...
review1120002
2013-10-06 11:59:31 +02: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
ce946dcde0
Fix ModelSingleton when reading rec_name via default values
...
review1114003
2013-10-05 18:04:44 +02:00
Cédric Krier
e9401fc8d3
Reference field should contain model in EvalEnvironment
...
review1101002
2013-09-30 18:18:24 +02:00
Albert Cervera i Areny
a7558e4e14
Check if order_* is overriden in Many2One fields
...
review1091002
2013-09-25 10:53:16 +02:00
Cédric Krier
e403e8bc95
Remove old test in write to update MPTT for only one record at a time
2013-09-23 00:10:33 +02:00
Cédric Krier
b03788e6db
Fix duplicate translations
...
- Fix unique constraint by using -1 instead of NULL for res_id
- Clean duplicate entries in po file
The unique constraint was not working when res_id was NULL because SQL consider
all of them as different.
The migration could fail if there is duplicate translation in the database. So
this query must be run until no more records are deleted:
DELETE FROM ir_translation WHERE id IN (SELECT MAX(id) FROM ir_translation GROUP BY name, res_id, lang, type, src_md5, module HAVING COUNT(1) > 1);
issue3355
review1087004
2013-09-22 14:33:39 +02:00
Cédric Krier
1a8c5aae1c
Fix check timestamp and add unittest
...
review1087003
2013-09-22 14:28:46 +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
0210370575
Improve MPTT
...
- Remove the order on MPTT
- Make room with queries using left/right instead of ids
- Call _update_tree multiple times for small list instead of rebuild the all
tree
- Improve test for with many roots
- Factorize the test to update MPTT
issue1892
review1007002
2013-09-03 10:26:23 +02:00
Cédric Krier
a7e7b3b91e
Change Translation.set_ids to use a list of values
...
review1005002
2013-09-02 17:38:11 +02:00
Cédric Krier
58c81ee328
Add rich comparison methods on Model
...
review1027002
2013-08-21 18:02:30 +02:00
Nicolas Évrard
27ccf989a5
Add tests on fields.Binary
...
review1017002
2013-08-16 11:08:44 +02:00