Commit Graph
10 Commits
Author SHA1 Message Date
Cédric Krier 4154b93a01 Prevent assign unknown attributes on Model
by adding __slots__ on PoolMeta

issue8567
review254091002
2019-09-07 23:45:08 +02:00
Cédric Krier d221e36653 Improve ModelStorage.copy
* Allow callable in copy default
* Support dotted notation in copy default
* Use setdefault in copy
* Copy default when needed
* Do not set default state in copy
* Use callable and dotted notation in copy default

issue5576
issue7648
review72291002
2018-09-01 01:02:04 +02:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier fe674cef55 Enforce unique list of records on method calls
An option is added on RPC definition to enforce uniqueness of records
instantiated. The key methods ModeView.button and Workflow.transition have an
assert to detect error in development code.

issue6184
review36411002
2017-07-16 23:49:15 +02:00
Cédric Krier 33b240736c Re-introduce iteration over keys
It was removed in changeset 808e05f4898c but indeed we need a copy list of the
keys because the dictionary is modified during the iteration.
2016-03-19 15:25:49 +01:00
Cédric Krier 510931a8ab Use OrderedDict in Workflow.transition for cache alignment
This allows to loop over the key in the same order as the list of records.
Also avoid to use .keys() when iterating on dict because it generate a useless
list on Python2.
Use list on dict instead of .keys() to avoid one extra call on Python3 because
.key() return an iterator.

issue5396
review20061002
2016-03-19 11:59:52 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier 49aabfc610 Allow state change inside Workflow.transition
review361001
2012-06-08 22:35:04 +02:00
Cédric Krier be0e5c54a9 Simplify workflow engine
- Remove workflow module
- Add ir.model.button for access rights

review256001
2012-03-25 00:15:17 +01:00