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
a913a10d0f
Add only fields define in context for read
...
instead of all the depend fields.
issue4401
review8111002
2015-04-11 13:35:28 -04:00
Cédric Krier
c144f8c349
Fix most flake8 errors
...
review8771002
2014-12-02 12:54:01 +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
16aa948e3d
Add support for domain_<field name> method
...
issue4126
review6501002
2014-09-13 15:14:56 +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
360d1232fa
Fix joins when ordering on ir.model.field
...
issue3910
review10311002
2014-05-17 18:41:20 +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
8a95fa6d5b
No good reason to make get_translation_join private
...
review3241003
2014-02-06 22:59:42 +01:00
Cédric Krier
905343c900
Add fields.depends decorator
...
issue3487
review2301002
2014-01-26 14:27:24 +01: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
Cédric Krier
5e01f5c068
Fix flake8
2013-02-27 22:50:31 +01:00
Cédric Krier
0fe1b93864
Active Record
2012-09-24 22:16:53 +02:00
Cédric Krier
6858187fc8
Add dynamic size limit on the One2Many, Many2Many and Char
...
review396001
2012-06-20 18:12:40 +02:00
Cédric Krier
ee3be37a36
Fix pep8 and pyflakes
2012-04-01 23:08:15 +02:00
Cédric Krier
ad17611e3e
Remove change_default on fields
...
issue2249
review211002
2011-12-22 22:03:15 +01:00
Cédric Krier
cc48eb8532
New search widget
...
- Change select on fields into Boolean
- Change format of search_value on ir.action.act_window
review95002
2011-10-03 09:45:21 +02:00
Nicolas Évrard
470c1f9d5d
Correctly compute if argument is a condition
...
review100001
2011-09-06 12:00:15 +02:00
Cédric Krier
c259187ab7
Add loading attribute on fields
2011-01-07 10:58:43 +01:00
Cédric Krier
cd7ce92be9
Remove priority attribute on fields
2011-01-03 12:39:29 +01:00
Cédric Krier
4513a8f8b9
Documentation refactoring
2010-05-08 14:22:26 +02:00
Cédric Krier
fef5ee826c
Enforce that every fields have a non-empty string
2010-03-25 12:52:05 +01:00
Cédric Krier
84b0c7ebbf
Allow to have boolean as states value
2010-03-17 17:54:16 +01:00
Cédric Krier
2e2227d795
Improve search on translatable fields for issue1442
2010-03-17 11:50:52 +01:00
Cédric Krier
5d229f6fad
Move OPERATORS into const to be able to reload modules
2010-01-22 11:44:31 +01:00
Cédric Krier
847fb72e90
Add PySON to replace python string evaluation on client side
2010-01-20 10:55:19 +01:00
Gour
486d46a405
fix typos for documentation (Model chapter)
2009-09-13 15:37:11 +02:00
Cédric Krier
39457b4bf3
Doesn't allow anymore strings as domain on fields
...
It is strings inside the domain list that will be evaluated
2009-06-23 18:48:48 +02:00
Cédric Krier
b652a1b69a
Improve docstring of domain on Field
2009-05-22 18:33:36 +02:00
Cédric Krier
65d0a9494b
Update model documentation.
...
Use autodoc in sphinx
Add missing and fix docstring
2009-03-01 13:37:31 +01:00
Cédric Krier
e28edc4d99
Add model.fields
...
Use better naming of field attributes
2009-02-03 18:58:25 +01:00