Commit Graph
53 Commits
Author SHA1 Message Date
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 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
Albert Cervera i Areny 25463800c9 Replace _constraints with validate in ModelStorage and improve user messages.
issue2616
review371002
2013-03-07 16:53:19 +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 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier e7b1f97390 Replace wrong usage of False by None
issue2512
2012-03-27 10:41:40 +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
Nicolas Évrard 6ba18631e8 Use relative imports 2011-12-14 17:00:13 +01:00
Nicolas Évrard 0a471486e0 correct pyflake errors
review164003
2011-11-02 15:49:38 +01:00
Cédric Krier 2fc1c27b3f Make PYSON more Pythonic
review80001
2011-08-21 11:19:06 +02:00
Cédric Krier 5a192571d4 Use SQL sequence on PostgreSQL for ir.sequence
Based on Openlabs module

review79002
2011-08-09 12:35:32 +02:00
Cédric Krier 852f04dc51 Remove support of Python2.5 and fix py3 warnings 2011-07-12 00:16:15 +02:00
Cédric Krier 550aae8351 Change Pool into a Singleton
review42001
2011-07-03 13:20:58 +02:00
Sharoon Thomas 1bb663298b Change field type of timestamp_rounding to Float to allow higher precision timestamp in sequence fixes issue2049 2011-06-08 13:06:22 -04:00
Cédric Krier 56e8ebe5d0 Add timestamp sequence 2010-09-02 17:31:51 +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 483afed26a Catch only Exception according to PEP 352 2010-07-08 19:53:39 +02:00
Cédric Krier cb63509356 Add MySQL backend 2010-02-25 16:43:04 +01:00
Cédric Krier d9a22d2702 Remove user from context when bypassing rules 2010-01-21 21:03:29 +01:00
Cédric Krier 847fb72e90 Add PySON to replace python string evaluation on client side 2010-01-20 10:55:19 +01:00
Bertrand Chenal 49a099e6c8 Add rules on sequences 2010-01-19 12:23:19 +01:00
Cédric Krier cae0a76a3d Remove egenix-mx-base and replace it by python-dateutil 2009-12-17 11:39:54 +01:00
Cédric Krier 72c8b8fd81 Don't use now() in SQL statement as it doesn't work on SQLite 2009-11-04 09:01:54 +01:00
Cédric Krier f820d707f5 Remove _sequence on ModelSQL
Add nextid, setnextid, currid, lastid to have a generic way to handle sequence
Add has_lock function to be more database independant
2009-07-07 19:32:31 +02:00
Cédric Krier bd02e85cee Don't use hardcoded true/false in SQL queries to be more database independant 2009-07-07 19:22:56 +02:00
Cédric Krier c9992e11d2 Remove OSV and WizardOSV and move Cacheable into model 2009-02-28 16:56:54 +01:00
Cédric Krier e27a5e48e7 Pre-fetch number_next for issue827 2009-02-28 11:42:19 +01:00
Cédric Krier 40fe99ad1a Use SQL query to bypass access rules in ir.sequence:get_id 2008-12-30 13:35:32 +01:00
Cédric Krier 794e000791 Handle default value in context for ir.sequence for issue609 2008-11-25 12:36:51 +01:00
Cédric Krier b7487e8d1d Improve ir.sequence to use ORM (search, write) in get_id 2008-11-25 00:14:14 +01:00
Cédric Krier b50544c3ff Change label of code in ir.sequence for issue608 2008-11-24 19:56:52 +01:00
Cédric Krier d1f284712b Add translate on name and fix code_get to translate type name for issue527 2008-11-11 23:20:02 +01:00
Cédric Krier e89990413d Add ir.date and use it for sequence 2008-10-08 12:17:28 +02:00
Cédric Krier d2b5a3b798 Fix table name in ir.sequence for issue376 2008-09-18 11:46:55 +02:00
Cédric Krier d5620518b4 Allow to force an other date for formatting sequence
Update write_uid and write_date in ir_sequence on get_id
2008-09-12 11:52:57 +02:00
Cédric Krier bf084536dc Handle two kind of sequence one with lock on table (strict) and one without 2008-09-10 17:41:36 +02:00
Cédric Krier 2861ff23be Add translation of _constraints 2008-08-05 11:34:45 +02:00
Cédric Krier 557d39c004 Remove ExceptXXX
Add function raise_user_error for translation of error message
2008-07-17 19:35:03 +02:00
Cédric Krier 0232c66506 Fix COPYRIGHT 2008-06-23 20:18:54 +02:00
Cédric Krier cf1de6502a Remove size constraint and fix required on integer 2008-06-04 01:25:22 +02:00
Cédric Krier c0d5db44c1 Use Template for sequence suffix and prefix
and add check to validate it for issue13
2008-05-19 10:43:59 +02:00
Cédric Krier 71a4c195e7 Raise exception if there is no sequence 2008-04-29 12:41:13 +02:00
Cédric Krier db410a3fc8 Make _rpc_allowed no more a class instance and add selection and reference
methods to it
2008-03-03 19:10:57 +01:00
Cédric Krier ac142e65a4 Remove pool from args of __init__ of OSV
More simple to inherit
2008-03-03 18:30:39 +01:00
Cédric Krier a013c3bdca Change all query with %d into %s for psycopg2 2008-02-27 11:10:51 +01:00
Cédric Krier d80152ce78 Remove _defaults dict and replace by default_ function to allow easy override 2008-02-26 16:23:05 +01:00
Cédric Krier c6948c3f35 Remove _columns dict and put it directly in the object to reflect better the
browserecord
2008-02-26 12:40:40 +01:00
Cédric Krier b38c97bd4a Fix inheritance in __init__
- Add field only if pool is not None
- Don't append to mutable object because they are static in ORM object so they
  will be change for all objects
2008-02-17 02:36:25 +01:00
Cédric Krier 1013a93e33 Add rpc_allowed to improve security on object
A method can only call by rpc if it is in _rpc_allowed list
2008-02-15 18:26:51 +01:00