Commit Graph
2203 Commits
Author SHA1 Message Date
Cédric Krier 0415e46c73 Don't allow to use float in Numeric fields
The goal is to prevent to introduce float errors in Numeric fields.
There is a trick for external protocols like XML-RPC and JSON-RPC where the
string representation is stored in the Float object and will be used to
convert it into Decimal.
2010-03-12 17:41:07 +01:00
Cédric Krier c162fd3583 Use only 15 decimal digits for MySQL double to match the Python float 2010-03-12 12:22:55 +01:00
Cédric Krier 8ea533585b Better management of cursor in install_module test 2010-03-12 12:21:58 +01:00
Cédric Krier 437099ddbf Fix float test to use 16 significant digits 2010-03-12 12:20:59 +01:00
Cédric Krier dd6918994f New interface for Function/Property fields
Function field takes an other field in parameters
set/get function on Fields take a list of ids
2010-03-11 16:42:50 +01:00
Cédric Krier 8951e54c86 Add decimal digits validation on fields and fix Float and Numeric for lost of precision 2010-03-11 15:27:40 +01:00
Cédric Krier 0abb71b21f merge 2010-03-11 12:08:37 +01:00
Cédric Krier 4488f99593 Use Tryton CHECK constraint for MySQL
MySQL has only partial constraints, it doesn't manage CHECK.
So we use Tryton to check those constraints.
2010-03-11 12:08:15 +01:00
Cédric Krier 596c8fce39 Use double instead of float to store Float fields in MySQL
The precision of MySQL float is not enough to handle all Python floats.
From http://docs.python.org/tutorial/floatingpoint.html:
"...almost all platforms map Python floats to IEEE-754 “double precision”"
2010-03-11 12:02:29 +01:00
Cédric Krier 89ad50e952 Improve exception handling in import_data 2010-03-10 20:41:59 +01:00
Cédric Krier 3537d7fc4e Add workaround for old version of TestCase
Old version of TestCase has no __eq__ function
2010-03-04 19:49:15 +01:00
Cédric Krier c185cc309d Add missing some cursor close and rollback in unittests 2010-03-04 16:20:56 +01:00
Cédric Krier 00677cc383 merge 2010-03-04 14:02:53 +01:00
Cédric Krier 20741b613d Improve unittests to run trytond from tests
Use sqlite as default backend
Add skiptest attribute to data tag
Add option to test_tryton to run tests from all modules
2010-03-04 14:02:27 +01:00
Cédric Krier f535736b80 Add test on tag when applying inherit view for issue1435
data can contain elements that are comments
2010-03-03 18:37:26 +01:00
Cédric Krier 886533e1c5 Add replace python function for old sqlite for issue1432 2010-03-03 18:28:58 +01:00
Cédric Krier 02e5da4e22 Update README for SQLite 2010-03-01 12:45:54 +01:00
Cédric Krier cb63509356 Add MySQL backend 2010-02-25 16:43:04 +01:00
Cédric Krier 80ad687daf Raise NotImplementedError in interface class 2010-02-23 15:54:27 +01:00
Cédric Krier 47809e3bf7 Add support for datetime in pyson encoder 2010-02-23 15:43:39 +01:00
Cédric Krier 46cbcdc62e Use open instead of file to follow recommendation of Python doc 2010-02-22 23:16:14 +01:00
Cédric Krier b5fb4d1ef3 Refactoring by validation with pylint 2010-02-18 18:50:35 +01:00
Cédric Krier 5a2baacef4 merge 2010-02-11 11:12:33 +01:00
Cédric Krier 0eea3a9afb Fix wording in doc and guidelines 2010-02-11 11:12:10 +01:00
Cédric Krier 6997fd60b2 Fix typo in sqlite database functions 2010-02-10 18:43:39 +01:00
Cédric Krier f042e76881 Modify ondelete attribute of Many2One according to required attribute value
"SET NULL" will be changed into "RESTRICT" if required is set.
2010-02-09 10:13:17 +01:00
Cédric Krier 6961c5c925 Fix typo 2010-02-08 09:36:32 +01:00
Cédric Krier ac9c532f41 Fix wrong initialisation type of _indexes in TableHandler of PostgreSQL
backend
2010-02-08 09:36:10 +01:00
Cédric Krier dbd73db28b Fix exec_pg_command_pipe to work on windows for issue1405 2010-02-03 17:36:44 +01:00
Cédric Krier a8c374617e Refactor import_data of ModelStorage thanks to h.goebel
- translate error message
- handle numeric, date, datetime, reference fields
- improve relation search, fail if too much is found
- add unittest
- add escapechar '\' for ',' in many2many list
2010-02-03 15:59:10 +01:00
Cédric Krier 4795d98d5d Use decorator for Cache 2010-02-03 15:32:58 +01:00
Cédric Krier 010ebcc33e Use generator expression to instanciate BrowseRecordList instead of list comprehensions 2010-02-03 15:31:21 +01:00
Cédric Krier 6aec5c64ab Don't put "OFFSET 0" for PostgreSQL backend
"OFFSET 0" adds a limit operation in query plan
2010-02-03 15:25:57 +01:00
Cédric Krier 0a9fae483f Return the same id when reading with default_get in Singleton 2010-02-03 15:23:19 +01:00
Cédric Krier 8369b484f3 Remove hardcoded True in SQL for issue1403 2010-01-30 00:17:49 +01:00
Cédric Krier 07e8939925 Raise exception when search function is missing on Function fields for issue1378 2010-01-26 12:15:35 +01:00
Cédric Krier 96f86dd0e9 Update COPYRIGHT 2010-01-24 00:21:58 +01:00
Mathias Behrle a5883ab6d6 Improve some tab descriptions for issue 1339 2010-01-23 02:06:01 +01:00
Cédric Krier 5d229f6fad Move OPERATORS into const to be able to reload modules 2010-01-22 11:44:31 +01:00
Cédric Krier 5832d1cca7 Improve pool restart if exception occurs in register_classes 2010-01-22 11:43:32 +01:00
Cédric Krier d9a22d2702 Remove user from context when bypassing rules 2010-01-21 21:03:29 +01:00
Cédric Krier d402ba4370 Use searched value in logging instead of csv one when failing to import
many2many for issue1389
2010-01-21 18:33:38 +01:00
Cédric Krier 989f6b4b98 Fix typo
_get_id -> get_id
2010-01-21 18:24:42 +01:00
Cédric Krier 1946063a5d Don't put many2one in the search cache (too slow) and externalize some
function result outside the loop
2010-01-21 12:47:32 +01:00
Cédric Krier d92cb527ae Use get_id of ir.model.data 2010-01-21 12:07:25 +01:00
Cédric Krier fcffeace74 Improve get_id of ir.model.data by adding context and use limit in search 2010-01-21 12:06:20 +01:00
Bertrand Chenal 6f5ca8b54a Add LRU memoization, use it to cache compiled code for safe_eval 2010-01-21 10:16:31 +01:00
Cédric Krier d818ee1a89 Fix typo in get_id 2010-01-20 18:13:30 +01:00
Cédric Krier bbe480fa21 Use list comprehensions for dictfetch* function of Cursor 2010-01-20 15:28:09 +01:00
Cédric Krier 5819e2cbe9 Better test to import json
There is an other json module for python < 2.6
2010-01-20 15:22:33 +01:00