Commit Graph
277 Commits
Author SHA1 Message Date
Cédric Krier 72fd407fdb Add sql_id method to Reference field and use it for index
issue11788
review447351003
2022-10-12 08:25:20 +02:00
Cédric Krier 7892f8ae56 Use declarative index definition for ModelSQL
issue5757
review361251002
2022-10-11 00:44:51 +02:00
Cédric Krier 18bc7b6c63 Apply domain on translation value of the left join
issue11781
review413711003
2022-10-10 19:39:21 +02:00
Cédric Krier 083774d09b Redefine Field properties on Function field
In order to use the value from the simulated field, we must redefine them.

issue11759
review425791003
2022-10-09 13:21:36 +02:00
Cédric Krier c3a8be00ca Add option to remove leading and trailing white spaces from char
issue7914
review340511008
2022-09-19 21:25:55 +02:00
Cédric Krier 7dd4445f56 Allow PYSON size of fields to be None
issue11643
review411571003
2022-09-08 13:15:54 +02:00
Cédric Krier d1ea8ba864 Use fromisoformat method from datetime module
issue11637
review411551003
2022-09-08 13:10:15 +02:00
Cédric Krier 975abfd252 Use alias expression in where clause of implicit join
issue11486
2022-07-18 10:02:12 +02:00
Cédric Krier 31811487ab Add implicit join clause to subquery of where clause on Many2One
This modify the complexity of the SubPlan from O(n^2) to O(n log(n)) thanks to
the index on the primary key.

issue11486
review415121003
2022-07-18 00:18:41 +02:00
Cédric Krier 38edc41514 Ignore invalid Reference field when reading related fields
issue11484
review449081003
2022-05-19 22:02:33 +02:00
Nicolas Évrard 2bac806bbd Remove python2 compatibility code from fields.Binary
issue11467
review411111003
2022-05-06 18:18:01 +02:00
Cédric Krier ef181c33dd Negate the origin expression of Many2Many with 'not where' operator
issue11425
review403401002
2022-04-27 17:51:52 +02:00
Cédric Krier 656fdc9729 Dumps Dict values in UTF-8 instead of ASCII
This is how they are stored in the database and so we must use also the UTF-8
version when using unaccent to properly remove the accents.

issue11418
2022-04-18 19:40:01 +02:00
Cédric Krier d891753f56 Clean import 2022-04-09 00:00:16 +02:00
Cédric Krier d80325acf3 Add datetime_field, filename and digits to display_depends
issue11134
2022-04-09 00:05:27 +02:00
Cédric Krier 2f85de3b31 Import cached_property from trytond tools 2022-04-08 21:56:25 +02:00
Nicolas Évrard ccd48d320c Send only the required fields when fetching a readonly view definition
issue11134
review380081002
2022-04-08 19:07:14 +02:00
Cédric Krier 57b1e4b69d Support PYSON size for Char field
issue11315
review390241005
2022-03-26 12:00:33 +01:00
Cédric Krier 9c4d0aa334 Always return tuple for MultiSelection
issue11282
review361021002
2022-03-20 01:45:22 +01:00
Cédric Krier 655257ec2c Use dictionary as search_order on Reference field
issue11251
review387941002
2022-02-22 23:06:02 +01:00
Cédric Krier 731009e3ab Replace ilike operator by like on Reference
issue11203
review395431002
2022-02-17 00:48:06 +01:00
Cédric Krier 09c9e90506 Do not update field definition with Function field definition
issue11225
review360871002
2022-02-16 11:07:19 +01:00
Cédric Krier 2495c0cbdd Order unsorted Selection by index definition
issue11169
review387771003
2022-02-15 00:06:57 +01:00
Cédric Krier 632deb43e5 Use dictionary as domain for Reference field
issue11074
review383911002
2022-02-03 23:05:47 +01:00
Nicolas Évrard 82b6bf9f1a Do not rely on depends to select the fields to read in form view
issue11134
review389681019
2022-01-31 22:25:59 +01:00
Cédric Krier 49f6350151 Use simplified parser for get_eval_fields
Instead of using the PYSONEncoder we can just iterate over the basic JSON types
and use the pyson method to retrieve nested PYSON instances.

