Commit Graph
3268 Commits
Author SHA1 Message Date
Cédric Krier 9d1a3be65c Fix translation creation
changeset 1a94e9f76bca broke the translation creation because it misses lang
and module value.

review3861002
2014-02-26 09:34:54 +01:00
Cédric Krier f077411117 Fix typo in Menu.get_rec_name introduced in changeset 127981430238 2014-02-25 23:56:34 +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 2190ca9f45 Better cache usage in Menu.get_rec_name
By re-using the field function, it takes better advantage of the global cache.

issue3709
review3781002
2014-02-25 19:11:02 +01:00
Sergi Almacellas Abellana 38d225f7c6 Refactor translation import and update to improve custom types support.
review2431002
issue3566
2014-02-25 10:58:21 +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 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 275e612288 Wrong usage of "or" instead of "|" in PYSON of Trigger.on_time 2014-02-19 17:53:35 +01:00
Cédric Krier 1b18348be8 Fix development jsondata_path introduced in changeset fc46f1ab2d36 2014-02-18 14:01:18 +01:00
Cédric Krier dce4d3f732 Client side actions on button and wizard
issue3343
review3231002
2014-02-15 18:34:22 +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 1e9673ea47 Improve module buttons
- Enforce origin state of modules
- Speedup on_write computation
- Better usage of record cache

review3361002
2014-02-14 00:18:27 +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 6b3f7fb250 Add sign function to SQLite backend
review3411002
2014-02-14 00:00:09 +01:00
Cédric Krier 5ef3276c5f Fix relatorio documentation links 2014-02-10 00:00:11 +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 487381d700 Search also on source for some translation types when overriding
issue3637
review3221004
2014-02-09 23:53:10 +01:00
Cédric Krier 8a95fa6d5b No good reason to make get_translation_join private
review3241003
2014-02-06 22:59:42 +01:00
Cédric Krier 3acd4fa312 Add missing button in tree view documentation
review3201002
2014-02-06 22:58:31 +01:00
Cédric Krier 9ac1778066 merge 2014-02-06 22:31:29 +01:00
Cédric Krier 5a73f91a6d Add depends attribute to data tag
This is the counterpart of the Pool register of extras_depend modules for the
XML record creation. It allow to create records if some other modules are
installed.

review3041002
2014-02-06 22:30:11 +01:00
Cédric Krier 29358683cd Add tree_invisible attribute to button in tree view
review3041003
2014-02-06 22:25:43 +01:00
Nicolas Évrard eac48b2a50 Access sql related errors only if Model is a subclass of ModelSQL
review3111002
issue3628
2014-02-03 17:51:25 +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 ab0e242bc2 Fix documentation about button name
review3011004
2014-01-31 22:29:01 +01:00
Cédric Krier 2ba9526d37 Prevent unecessary update of record when loading XML
review3061003
2014-01-31 22:26:55 +01:00
Cédric Krier 4b7328a75d Add Content Name to ActionReport
This will ease the edition of the report template from the client.

issue3608
review2851002
2014-01-31 22:19:55 +01:00
Cédric Krier bc6acd08ee Drop support of Python 2.6
review2691002
2014-01-31 00:02:03 +01:00
Cédric Krier 4e535164c2 Resync widget attributes and add missing filename attribute in views
review2911002
2014-01-26 22:10:57 +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 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 cf28a3709e Add ending form to config wizard
This ending form will prevent the client to reload the context and the menu
before the end of the last item.

issue3569
review2481002
2014-01-04 19:32:23 +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
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
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 ad12f36ecd Keep Transaction singleton in clean state and store close parameter
If an exception happens in the start (database connection fails), the singleton
should not have stored anything.
2013-12-20 16:15:44 +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
Albert Cervera i Areny ce781a5d0e Use EXCLUSIVE MODE when locking PostgreSQL tables.
Previous implementation used ACCESS EXCLUSIVE MODE (PostgreSQL's default) which
does not allow SELECTs on the locked table. This is too pessimistic so it's been
replaced by a plain EXCLUSIVE MODE which still blocks INSERTs and UPDATEs
but not SELECTs.

review1011002
issue2280
2013-12-19 20:58:13 +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 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
Nicolas Évrard e8bdcd5550 Set the context's user when fetching user preferences
The call to _get_preferences makes some processing based on the user of the
context.

In order for those computations to return the right value the context must be
set when instanciating the user.

issue3068
review1711002
2013-12-10 12:01:30 +01:00
Nicolas Évrard 90324479f2 Backed out changeset a0dfdb90681e 2013-12-10 11:52:37 +01:00
Nicolas Évrard 55c58abdf5 Set the context's user when fetching user preferences
review1711002
2013-12-10 11:34:04 +01:00
Cédric Krier 17bbcef17d Remove unused regexp
review2081002
2013-12-06 11:45:07 +01:00
Cédric Krier 0088d66f43 Database.list must set manually the flavor
issue3508
review2121002
2013-12-06 11:28:48 +01:00