Commit Graph
31 Commits
Author SHA1 Message Date
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Nicolas Évrard 9aa648513e re-add the use of the case removed in changeset 0c62b08fa917
Removing the case resulted in the evaluation of expression that were not valid
like the cast of a string into an integer.

issue5335
review16011002
2016-02-19 12:43:12 +01:00
Cédric Krier c18ec6ba74 Add support for float and integer on Property fields
issue4942
review18531002
2015-09-14 10:37:38 +02:00
Cédric Krier 390aebef15 Simplify the SQL query for domain on property
- Remove useless CASE test
- Simplify double negation

issue4835
review21271002
2015-07-09 15:38:44 +02:00
Cédric Krier 5478e5463f Don't use subquery to enforce record rule
Rule.domain_get returns now only a domain and Rule.query_get returns the query
which domain_get used to.

issue4800
review8151002
2015-06-15 01:14:47 +02:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Robin Baumgartner 8b3557921e Use Null constant from python-sql for comparisons
issue4143
review13701003
2014-11-24 13:57:12 +01:00
Cédric Krier a2c8111f26 Use context to check model and field access
* Model and Field access checked only if _check_access is set
* Add check_access to RPC
* Add check_access to Wizard and Report

issue4081
review8481002
2014-09-17 21:43:53 +02: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 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 2e8ec5f5df Replace SPLIT_PART by SUBSTR and POSITION
SPLIT_PART is not a standard SQL function (it is not supported by MySQL).
SUBSTR is used even if it is not standard SQL because SUBSTRING is not
supported by SQLite. This will change once we will migrate to python-sql.

review784002
2013-04-14 23:17:55 +02:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier abb44d5703 Fix usage of None in search clause
review353002
2012-05-05 09:32:24 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Nicolas Évrard 584d516067 Integer, Numeric and Float allow None as value
NULL value is None and not False

issue2022
review237004
2012-03-23 17:52:36 +01:00
Max Holtzberg f23f3b5525 Enable False search on property fields by domain inversion
issue2345
review203002
2012-02-28 12:51:01 +01:00
Max Holtzberg 250e37f88c Passing false to SQL query on property field search as parameter
issue2351
review206002
2011-12-28 16:03:31 +01:00
Cédric Krier 550aae8351 Change Pool into a Singleton
review42001
2011-07-03 13:20:58 +02:00
Cédric Krier df1fd283ac New transaction management
Remove cursor, user and context from methods and use Transaction instead
2010-08-19 22:01:12 +02:00
Cédric Krier e36c70ce3b searcher on Function fields take only one domain clause as argument 2010-03-23 11:22:31 +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 b5fb4d1ef3 Refactoring by validation with pylint 2010-02-18 18:50:35 +01:00
Gour 486d46a405 fix typos for documentation (Model chapter) 2009-09-13 15:37:11 +02:00
Cédric Krier 45914073bf Use faster join implementation:
- use generator when possible
- use tuple __mul__
2009-08-26 15:39:53 +02:00
Cédric Krier a359c7c0a2 Fix the use of rowcount because it can return -1 or None according to PEP249 2009-07-07 19:14:51 +02:00
Bertrand Chenal b87f41a3d9 Add missing _table usage 2009-03-26 10:52:40 +01:00
Bertrand Chenal 14f638b7e0 Use _table of models for query construction 2009-03-26 10:27:16 +01:00
Bertrand Chenal 301bd86a21 Added search method on property field 2009-03-25 18:34:35 +01:00
Cédric Krier 65d0a9494b Update model documentation.
Use autodoc in sphinx
Add missing and fix docstring
2009-03-01 13:37:31 +01:00
Cédric Krier 66f0ada474 Allow to use related fields (many2one and reference) in read
Use rec_name function field instead of name_get and name_search
Remove get function on many2one field
Don't put record name in reference field
Handle rec_name in default_get so default value for many2one are now only id
2009-02-17 11:40:31 +01:00
Cédric Krier e28edc4d99 Add model.fields
Use better naming of field attributes
2009-02-03 18:58:25 +01:00