Commit Graph
5181 Commits
Author SHA1 Message Date
Cédric Krier d82f314e0c Remove unused import 2015-03-17 10:02:30 +01:00
Cédric Krier 31e8634bf4 Fix bytes and bytearray usage
- sqlite can not convert bytearray, must use buffer
- binary value could be stored as unicode
- don't dump bytes as base64 in xmlrpclib if bytes is str
2015-03-16 20:13:03 +01:00
Cédric Krier 5cfde31ed2 Use bytes and bytearray for Binary
issue4637
review11091002
2015-03-16 19:28:34 +01:00
Cédric Krier ad5eb3ed97 Add ModelView.button_change
issue4397
review7781002
2015-03-16 12:56:11 +01:00
Cédric Krier e631dbee65 Skip domain validation for Reference fields
issue4639
review8001002
2015-03-15 16:27:27 +01:00
Cédric Krier d7db35c995 Fix selection_change_with
Initialize selection_change_with with en empty set. It must be a set to allow
later fields.depends to update it. The ModelAccess.check_relation must also
manage instance method.

issue4636
review14091002
2015-03-15 16:26:10 +01:00
Cédric Krier 39e7eeeadb Add support for psycopg2cffi and PyPy
issue4408
review11741002
2015-03-15 15:52:03 +01:00
Cédric Krier c17fbf5f25 Iter over copy of lxml.etree children
and remove deprecated usage of lxml.etree getchildren.
The cffi implemenation of lxml doesn't support to change the parent of element
while itering over it. It results of missing loop of some elements.

issue4408
review11741002
2015-03-15 15:49:37 +01:00
Cédric Krier b7776731a6 Add noeval to PYSONDecoder
issue1616
review15071002
2015-03-10 23:47:38 +01:00
Cédric Krier e985252f2d Add __repr__ to PYSON
issue4607
review4151002
2015-03-10 23:38:33 +01:00
David Harper 0c9012f3b7 change Ok to OK
issue4290
review7011002
2015-03-10 18:17:32 +01: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 a2326eb51e Use separate date and time widget in attachment list view
issue4629
2015-03-09 14:16:41 +01:00
Cédric Krier 870c058eaa Add test for search_read order
issue3228
review11051002
2015-03-05 11:44:11 +01:00
Cédric Krier 71eebf25e5 Fix result order of search_read
read doesn't respect the order of the given ids but search_read has an order
parameter so the read result must be sorted using the index of search result.

issue3228
review11051002
2015-03-05 11:43:27 +01:00
Cédric Krier 44693df703 Use separate test file for base modules
This allows to filter them with the command line option.

review9051002
2015-03-05 11:38:23 +01:00
Cédric Krier 20484bb013 Fix formatting in logger calls 2015-03-05 11:32:18 +01:00
Cédric Krier faa4bfe7d9 Add test on Model._rec_name
review9041002
2015-03-05 11:13:50 +01:00
Sergi Almacellas Abellana 5436fe6cee Add support for Greatest and Least on SQLite
issue4597
review13011002
2015-03-04 18:15:06 +01:00
Cédric Krier 0ac0990c77 Improve logging
issue4458
review11781002
2015-03-02 23:39:15 +01:00
Cédric Krier f5e69c3abf Add product attribute on form view for One2Many
issue4229
review13581002
2015-03-02 23:18:22 +01:00
Cédric Krier 0d3459f659 Add missing base module test cases 2015-02-27 12:29:38 +01:00
Cédric Krier 0235d02ae7 Fix TimeDelta for MySQL
MySQL doesn't have a INTERVAL type so it must fallback to storing the total
seconds as DOUBLE.

issue4026
review8951002
2015-02-19 13:45:57 +01:00
Cédric Krier 36555242de Use root user to compute user's sessions
There is an access rule on ir.session so user can only see his own session.
So it needs to use the root user to compute for others.

issue4558
review10201002
2015-02-14 18:32:56 +01:00
Cédric Krier 08b4dc2dd0 Improve type checking in PYSON
- convert long type to int
- convert str and unicode to basestring
- use isinstance when possible

issue4405
review11881002
2015-02-14 17:52:59 +01:00
Sergi Almacellas Abellana 2e4d1441ea Prevent validating records multiple times
issue4548
review14981002
2015-02-13 18:14:12 +01:00
Guillem Barba 4a2255c8d6 Don't remove elements from tuple on group's menu_access field
The changeSet 2a7d6a7e5c59 modified the returning of get()
method of Many2Many fields, from dictionary of list to dictionary of tuples.

