Commit Graph
120 Commits
Author SHA1 Message Date
Nicolas Évrard dcf57d8c33 Allow to use the dotted notation for search order parameters
issue4370
review5801002
2015-01-02 16:33:00 +01:00
Cédric Krier 67d5291bfd Use Field.sql_column for SELECT queries in ModelSQL
By using sql_column, it increases the possibilities of customisation of fields.

issue4369
review14711002
2014-12-20 19:24:42 +01:00
Sergi Almacellas Abellana dc3ee92a88 Fix One2One to create all the relations when called with multiple records
issue4353
review12711002
2014-12-05 18:32:00 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier b379e32745 Add translated descriptor for Dict field
issue4343
review11641002
2014-11-27 22:20:43 +01:00
Cédric Krier ea112cb6be Function fields should return proper sql_type
issue4302
review12701002
2014-11-27 22:16:34 +01:00
Robin Baumgartner 8b3557921e Use Null constant from python-sql for comparisons
issue4143
review13701003
2014-11-24 13:57:12 +01:00
Cédric Krier 9108f66d81 Ensure xxx2Many field are always tuple to be immutable
issue4327
review8701002
2014-11-19 21:37:22 +01:00
Sergi Almacellas Abellana 53e943f5cb One2One field should return None when field has no value
review12691002
issue4335
2014-11-17 12:57:54 +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 16aa948e3d Add support for domain_<field name> method
issue4126
review6501002
2014-09-13 15:14:56 +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 6765a12e5a Add add_remove alias on Many2Many for compatibility with One2Many
issue4112
review5511002
2014-09-01 12:53:32 +02:00
Cédric Krier cd2ac5c1b1 Add translated descriptor for Selection field
issue3679
review10401002
2014-08-04 16:50:59 +02:00
Cédric Krier 2b5e337553 Missing loading attribute in Function.__copy__
and remove useless deepcopy of string attributes.

review11391002
2014-08-01 10:20:32 +02:00
Sergi Almacellas Abellana fd7c510ce4 Add grouped_slice helper and use it.
issue3516
review10301002
2014-07-17 18:53:05 +02:00
Cédric Krier 38360583d2 Fix SQLite Numeric domain value for None
issue3930
review11281002
2014-06-13 19:11:44 +02:00
Cédric Krier 8155f13880 Set also _parent_ field in fields.depends
issue3978
review8441002
2014-06-09 18:07:44 +02:00
Cédric Krier 814b1d2ea5 Ensure ids clause is a list for concatenation
issue3949
review11281006
2014-06-08 00:18:55 +02:00
Nicolas Évrard d83fc99f35 Allow to register different type for json/xmlrpc encoding/decoding
issue3839
review5021003
2014-06-06 12:57:27 +02:00
Cédric Krier 360d1232fa Fix joins when ordering on ir.model.field
issue3910
review10311002
2014-05-17 18:41:20 +02:00
Cédric Krier 169b41e0b3 Allow to set a tuple model, dictionary for Reference field
issue3902
review9321002
2014-05-10 20:28:58 +02:00
Cédric Krier c08724f2ef Don't stop setting Many2Many if first values is empty 2014-04-11 15:41:55 +02:00
Cédric Krier 6d1be2574b Allow to customize field column and fix numeric search for SQLite
issue3733
issue3648
review4421002
2014-03-18 19:59:04 +01:00
Cédric Krier 5082be317a Fix wrong Concat in the translation join for ir.model 2014-03-18 16:24:23 +01:00
Cédric Krier 2680d1b746 Use a sequence of ids, values to set fields
review3331003
2014-02-24 19:15:57 +01:00
Cédric Krier 8a95fa6d5b No good reason to make get_translation_join private
review3241003
2014-02-06 22:59:42 +01:00
Cédric Krier bc6acd08ee Drop support of Python 2.6
review2691002
2014-01-31 00:02:03 +01:00
Cédric Krier 905343c900 Add fields.depends decorator
issue3487
review2301002
2014-01-26 14:27:24 +01:00
Cédric Krier 472b7e5d57 Rationalize relation actions
* Remove relation field actions:
    - delete_all
    - unlink_all
    - set
* Rename relation field action unlink into remove

issue3457
review2271002
2013-12-20 12:32:07 +01:00
Cédric Krier f52fe8e45f Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:44:01 +01:00
Laurent Defert d143acdd0a Add a 'copy' action to One2Many and Many2Many's set method
issue3341
review1271002
2013-11-19 11:04:33 +01:00
Albert Cervera i Areny a7558e4e14 Check if order_* is overriden in Many2One fields
review1091002
2013-09-25 10:53:16 +02:00
Cédric Krier b03788e6db Fix duplicate translations
- Fix unique constraint by using -1 instead of NULL for res_id
- Clean duplicate entries in po file

The unique constraint was not working when res_id was NULL because SQL consider
all of them as different.

The migration could fail if there is duplicate translation in the database. So
this query must be run until no more records are deleted:

DELETE FROM ir_translation WHERE id IN (SELECT MAX(id) FROM ir_translation GROUP BY name, res_id, lang, type, src_md5, module HAVING COUNT(1) > 1);

issue3355
review1087004
2013-09-22 14:33:39 +02: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
Nicolas Évrard 27ccf989a5 Add tests on fields.Binary
review1017002
2013-08-16 11:08:44 +02:00
Nicolas Évrard c1e77c77eb Fix binary size handling migration to Active Record
review1017002
2013-08-16 11:07:44 +02:00
Cédric Krier 2e8ec5f5df Replace SPLIT_PART by SUBSTR and POSITION
SPLIT_PART is not a standard SQL function (it is not supported by MySQL).
SUBSTR is used even if it is not standard SQL because SUBSTRING is not
supported by SQLite. This will change once we will migrate to python-sql.

review784002
2013-04-14 23:17:55 +02:00
Cédric Krier a95ae0dad9 Remove _inherits
review670002
2013-03-20 22:49:16 +01:00
Cédric Krier 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +01:00
Cédric Krier 690c066c35 Add documentation for Dict field and standardize options
review672003
2013-02-23 18:26:01 +01:00
Cédric Krier d49fb4318d Add selection_change_with on Selection and Reference fields
review587002
2013-02-05 19:06:16 +01:00
Cédric Krier fd01a724f8 Add Dict fields
review501007
2013-01-26 15:18:41 +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 0c577dd660 Improve getattr lookup in fields.Function.get
review612003
2012-12-23 22:58:13 +01:00
Cédric Krier 290791e0df Use instance in One2Many.get to re-use cache
review585007
2012-11-28 23:12:39 +01:00
Cédric Krier 10f28ebdec Set lazy loading on Reference field 2012-11-22 22:39:22 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier f5068bec10 Set default loading of Char depending on translate
review473002
2012-08-27 09:49:47 +02:00
Cédric Krier 5a0fd034cb Fix reading from cache in field one2many
issue2706
review419001
2012-07-19 09:55:09 +02:00