Commit Graph
5181 Commits
Author SHA1 Message Date
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 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 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
Nicolas Évrard 1fcee4a07e Add failfast argument to run-test.py
issue4253
review22711003
2016-01-13 16:23:51 +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
Cédric Krier e09cc7780b Recursively get the type of views
View can inherit inheriting view if the model is different, so the validation
must retrieve recursively the RNG type.

issue5153
review15841002
2015-12-13 14:53:22 +01:00
Karla Stenger 551b83e964 Improve message of resource_name of ir.attachment
issue5075
review20511002
2015-11-17 15:11:03 -03:00
Cédric Krier bcd557da3b Many2Many are not sortable
fields_get should set sortable to False for Many2Many.

issue5123
review15821002
2015-11-15 12:45:41 -03:00
Cédric Krier 9a58954703 Add view_ids on tree view
issue5052
review24511002
2015-11-10 12:55:06 +01:00
Cédric Krier bdc59e96b0 Remove unused form attributes sum, key and color
issue5053
review17601002
2015-11-10 12:48:47 +01:00
Cédric Krier b042754afb Missing depends ['inherit'] in "ir.ui.view"."type" 2015-11-05 23:33:38 +01:00
Cédric Krier a61474274a Add parent_of operator
issue5037
review15711002
2015-11-05 23:22:26 +01:00
Cédric Krier c140a134bb Enforce type of inheriting view
issue5036
review18711002
2015-11-05 23:07:53 +01:00
Cédric Krier b5479332d9 Use instance context in translated descriptor of Selection field
It is more expected from the translated descriptor to return translation in the
language from the instance instead of the current context.

issue5028
review15701002
2015-11-03 12:20:49 +01:00
Cédric Krier 1d0ac436ca Increase version number 2015-11-02 14:56:00 +01:00
Cédric Krier e3b4ff9f6f Prepare release 3.8.0 2015-11-02 14:55:05 +01:00
Cédric Krier d17c4b550e Add MPTT test for nested create
issue5095
review24571002
2015-11-02 11:41:41 +01:00