issue4542
review14971002
2015-02-10 19:12:32 +01:00
Cédric Krier ace2988e39 Fix missing migration of trigger unittest to TimeDelta 2015-02-09 23:37:33 +01:00
Cédric Krier 5a34e18b75 Fix SQLite convert interval for min/max value
The total_seconds of timedelta min and max can not be used to instanciate a
timedelta. So we need to test for such case and return timedelta min or max.
2015-02-09 23:36:32 +01:00
Cédric Krier 0991a552de Add TimeDelta field
And remove float_time widget.

issue4026
review5911002
2015-02-09 22:58:56 +01:00
Cédric Krier 0f468bde64 Allow string attribute on field in tree view 2015-02-04 23:39:22 +01:00
Sergi Almacellas Abellana c4e96f4a08 Improve error message when model does not have any docstring
issue4390
review12921002
2015-02-04 23:16:11 +01:00
Cédric Krier 288dc51876 SQL SIGN must return zero for zero
The SQLite implementation of SIGN is not correct for zero, it must return zero
instead of 1.

issue4518
review10831002
2015-02-04 23:19:45 +01:00
Cédric Krier 1b0edb06c6 Cache.resets must be executed inside a Transaction
since changeset 01399128964f

issue4448
review13921002
2015-02-04 23:16:53 +01:00
Cédric Krier 32001bc6d6 search_global yields record instead of id
It is better for customization to yield record instead of id to prevent to
instantiate a second times the record.

issue4519
review6871002
2015-02-04 13:37:02 +01:00
Cédric Krier 9fc9716d3e Add no-doctest option to run-test.py
Sometimes it is useful to quickly run only the unittest without the doctest.

review7871003
2015-01-29 12:29:40 +01:00
Cédric Krier cf74a7b509 test_depends should not fail if module doesn't register any model 2015-01-27 22:42:33 +01:00
Cédric Krier 50dfa3f7c5 Add check for default model access and add ModelTestCase
When group access exists, a default model access should be defined otherwise
all access are given to non group users.

issue4485
review5941002
2015-01-27 18:11:23 +01:00
Sergi Almacellas Abellana 278e44f884 Allow to apply inheritance in calendar view
issue4473
review10061002
2015-01-21 19:52:26 +01:00
Sergi Almacellas Abellana 1ecdc9d3c9 Remove all the view elements which the user doesn't have access
issue4487
review10071002
2015-01-21 19:50:39 +01:00
Nicolas Évrard a8acb64a51 Report API refactorization
review8831002
2015-01-20 18:48:46 +01:00
Cédric Krier 000f8fe5ac Add active field on action list views
issue4501
review5951003
2015-01-20 12:01:06 +01:00
Jean Cavallo dc0b21c9c3 Do not clear _datetime entry from context in rpc -> convert
issue4497
review8871002
2015-01-20 11:58:31 +01:00
Cédric Krier de081a63e8 Fix typo when retrieving PGUSER from environ
introduced in changeset 277c10477f84
2015-01-17 17:19:44 +01:00
Mariano Benedettini 53194e3784 Fix database dump when port is specified in db uri
Since changeset 01399128964f, the uri port is an integer and so it must be
convert to string for command line.

issue4490
review6861002
2015-01-16 13:52:25 +01:00
Guillem Barba 21ed4772e5 Recover uninstall modules feature
Manage case when state is 'to remove'.

issue322
review7881002
2015-01-16 10:21:52 +01:00
Cédric Krier 4891d337c9 Use PGUSER for postgresql database list
psycopg2 uses the PGUSER environment variable if no user name defined.

issue4478
review11801002
2015-01-15 23:49:13 +01:00
Marius Grigaitis 34b1af7a9d Add test on history when number of records exceeds cursor.IN_MAX
issue4463
review10031002
2015-01-15 23:45:32 +01:00
Marius Grigaitis 8ed1715488 Handle history when number of records exceeds cursor.IN_MAX
issue4463
review10031002
2015-01-15 23:45:02 +01:00
Cédric Krier bc6b76c745 Add _datetime as key of Rule.domain_get cache
The result could contain the _datetime value and so the cache should depend on
this value.

issue4455
review8841002
2015-01-12 22:50:09 +01:00