Commit Graph
179 Commits
Author SHA1 Message Date
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 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 0c6ba3a325 Remove back Many2One reference in copy test Many2Many
This reference is useless and create a circular dependency.
2014-03-10 10:17:32 +01:00
Cédric Krier f9188bd280 Fix register order of Models for copy test Many2Many 2014-03-09 18:25:37 +01:00
Cédric Krier fd25cd6434 Add copy test for Many2Many
Thanks to Laurent Defert

issue3506
review3221002
2014-03-07 20:02:07 +01:00
Cédric Krier f0a4bbcff7 Remove Sha field and add password widget
issue3713
review3791003
2014-03-07 19:38:01 +01:00
Cédric Krier 76cd64e6f8 Add Len to PYSON
issue3692
review3661002
2014-02-27 12:36:53 +01:00
Cédric Krier c6c0ca4da7 Use bcrypt to hash password if possible
If bcrypt is not available, it fallbacks to sha1 but it will use bcrypt to hash
new password if available.
The storage uses a simple hashing scheme which eases to add new hashing method
and doesn't rely anymore on the specific Sha field but on Function field.

Thanks to Vishesh Yadav

review1039002
2014-02-24 19:48:03 +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 e60274bd27 Fix MySQL tests
- Force UTC timezone on MySQL connection
- Add 1s sleep to test check timestamp

review2801002
2014-01-21 21:12:55 +01:00
Cédric Krier a6ffa18908 Add run-tests script and cleanup tests
issue2121
issue2420
review2491002
2014-01-12 19:58:22 +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
Cédric Krier d8240dcb25 Fix default_state of test workflow
staticmethod doesn't take cls as parameter
2013-12-23 00:34:25 +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 c46a026c40 Refactore Transaction to add close and autocommit
review2151002
2013-12-18 18:09:43 +01:00
Cédric Krier d6f22e01c3 Nested same set_user should keep the original context user
- set_context of Transaction.set_user is restricted to root

issue3523
review1961002
2013-12-12 13:53: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 2b2001f1ca Force UTC as timezone
issue3444
review1411002
2013-11-15 02:26:58 +01:00
Cédric Krier 37cf65c71f Timezone must be set when running tests
review1139002
2013-10-15 17:48:25 +02:00
Cédric Krier 84d0a09711 Fix PYSON Composite test for new default value 2013-10-10 09:39:06 +02:00
Cédric Krier b9296eb070 Fix usage of context company
Default value of company should be -1 to get the right cast and an impossible
value.
Replace False by None as other value in "in" clause.

issue3394
review1119002
2013-10-09 18:24:39 +02:00
Cédric Krier 838d50b736 Add test for reading ModelSingleton rec_name via default values
review1114003
2013-10-05 18:05:45 +02:00
Cédric Krier 6f179949ed Commit cursor in timestamp unittest
cursor must be committed between each changes otherwise NOW() returns always
the same timestamp.
2013-09-23 00:00:51 +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 ab74123eb2 Merge test/ into tests/
review1060002
2013-09-16 11:38:11 +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
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
Nicolas Évrard 27ccf989a5 Add tests on fields.Binary
review1017002
2013-08-16 11:08:44 +02:00
Nicolas Évrard a293325aa6 Fix naming of fields.Selection's test 2013-08-09 18:40:02 +02:00
Cédric Krier b1e50bfaf0 Add unittest for domain validation of One2One fields
review852003
2013-05-18 19:13:56 +02:00
Ralf Peschke 7fbc4934a4 unit-test: 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:29:37 +02:00
Cédric Krier f27631161a Add test for unknown fields in test_depends
review745002
2013-03-27 22:47:06 +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 9af0cc3039 Re-add tests of search on Reference field with tuple/list 2013-03-17 00:56:45 +01:00
Sharoon Thomas 6efc1f6a0c Improve trigger tests
review690002
2013-03-06 17:00:34 +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 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +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 289eaac537 Add test for copy of One2Many 2013-02-04 20:03:18 +01:00
Cédric Krier 1e60085854 Use a better hashing method for context
repr doesn't guarantee to have always the same string

review642002
2013-02-04 19:59:05 +01:00
Cédric Krier fd01a724f8 Add Dict fields
review501007
2013-01-26 15:18:41 +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 06a1e783d7 merge 2012-12-18 17:46:07 +01:00