Cédric Krier
e11a23deb2
Rationalize import path
...
We use absolute path when imported module is from a different context.
And we remove unnecessary __all__ definition.
issue9466
review323591002
2020-07-21 14:38:36 +02:00
Nicolas Évrard
8fb13634ea
Use direct access to backend classes
...
issue8836
review258421002
2019-12-06 17:33:47 +01:00
Cédric Krier
1738a4ec35
Add ir.message and use custom exceptions
...
issue3672
review35291002
2018-12-29 14:19:08 +01:00
Cédric Krier
39ea946edd
Remove custom strftime for year before 1900
...
The bug has been fixed in Python 3.3
issue7814
review48671002
2018-10-31 18:15:57 +01:00
Cédric Krier
4d779f27eb
Remove migration before 3.0
...
issue6470
review52421002
2018-08-09 20:43:52 +02:00
Cédric Krier
7a2ce7905a
Add __table_handler__ to ModelSQL
...
issue7581
review48531002
2018-07-24 22:01:08 +02:00
Cédric Krier
d2a461390a
Remove support for Python 2.7
...
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Sergi Almacellas Abellana
bfb76a70ad
Add deactivable mixin and ensure active field is present
...
issue4341
review38401002
2018-03-26 14:07:45 +02:00
Cédric Krier
668938d3f9
Test one fix at a time and catch only Template.substitute exceptions
...
issue6985
review35781002
2017-12-06 01:15:24 +01:00
Nicolas Évrard
ddb7769310
Move handling of sequences to the Database object
...
issue6788
review43521002
2017-10-02 17:48:23 +02:00
Cédric Krier
c1b8ee10c6
Add has_select_for on Database
...
- Use has_select_for for ir.sequence.strict instead of lock
issue6134
review32911002
2017-01-25 23:21:57 +01:00
Cédric Krier
16035680aa
Do not force _table of SequenceStrict
...
Simply resetting to None will make ModelSQL to recompute the name.
2016-08-27 01:39:30 +02:00
Cédric Krier
c0709a7b2c
Fix default value and check of last_timestamp of Sequence
...
The client integer widget does not allow to display float value. So the default
value of last_timestamp is replaced by None which fails later in the check.
Also the check must not validate when it is not filled because in Python3 None
and int are unorderable.
issue5591
review28571002
2016-07-26 23:07:18 +02:00
Sergi Almacellas Abellana
74dcfeb6a6
Allow to customize the substitutions used on sequence
...
issue4422
review24241002
2016-05-24 11:16:24 +02:00
Cédric Krier
6b2f90e0f5
Sequence number next has no value for type different of incremental
...
issue5329
review17931002
2016-03-16 22:03:41 +01:00
Nicolas Évrard
2fef479575
Follow PEP-0249 for Transaction and backends
...
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier
44dc331ced
Use Constraint instance in ModelSQL._sql_constraints
...
issue4814
review15491002
2015-06-22 16:57:06 +02:00
Cédric Krier
bcd28ca071
Remove safe_eval
...
We convert all the fields that were storing python code into PYSON.
We add a pyson attribute on field tag to store PYSON value.
issue4416
review6971002
2015-03-09 19:40:41 +01:00
Cédric Krier
c144f8c349
Fix most flake8 errors
...
review8771002
2014-12-02 12:54:01 +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
e0b995abbe
Refactore configuration to allow easy extention
...
issue3627
review7401002
2014-09-03 23:32:01 +02: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
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