Commit Graph
17 Commits
Author SHA1 Message Date
Cédric Krier d9b4d71a11 Ensure context is correctly set when initializing Model
We make the assignation twice if any field has a context defined. This ensures
that the context will be evaluated with all initialized values when
the target records will be instantiated.

issue8586
review282041002
2019-09-09 22:41:54 +02:00
Cédric Krier 478c4e6928 Refactor fields tests
issue7085
review40051002
2018-02-02 00:04:19 +01:00
Cédric Krier 10042b9597 Improve validation of PYSON domain
Use a different strategy if we are close to one domain per record.
It will use combined multiple domain at once instead of doing one query for
almost each record validated.

issue6983
review39021002
2017-12-26 17:28:42 +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
Nicolas Évrard c3f69d1db7 Add NULLS ordering
issue5858
review27651002
2017-03-29 23:12:01 +02:00
Sergi Almacellas Abellana 828afc310d Add sequence_ordered
issue5105
review25561002
2016-09-13 14:01:17 +02:00
Sergi Almacellas Abellana db3ded5b90 Add test on ModelStorage.save with records with different context
issue5753
review22201002
2016-07-29 10:31:14 +02:00
Cédric Krier 8d8c489c83 Reset context when reading fields for browsing
The method set_context does not replace the context but just update it.
So we could have leak of the surrounding into the read context.

issue5614
review25161002
2016-06-14 16:00:15 +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 23c45fc511 Group records when calling set method for field with the same value
We need to loop to compare the values instead of using a dictionary because the
values are not necessary hashable. But it is still an improvement compared to
calling the set method for each record.

issue5398
review19111002
2016-03-19 12:07:27 +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 c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier 3f8d858c01 Add UnionMixin
issue3906
review8341002
2014-06-08 00:26:57 +02:00
Cédric Krier 1a8c5aae1c Fix check timestamp and add unittest
review1087003
2013-09-22 14:28:46 +02:00
Cédric Krier ab74123eb2 Merge test/ into tests/
review1060002
2013-09-16 11:38:11 +02:00
Cédric Krier 20741b613d Improve unittests to run trytond from tests
Use sqlite as default backend
Add skiptest attribute to data tag
Add option to test_tryton to run tests from all modules
2010-03-04 14:02:27 +01:00
Cédric Krier 220b6da07f Add ModelSingleton 2009-09-01 14:43:49 +02:00