Cédric Krier
e118cb894a
Apply Exclude where clause when searching other records
...
When we simulate the Exclude constraints, we must apply the where clause also
to existing records.
issue8954
review284651002
2020-01-13 23:58:14 +01:00
Nicolas Évrard
8fb13634ea
Use direct access to backend classes
...
issue8836
review258421002
2019-12-06 17:33:47 +01:00
Cédric Krier
b8af68cf59
Do not check timestamp when it is None
...
issue8779
review268321002
2019-11-05 10:33:25 +01:00
Cédric Krier
34678d2be6
Backed out changeset f08b9ce07a7b
2019-11-04 16:05:28 +01:00
Cédric Krier
65650004c9
Update release number
2019-11-04 16:01:28 +01:00
Cédric Krier
7729badb30
Cast timestamp epoch into FLOAT to avoid rounding
...
On PostgreSQL-12, the epoch FLOAT is now 6 digits but rounded to 5 digits when
cast into NUMERIC.
issue8779
review264501002
2019-11-01 23:04:50 +01:00
Cédric Krier
ccfd866021
Always use search method on translations
...
This ensure to have always the same order when selecting the record out of many
duplicates (which can happen as there is no unique constraint
since r 426276806f60).
issue8705
review260271002
2019-10-16 21:31:25 +02:00
Cédric Krier
d782949f5a
Add tests for translation in ModelSQL
...
issue8632
review280081002
2019-09-17 00:05:09 +02:00
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
dd26e03001
Test 'id' not removed from read result when in context field
...
issue8470
review263841002
2019-07-08 21:31:26 +02:00
Cédric Krier
b34cac78d5
Allow to lock records for update
...
issue8012
review45901002
2019-01-30 09:45:59 +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
d2a461390a
Remove support for Python 2.7
...
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier
b3ca13748b
Add Exclude constraint
...
issue1422
review44061002
2018-03-19 16:57:49 +01:00
Cédric Krier
f911f48ed4
Delete translations only when model has translatable field
...
The call to Translation.delete_ids has a cost as it does search queries. So it
is better to not call it if we already know that there is nothing to delete.
issue7118
review37981003
2018-02-11 14:59:58 +01:00
Cédric Krier
478c4e6928
Refactor fields tests
...
issue7085
review40051002
2018-02-02 00:04:19 +01:00
Cédric Krier
b32d158d10
Remove MySQL backend
...
issue7017
review41771002
2018-01-24 20:12:42 +01:00
Nicolas Évrard
c3f69d1db7
Add NULLS ordering
...
issue5858
review27651002
2017-03-29 23:12:01 +02:00
Cédric Krier
21164f52b0
Use original transaction to check created/deleted records in __raise_integrity_error
...
The method is often called under a new transaction so the created/deleted
records properties are cleared which makes it raises the wrong message if the
foreign key was created during the same transaction.
issue6038
review29781002
2016-11-28 00:01:51 +01:00
Nicolas Évrard
ccbb43cb1d
Use activate instead of install for module activation
...
issue1456
review28931002
2016-10-20 12:51:56 +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
Nicolas Évrard
2fef479575
Follow PEP-0249 for Transaction and backends
...
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier
da1be07832
Make TestCase create and drop its database
...
and add with_transaction decorator.
issue5263
review20711002
2016-02-06 19:10:35 +01:00
Cédric Krier
56e040dd31
backend.name is a function since changeset 01399128964f
2014-09-07 00:27: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
e64956cffe
Use unittest skipIf
...
review9491002
2014-07-20 12:48:56 +02:00
Cédric Krier
e60274bd27
Fix MySQL tests
...
- Force UTC timezone on MySQL connection
- Add 1s sleep to test check timestamp
review2801002
2014-01-21 21:12:55 +01:00
Cédric Krier
a6ffa18908
Add run-tests script and cleanup tests
...
issue2121
issue2420
review2491002
2014-01-12 19:58:22 +01:00
Cédric Krier
6f179949ed
Commit cursor in timestamp unittest
...
cursor must be committed between each changes otherwise NOW() returns always
the same timestamp.
2013-09-23 00:00:51 +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
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
d7611e22e7
Remove unittest.skipIf decorator because it is only in >= 2.7
2012-10-10 09:31:53 +02:00
Pierre-Louis Bonicoli
4e4fe87dfa
Fix message when a required field is missing
...
issue2657
review399002
2012-10-09 11:08:56 +02:00