Commit Graph
2223 Commits
Author SHA1 Message Date
Hartmut Goebel fcbb008161 Clarified help message for --debug option 2010-03-21 14:24:53 +01:00
Cédric Krier 4060c59560 Replace child{1,2} attributes in xml views by a unique child 2010-03-19 15:24:10 +01:00
Cédric Krier 5db2dc4025 Models that uses _inherits will search in inherited parents for missing functions
This will prevent the needs to define on_change_* function and button method
in the child Model. In case of diamond problem, it is the first parent in the
dictionary that will be taken.
2010-03-19 15:17:50 +01:00
Cédric Krier ec8907e04d Fix on_change_* call in _default_on_change 2010-03-19 09:51:41 +01:00
Cédric Krier 2b8a71af22 Remove ids from on_change* calls 2010-03-18 18:14:54 +01:00
Brice V. 5e2a7de385 Fix typo on field types for issue1451 2010-03-18 10:33:59 +01:00
Cédric Krier d4d7c57f86 Add JUMP_IF_FALSE_OR_POP opcode for Unladen Swallow 2010-03-17 22:16:25 +01:00
Cédric Krier cc6e750a2f Don't copy One2Many values if relation_field is not set for issue1448
If relation_field is not set then it is a function field and the copy method
will not link duplicated One2Many records to the new record.
2010-03-17 18:46:56 +01:00
Cédric Krier 99f82593a3 Remove required attributes from view and instead use states for issue1449 2010-03-17 17:55:37 +01:00
Cédric Krier 84b0c7ebbf Allow to have boolean as states value 2010-03-17 17:54:16 +01:00
Cédric Krier dee1f99c73 merge 2010-03-17 13:11:22 +01:00
Cédric Krier affdf1ce28 Remove unused saves attribute and don't allow any more "required" attribute
"required" attribute in view is not used as validation is done at the model
level.
2010-03-17 13:10:27 +01:00
Cédric Krier 8ec67b1eba merge 2010-03-17 11:51:34 +01:00
Cédric Krier 2e2227d795 Improve search on translatable fields for issue1442 2010-03-17 11:50:52 +01:00
Cédric Krier dab0df51de export_data return empty value for invisible fields 2010-03-17 11:43:21 +01:00
Cédric Krier aed753e21c Don't raise error message about required Integer or Float
Integers and Floats have 0 as default value at the database level
2010-03-16 13:35:13 +01:00
Cédric Krier 48f20c1bd0 Use tests instead of test_xxx as test module to run suite
This generalizes the usage of suite function
2010-03-14 14:56:51 +01:00
Cédric Krier 0505205179 Avoid transaction lock when creating database in unittest 2010-03-13 09:24:01 +01:00
Cédric Krier 9eedc60aa0 Improve unittest to run test_suite inside setuptools 2010-03-12 17:47:49 +01:00
Cédric Krier 473f94dc2b Use str to convert long into Decimal 2010-03-12 17:45:22 +01:00
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