issue11164
review376551002
2022-01-30 13:10:57 +01:00
Cédric Krier a0bfbfa255 Follow isort formatting
issue10928
2021-12-11 17:58:45 +01:00
Cédric Krier e02c830159 Fill local cache of Function field instances with values
issue10936
review377511003
2021-11-28 13:40:30 +01:00
Cédric Krier a00d26dd3c Cache Function field getter without context in readonly transactions
issue10936
review367781002
2021-11-28 13:27:52 +01:00
Cédric Krier 6162729234 Do not order on NULL when rank column is None
It is not valid to use NULL in ORDER BY clause.

issue10947
review381411002
2021-11-19 23:56:36 +01:00
Cédric Krier a1a2e6eb70 Use JSONB to store Dict field on PostgreSQL backend
issue10858
review379371002
2021-11-08 19:27:03 +01:00
Cédric Krier 878e8747df Prevent assign SQL value to record instances
issue10413
review379441002
2021-10-28 09:00:33 +02:00
Cédric Krier 8bbecaa817 Allow to cast as date using timezone
issue10860
review372321002
2021-10-21 00:11:57 +02:00
Cédric Krier c9fd498cb6 Fall-back to target default order
issue10818
2021-10-11 08:53:21 +02:00
Cédric Krier c99e0fa7f4 Align instance caches of xxx2Many targets
issue10818
review369841002
2021-10-10 22:20:27 +02:00
Cédric Krier 66a0dcf2b5 Add stored path as alternative to MPTT
issue7177
review352501002
2021-10-03 01:14:08 +02:00
Cédric Krier 0e41c6940a Factorize the instantiation of LRUDict and LRUDictTransaction
We use default_factory to avoid create unnecessary instances. The
default_factory_with_key argument is added to LRUDict to pass the missing key
to the default_factory method. And we use an LRUDict also for the
Transaction.cache.

issue10726
review362531002
2021-09-26 22:55:52 +02:00
Cédric Krier c345b0c693 Use tuple in Dict value instead of list
issue10715
review371771002
2021-09-23 10:15:16 +02:00
Cédric Krier 9f8b847c15 Use immutable dictionary for Transaction context
issue10691
review358741002
2021-09-19 00:30:35 +02:00
Cédric Krier f8358b1229 Search by similarity only if a threshold is defined
issue10710
review363851002
2021-09-10 19:13:05 +02:00
Cédric Krier 03e2a7f2dc Avoid instantiate set
issue10660
review342911003
2021-09-02 23:56:13 +02:00
Cédric Krier fb9238b8bf Add digits mixin
issue10596
review338511002
2021-08-21 09:05:34 +02:00
Cédric Krier 0cca1c8d57 Use subquery when searching for similarity on translated Char
issue10624
review363621002
2021-08-12 18:38:15 +02:00
Cédric Krier 92d98b36ff Translate LazyString of ir.model and ir.model.field
issue10326
review321041002
2021-04-25 18:19:29 +02:00
Cédric Krier e4015d7bf3 Include records without link with negative search on xxx2many
issue10178
review345981002
2021-04-25 17:56:39 +02:00
Cédric Krier 42cb4a0f53 Set name clause on join condition instead of subquery
The name is a column from a table that is not available in the subquery.

issue10257
review346001004
2021-04-24 19:27:07 +02:00
Cédric Krier 14ccff94a0 Use order definition of xxx2Many fields
When empty it must be the order of the target and it must not be encoded as it
can not be PYSON.

issue10297
review349721004
2021-04-21 23:47:30 +02:00
Nicolas Évrard a426d9f398 Use immutable datastructures for Dict and MultiSelection fields
In case a Dict field is sent during an on_change, modification of its value
won't be detected because a shallow copy will keep its reference in the
pseudo-record

issue10105
review347541002
2021-04-12 19:39:25 +02:00
Cédric Krier 45d406e270 Add full text and similarity search
issue10023
review320601007
2021-03-21 16:21:05 +01:00
Cédric Krier 9c81cb6a4a Replace cursor fetchall by iteration over cursor
issue5817
review335831003
2021-03-21 16:09:13 +01:00