Cédric Krier
0fbf5cecd2
Add cache management on RPC
...
issue8233
review257231002
2019-04-08 10:10:40 +02:00
Cédric Krier
10e31bc311
Add Model.__names__ to retrieve model and field names
...
issue8159
review72431002
2019-03-15 12:27:44 +01:00
Cédric Krier
98bb26a386
Move field definition from Model to Field
...
issue8037
review74441002
2019-02-13 10:37:40 +01:00
Cédric Krier
1738a4ec35
Add ir.message and use custom exceptions
...
issue3672
review35291002
2018-12-29 14:19:08 +01:00
Cédric Krier
d1bb790cb8
New API to read related fields
...
issue7888
review58431002
2018-12-21 23:41:56 +01:00
Cédric Krier
e4e7ae740d
Disable sortable and searchable on ModelView only
...
Those feature depends on the Model having a search method.
issue7878
review56491002
2018-12-17 23:03:19 +01:00
Cédric Krier
81375e0d45
Use callable instead of instance of collections.Callable
...
issue7666
review50571002
2018-09-11 00:19:52 +02:00
Cédric Krier
c3d2be19f5
Add support of timestamp field on client
...
issue6463
review50521002
2018-08-01 11:37:09 +02:00
Cédric Krier
ae06a8bca2
Add transactional queue and workers
...
issue7406
review45461002
2018-07-27 09:32:28 +02:00
Cédric Krier
d2a461390a
Remove support for Python 2.7
...
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Nicolas Évrard
ff5b79819b
Add support for search_* attributes on relational fields
...
issue6081
review25871002
2018-03-21 17:59:55 +01:00
Cédric Krier
f7c1de84c4
Support instantiate model with _parent_ of _parent_
...
This is a valid depends value for a field but the __init__ method lose the
second _parent_ once it has been instantiated a first time.
Setting _parent_ value must be done recursively.
issue6441
review40261002
2017-04-19 10:31:45 +02:00
Cédric Krier
a908e8cc74
Add MultiValueMixin and ValueMixin and remove Propery
...
issue2349
review23351002
2017-04-01 00:24:55 +02:00
Sergi Almacellas Abellana
95e000c9e8
Add filter to xxx2Many fields
...
issue4005
review32001002
2017-03-30 09:40:41 +02:00
Cédric Krier
f6deed5941
Allow to use domain_<field name> method with Function fields
...
issue6113
review26961003
2016-12-21 23:08:30 +01:00
Cédric Krier
8b99a62f10
Use 'default_rec_name' context key in Model.default_get
...
This allow the client to set searched value as default rec_name when the user
choose to create the record.
issue4136
review22131002
2016-08-04 23:54:50 +02:00
Nicolas Évrard
33224eeaa3
Check self.id against None before comparing to 0
...
issue5590
review25111002
2016-06-03 13:01:39 +02:00
Cédric Krier
9b94696b05
Speed up instantiation of Models
...
Pass as much possible, pre-computed parameters to __init__ to move their
computation outside the loop.
issue5294
review20721002
2016-03-15 19:01:47 +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
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
2c31955934
Make Property field on Many2One not searchable
...
issue4673
review14171002
2015-03-27 14:59:57 +01:00
Cédric Krier
0991a552de
Add TimeDelta field
...
And remove float_time widget.
issue4026
review5911002
2015-02-09 22:58:56 +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
c144f8c349
Fix most flake8 errors
...
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier
ab3a4692ee
Don't compare record values
...
changeset 8e8f1a801098 introduced a equality comparison of records without id
using the values. This prevents to store in a dictonary different instances
having by chance the same values. So it seems better to consider only as equal
the same instances without id.
issue4306
review10621002
2014-10-31 10:54:30 +01:00
Cédric Krier
fee97ca399
New API for on_change
...
Modify the instance instead of returning a dictionary.
issue4203
review8581002
2014-10-29 20:38:17 +01:00
Cédric Krier
0602387444
Keep fields.depends over multiple setup calls
...
Since changeset 690d629e0050, the field is always an original copy so it loose
the depends set on previous setup calls. The depends should be comptute all
over the mro.
issue4200
review13531002
2014-09-30 09:37:26 +02:00
Cédric Krier
e740b5f432
Remove on_change call from default_get
...
The on_change call doesn't work for xxx2many fields, so it is moved on the
client side where it is properly managed.
issue3923
review6301002
2014-06-08 00:33:31 +02:00
Nicolas Évrard
f7133b8670
Use total_ordering
...
issue3884
review8291003
2014-06-06 13:26:44 +02:00
Cédric Krier
22899c33e2
Set relation_field of one2many only when exists
...
The client use this value if it exists for string concatenation, so having None
fails.
2014-05-09 14:52:30 +02:00
Cédric Krier
5c00bf48bf
Set relation_field only if there is no ambiguity
...
issue3899
review6271002
2014-05-09 14:37:30 +02:00
Cédric Krier
a0093e8899
Copy the original field definition
...
To prevent side-affect with mutable attributes.
issue3814
review4821002
2014-05-06 22:42:42 +02:00
Cédric Krier
f72b983c0f
Check relation access in fields_get and for default fields in read
...
issue3750
review4261002
2014-03-15 11:01:14 +01:00
Cédric Krier
a130816cbd
Add support of domain for non-relation field
...
issue3743
review4181002
2014-03-15 10:44:45 +01:00
Cédric Krier
729aaa8a00
Better guess "selection_change_with" attribute
...
Testing on the instance for Selection field is not enough because some field
selection could come from a Function field.
So it is better to use a duck typing style in this case.
issue3649
review3451002
2014-02-14 00:04:31 +01:00
Cédric Krier
2e7c28d348
Add with_on_change switch to default_get
...
default_get should not call on_change when called in create because it could
modify values set by the caller.
issue3602
review2781002
2014-01-26 21:57:15 +01:00
Cédric Krier
905343c900
Add fields.depends decorator
...
issue3487
review2301002
2014-01-26 14:27:24 +01:00
Cédric Krier
3f5dba2235
Add relation_field for many2one
...
issue3173
review1201002
2013-10-27 19:31:36 +01: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
58c81ee328
Add rich comparison methods on Model
...
review1027002
2013-08-21 18:02:30 +02:00
Cédric Krier
56fc82d954
Set correct instanciate for selection_change_with
...
issue3223
review886002
2013-06-01 00:10:30 +02:00
Cédric Krier
8710f2fd99
Fix Pool.setup to re-allow extra_depends behavior
...
review898002
2013-05-27 18:47:00 +02:00
Jean CAVALLO
25fea393a8
Fix model.fields_get for Function(Dict) fields
...
issue3147
review792002
2013-04-16 15:58:03 +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
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
Cédric Krier
8e248e9922
Fix wrong access check read -> write
...
Typo introduced in changeset cc8493263998
2013-01-21 12:46:24 +01:00
Cédric Krier
cf0636e095
Add ModelFieldAccess.get_access
...
review598002
2012-11-28 22:42:51 +01:00
Cédric Krier
b57f044ba8
Fix pep8 and pyflakes
2012-10-19 12:29:05 +02:00