Commit Graph
268 Commits
Author SHA1 Message Date
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
Nicolas Évrard 30c8c41c26 Ensure dependencies of fields are also loaded on Form display
issue9630
review298641002
2021-03-11 23:34:44 +01:00
Cédric Krier 2925c971b5 Add context field of parent to on_change calls
Those fields are required to instantiate the parent fields with the proper
context.

issue10182
review359301002
2021-03-11 19:20:32 +01:00
Cédric Krier 837c2f6164 Do not switch selection value if the result is neither in the selection
issue10120
2021-03-02 08:38:10 +01:00
Cédric Krier daf1b6e5ad Add fallback to the value for missing translated selection
issue10120
review341441002
2021-03-01 23:28:52 +01:00
Cédric Krier 3592175067 Use column to order when translation value is empty
issue10094
review331871002
2021-02-20 00:58:39 +01:00
Cédric Krier fffb8efb5a Ensure to join with only one translation row
If there are multiple translations for the same record, the join will generate
result with multiple times the same id on ModelSQL.search.
As DISTINCT ON is not always supported, we must also ensure that duplicated
translations are all updated.

issue10061
review351261002
2021-02-20 00:48:50 +01:00
Cédric Krier 964fc0a74b Add help for each value to selection and multiselection
issue9649
review320021002
2021-02-14 14:28:55 +01:00
Sergi Almacellas Abellana 06346f0c76 Eager load Function field with same multiple getter
issue9561
review314201002
2020-12-06 18:34:19 +01:00
Cédric Krier a1671ab214 Forbid all white spaces except space in Char field
They can not be displayed by all clients (nor OS).
But also they can be trimmed automatically by web input which breaks comparison
against changes.

issue9248
review312681002
2020-11-05 23:58:15 +01:00