Cédric Krier
bf6f7c7746
Database.init doesn't take cursor anymore
2016-03-06 02:04:13 +01:00
Cédric Krier
49a844013e
Missing PEP-0249 for db_exist
2016-03-05 18:33:24 +01:00
Cédric Krier
9dba6822a9
Missing close when Transaction put connection
...
If the Transaction is started with close, it should force to close the
connection when put back.
2016-03-05 18:32:49 +01:00
Cédric Krier
a94627b160
Remove LocalDict from tools
...
issue5364
review21781002
2016-03-05 17:31:25 +01:00
Cédric Krier
4d58b3a720
Don't remove from context the format of Binary fields
...
The getter of the Binary field could be called many times in the same
transaction, so popping out the format from the context create a side effect
that changes the requested format.
issue3774
review19981002
2016-03-05 17:26:27 +01:00
Cédric Krier
22dc3d23bc
Remove __setattr__ from Model
...
This method is there to only skip the id attribute to be set using the field
__set__ but it has a cost as it is called each time an attribute is set.
So we store now the id value in the attribute '_id' which doesn't overload the
field and we adapt field __get__ for this new location.
The __getitem__ is also removed as it is deprecated since 2.6.
issue5296
review17031002
2016-03-04 00:19:18 +01:00
Cédric Krier
512808e151
Add LRUDictTransaction
...
issue5293
review22771002
2016-03-03 23:27:38 +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
3e13f3d004
Fix SQLite greatest and least for unorderable None
...
In Python3, None can not be ordered because it doesn't have a natural order.
So we implement the same behaviour for SQLite than PostgreSQL which ignore NULL.
issue5358
review20821002
2016-03-01 21:46:14 +01:00
Nicolas Évrard
356fd6e9e7
Open view and icon files in binary mode
...
Since the support of python3 has been added file_open will return unicode
object when read in normal mode but icon files has to be considered as bytes
and lxml.etree.fromstring expect also bytes when there is an encoding
declaration (and not unicode).
issue5354
review17081002
2016-02-29 13:03:57 +01:00
Cédric Krier
64d6e4b3ec
Test values against bytes instead of str
...
For Python3 compatibility, the test to decode should be done on bytes because
str in Python3 is already a unicode.
issue5355
review24851004
2016-02-27 23:48:28 +01:00
Cédric Krier
ae8975ede3
Add doctest checker for Python 2-3
...
2to3 doesn't convert unicode string of Python 2 into string of Python 3.
So we will use a special checker that remove the 'u' prefix when checking
output.
issue3211
review19911002
2016-02-24 22:00:06 +01:00
Nicolas Évrard
61018dc9b7
Fix wrong test for existing database introduced in changeset 903a52fc1bb2
...
issue5238
review18861002
2016-02-23 17:40:30 +01:00
Cédric Krier
91b09d297d
Cache must be cleared on each Cron.run
...
issue5332
review21711002
2016-02-22 23:17:19 +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
68eca37c72
Add _update_definitions after column_rename
...
issue5325
review16001002
2016-02-15 10:07:18 +01:00
Cédric Krier
af00126074
Allow to modify XML record with noupdate
...
issue5176
review19851002
2016-02-11 22:18:29 +01:00
Cédric Krier
70827fe06b
XML files must be open in binary mode for sax parser
...
The sax parser expect a byte stream, so we must open the file with the binary
mode. Also file_open should have a default encoding to None because encoding
should not be set in binary mode.
issue5313
2016-02-09 22:45:44 +01:00
Cédric Krier
7ca5529e49
Use assertValid instead of assert_from lxml.etree.RelaxNG
...
2to3 convert assert_ into assertTrue but this method is not defined in lxml.
To avoid this conversion, we use assertValid.
issue5314
review21681002
2016-02-09 21:05:37 +01:00
Cédric Krier
8eeb0140ed
Add encoding to file_open
...
For Python3, we must define the encoding when opening a file.
issue5313
review21671002
2016-02-09 21:04:39 +01:00
Cédric Krier
41f4702273
Use warnings instead of logging for missing SQLite TableHandler features
...
and capture warnings into logging.
This allow to not be flooded by the same kind of warnings when running tests.
issue5316
review17821002
2016-02-09 18:42:59 +01:00
Raimon Esteve
92f9374a21
Prevent deleting translations that are not updated
...
issue5310
review21661002
2016-02-08 18:08:19 +01:00
Cédric Krier
e201484c37
Add missing doc about "Record Rule"
...
review18941002
2016-02-08 18:07:44 +01:00
Cédric Krier
29129855ec
Add support for Python 3
...
issue3211
review7311002
2016-02-07 16:46:16 +01:00
Cédric Krier
da1be07832
Make TestCase create and drop its database
...
and add with_transaction decorator.
issue5263
review20711002
2016-02-06 19:10:35 +01:00
Cédric Krier
1ae75711a8
Add Note on resources
...
issue4669
review12061002
2016-02-02 19:14:35 +01:00
Cédric Krier
aeddfaa7c0
Add history tests for reading One2Many with datetime_field
...
issue5269
review20671002
2016-02-02 19:03:57 +01:00
Cédric Krier
81f1e8b6db
Fix typo when reading getter fields with datetime_field
...
issue5269
review20671002
2016-02-02 19:03:11 +01:00
Nicolas Évrard
9f93cf1822
Fix typo introduced in the documentation in changeset a4ddc81fecf5
2016-01-21 11:13:33 +01:00
Nicolas Évrard
d4e3b605ef
Add 'where' operator to xxx2many
...
issue4507
review12951002
2016-01-21 10:48:32 +01:00
Cédric Krier
fa0774cd1e
Add more details on invalid XML error
...
It is useful when the error happens during the execution of the tests.
issue5257
review17761002
2016-01-21 10:40:30 +01:00
Cédric Krier
2f2e95e09f
Drop also foreign key constraint of old field column of ir.rule
...
The foreign key must be dropped otherwise changes in the ir.model.field table
can fail because of the foreign key constraint.
The migration should always remove all unused constraints.
issue5241
review17741002
2016-01-21 10:27:22 +01:00
Nicolas Évrard
d0c5d9692a
Remove buggy split introduced in changeset 5eb1afcd5fd6
2016-01-18 22:34:04 +01:00
Nicolas Évrard
88f1bce6d4
Strip and unquote double-quote from Postgresql schema in search_path
...
issue5248
review16931002
2016-01-18 19:09:48 +01:00
Sharoon Thomas
89de660c52
Move webdav into a separate module
...
issue4703
review7101002
2016-01-16 19:20:30 +01:00
Nicolas Évrard
97700f8629
Do not set _datetime when instanciating the user in record rules
...
Setting _datetime would allow to read historized values and it could lead to
past privilege escalation
issue5216
review21581002
2016-01-14 14:10:43 +01:00
Cédric Krier
493db9aa18
Instance method can also be used as selection method
...
review24691002
2016-01-13 21:25:26 +01:00
Nicolas Évrard
1fcee4a07e
Add failfast argument to run-test.py
...
issue4253
review22711003
2016-01-13 16:23:51 +01:00
Sergi Almacellas Abellana
25124c57b6
Fix CHANGELOG order
2016-01-11 16:14:20 +01:00
Sergi Almacellas Abellana
2a723f2e52
Only rebuild mptt tree if needed
...
The tree will be only rebuild if a record with the default value of left or right fields exists.
issue5118
review16921002
2016-01-11 15:33:08 +01:00
Cédric Krier
1bd76628c6
Set view_ids attribute only if it is not empty
...
issue5207
review15861002
2015-12-31 14:17:03 +01:00
Cédric Krier
71c0e0a3af
Allow nested inherited views
...
Search and use the recursive type of the views
issue5206
review17691002
2015-12-31 14:15:51 +01:00
Cédric Krier
1f04a58562
Remove comments from view.arch
...
A side effect of this change is that now the method parse only once the arch of
each view instead of dumping and parsing the intermediary result of
inheritance.
issue5189
review18831002
2015-12-31 14:13:03 +01:00
Cédric Krier
cde3170700
Add button on cron to run once
...
issue5186
review22661002
2015-12-31 13:45:59 +01:00
Sergi Almacellas Abellana
80b3679dd3
Backed out changeset ac3c495d797f
2015-12-28 15:29:21 +01:00
Sergi Almacellas Abellana
fc58438188
Only rebuild mptt tree one time per model in a database update
...
issue5118
review20501002
2015-12-28 14:13:03 +01:00
Cédric Krier
2e37bf7852
Don't return changed many2one if the id is None
...
If the id is None, it is a temporary record which should not be considered as a
value change.
issue5190
review20601002
2015-12-27 20:03:59 +01:00
Cédric Krier
1a7c6c3a06
Add missing id on label
...
Fields without read access are replaced by empty label but they still require
at least a name attribute or an id.
issue5187
review19701002
2015-12-27 20:01:03 +01:00
Cédric Krier
8c1e5e087c
Add test for for check fields when writing a sequence of records, values
...
issue5167
review22631002
2015-12-16 13:48:19 +01:00
Cédric Krier
5999bb231d
Check all fields when writing a sequence of records, values
...
issue5167
review22631002
2015-12-16 13:47:33 +01:00