Commit Graph
993 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 7e4150ca3f Read at most cache size or IN_MAX records from the database
issue11468
review427111003
2022-05-10 15:24:37 +02:00
Cédric Krier a5ac7ba55c Use singleton for TableHandler
issue11301
review366861002
2022-05-07 11:35:14 +02:00
Nicolas Évrard 2bac806bbd Remove python2 compatibility code from fields.Binary
issue11467
review411111003
2022-05-06 18:18:01 +02:00
Nicolas Évrard 769c997024 Remove user login and user preferences cache
The user login cache could result in an error when using trytond in a
multiprocess environment due to a delay in the broadcast of the cache
invalidation.

The user preferences cache was there only to set the context when validating
the records but it is useless since the context is now set from the
transaction.

review401251002
issue11430
2022-04-29 17:14:27 +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 38efaaf887 Escape wildcard in tree separator for name domain
issue11321
review356281002
2022-04-16 11:25:38 +02:00
Cédric Krier 4ecc0c4c71 Add notification message
issue11065
review367951004
2022-04-11 23:41:21 +02:00
Cédric Krier fcbe0df011 Add validate_fields to ModelStorage
issue11303
review386191002
2022-04-11 23:24:21 +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 860fb136e0 Update rec_name of tree with on_change
issue11021
review403131002
2022-04-08 09:55:23 +02:00
Cédric Krier 1c55eee094 Manage DatabaseDataError in ModelSQL
issue11314
review399111003
2022-04-04 00:35:38 +02:00
Cédric Krier 60a6d5f390 Do not import empty One2Many data
issue11308
review388081002
2022-04-04 00:11:26 +02:00
Cédric Krier 7c8e01c08d Prevent to create and delete singleton
issue1639
review378481002
2022-03-26 13:03:39 +01: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 33d19bd8f5 Backed out changeset d645aee76ab0
issue11262
2022-03-20 01:32:04 +01:00
Cédric Krier 56c18b8a1c Protect against XML vulnerabilities
issue11219
issue11244
2022-03-01 19:07:56 +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 33b9833b65 Recompute path if part of the old path has already been updated
This happens when multiple parent are modified at the same time.
In such case the new path previously computed is no more correct.

issue11266
review368141002
2022-02-22 22:57:03 +01:00
Cédric Krier dd58ab653e Fill Value of MultiValue with the other default values
issue11077
review370761002
2022-02-21 00:52:10 +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 a39dec543c Do not get domain from empty reference field
issue11074
2022-02-03 23:21:03 +01:00
Cédric Krier 10d277f001 Add optional column on tree view
issue10989
review374321002
2022-02-03 23:13:28 +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 fd0709aa71 Add implicitely write_date to read columns only when reading already other columns
issue10359
review361791002
2022-02-03 15:04:03 +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 5f34224215 Include model, field and column in import data error message
issue11132
review381701002
2022-01-30 12:58:51 +01:00
Cédric Krier 19ad886d45 Add limit to search count
issue10967
review389301002
2022-01-30 01:42:23 +01:00
Cédric Krier 4a023ef216 Add RPC view_get method to View
This allows to extend the inherit mechanism of the view and support inherit for
the board view.
Also the inherit is now applied to all element found by the xpath.

issue11107
issue11108
review389601002
2022-01-23 13:32:59 +01:00
Cédric Krier 7c822ccfda Use cached data also to instantiate records with context field
If all the context fields are already in the cache we can use them without
having to call read and avoid a SQL query.

issue11096
review387631002
2022-01-23 10:23:50 +01:00
Cédric Krier 2563aed9b0 Check read access on parent field of child/parent operators
The 4th element of the clause is the parent field for the child_of/parent_of
operators, so it must be used to check access as related field.
Also we must remove the 4th element when checking related domain.

issue11115
review391371002
2022-01-11 23:07:45 +01:00
Cédric Krier 51a08fb809 Set view_id in the context when calling view_attributes
issue11091
review364531002
2022-01-04 22:30:41 +01:00
Cédric Krier a0bfbfa255 Follow isort formatting
issue10928
2021-12-11 17:58:45 +01:00
Cédric Krier 7d879abef6 Use same context as clients to evaluate PYSON
issue10963
review372581002
2021-11-28 13:45:54 +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 1250c434af Do not store in global cache Function field
issue10936
review364331002
2021-11-14 23:54:52 +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 1b3690eeb7 Do not set empty avatar when generating one
As the method is called on write and is also calling write via save, we must
ensure to save only when an avatar is filled to break the loop.

issue10914
review363041002
2021-10-30 02:25:37 +02:00
Cédric Krier a97e769ad3 Evaluate invalid domain if there are many fields
We must find the field that is invalid instead of using the first one with a
domain constraint.

issue10418
review360371002
2021-10-30 02:20:23 +02:00
Cédric Krier 878e8747df Prevent assign SQL value to record instances
issue10413
review379441002
2021-10-28 09:00:33 +02:00