Commit Graph
5851 Commits
Author SHA1 Message Date
Sebastien Marie 036af9f47b Do not add id_ to checked wizard ids if not set
issue9491
review321961002
2020-08-18 09:47:23 +02:00
Cédric Krier 0b85f26f78 Add cron task to clean old queue tasks
issue9502
review306141002
2020-08-11 22:03:20 +02:00
Cédric Krier 70648c3007 Add resource relate on notification log
We store on the log the record as resource but also the notification to get
the email subject.

issue9457
review307901002
2020-08-11 22:00:26 +02:00
Cédric Krier bc1f29e6c9 Use the ids order to fill cache with read data
The shared cache is designed for loop usage so we must ensure that we fill the
LRU dictionary in the same order as the loop will request attributes.
So we must order the result of the read because the API does not return data in
the same order as the list of ids.

issue9518
review318041002
2020-08-10 23:24:02 +02:00
Cédric Krier 9202f337e3 Add option to run cron once
issue9475
review307931002
2020-07-25 08:03:02 +02:00
Cédric Krier 15671394ed Use autocommit transaction to reset session
This avoids concurrency error if other requests try also to reset the session.

issue9478
review327621002
2020-07-25 07:59:07 +02:00
Cédric Krier 201258441a Add defaults option to route
issue9472
review298191002
2020-07-23 00:05:35 +02:00
Cédric Krier e11a23deb2 Rationalize import path
We use absolute path when imported module is from a different context.
And we remove unnecessary __all__ definition.

issue9466
review323591002
2020-07-21 14:38:36 +02:00
Cédric Krier f913df040c Add escape_wildcard in tools
issue9463
review306021002
2020-07-21 14:37:01 +02:00
Cédric Krier a9241ac345 Add option to ensure emails are sent
issue9456
review298071002
2020-07-21 14:33:49 +02:00
Cédric Krier 5ea5007bfc Allow keyword action for all models
issue9450
review325681002
2020-07-21 14:32:09 +02:00
Cédric Krier f376687b5a Use readonly connection attribute
It is not allowed to Call SET TRANSACTION in an AUTOCOMMIT transaction.
It is better to set 'readonly' attribute when available and not set the
transaction in readonly when autocommit is set.

issue9477
review294171002
2020-07-21 14:29:14 +02:00
Cédric Krier 46995607e2 Ensure values can be sorted
The values may contain None which is not orderable so we insert a third
argument before the value to prevent to compare None value against others.

issue9381
review303881005
2020-07-21 00:36:40 +02:00
Cédric Krier 414a379a51 Explicitly define action values send to clients
This avoid to forget to exclude new field added to action.

issue9445
review305961002
2020-07-13 21:21:20 +02:00
Cédric Krier bbe845aca5 Remove link to ssl wrap_socket in doc
issue9441
review321711002
2020-07-13 21:10:44 +02:00
Cédric Krier d882e84c74 Delete read data after having instantiated all targets
Some read value may be needed to instantiate other records if it is used in the
context.
Also the test to fill fields dictionary was always false as it tested the field
instance instead of the name.

issue9380
review298171002
2020-07-13 20:55:53 +02:00
David Harper 26b87dd919 Do not refer to activated modules as installed
issue9395
review311721004
2020-07-09 10:33:42 +01:00
Cédric Krier e97f4e0526 Allow configuration of default colors for graph and calendar
issue9435
review300011002
2020-07-09 00:34:01 +02:00
Cédric Krier 6f9015b416 Normalize wizard message views
We use the proper icon between info, question, warning and error.
We remove the exclamation mark in info messages.

issue9429
review301831002
2020-07-09 00:21:48 +02:00
Cédric Krier 060a9da6bf Add model, record and records attribute on Wizard
issue9421
review309861012
2020-07-07 23:56:10 +02:00
Cédric Krier 5ca5b373ae Prevent import backend when importing module scripts
The configuration is loaded by the script, we must delay the import of backend
until then.

issue9446
review321741002
2020-07-04 23:38:22 +02:00
Cédric Krier 158bd2f8f6 Make reschedule delay linear
An exponential factor growths too fast and so reschedule too much in the
future.

issue9428
review315631002
2020-06-27 00:54:03 +02:00
Cédric Krier 0bb382d1dc Do not set slots on ShowViewStart
The model is generic and must accept that Wizard.execute set any field on it.

issue9425
review301821003
2020-06-27 00:52:49 +02:00
Cédric Krier bca6813e64 Add inherited name or type to the view record name
This reduces the ambiguity of using only the model.

issue9424
review299961012
2020-06-24 23:02:24 +02:00
Cédric Krier 066b8f8491 Returns None when evaluating domain with None
We implement the same behavior as SQL with NULL which always returns NULL
except for IS operator. So the evaluation has the same result as the search.

issue8615
review290281002
2020-06-19 00:18:04 +02:00
Sergi Almacellas Abellana d3f7ea5889 Do not write to existing targets on xxx2Many add
issue9194
review313581011
2020-06-17 13:55:00 +02:00
Cédric Krier d02f8acae2 Do not rely on keyword arguments order in LRUDict update test
The insertion order in dictionary is only preserved since Python 3.7.

issue9413
2020-06-17 01:08:22 +02:00
Cédric Krier c6503c1a93 Add cached_property in tools
issue9277
review299951002
2020-06-17 00:33:30 +02:00
Cédric Krier 4a1f2c938b Use different hash for records without id
In order to have store them efficiently in dictionary, we generate a different
hash for each unsaved record by using the instance id.

issue9240
review295421002
2020-06-17 00:30:53 +02:00
Cédric Krier 23bac3a173 Wait cache sync after clearing cache in test
The test relies on the cache being cleared before setting a value from the old
transaction. So we must wait for the synchronisation to happen when channel is
used.

issue9413
review327461011
2020-06-17 00:25:57 +02:00
Cédric Krier 0601bf63cf Delete cache content instead of setting empty dictionary
Since issue9369, the cache uses a dedicated class instead of dictionary.
So to clear the cache, we must delete the key.
2020-06-15 14:13:29 +02:00
Cédric Krier b3f8d125f9 Use custom class to store record data
By using a class with slots instead of standard dict, we can reduce a lot the
memory usage to store the record data in the caches and values.
Also we can rely on the data in the cache to exist only for real field which
can be used to create a fast path in ModelStorage.__getattr__.
As now storing data in the cache has no extra cost, we can store data from the
transactional cache in the local. This allow also to have a shorter path in
ModelStorage.__getattr__.
For more memory efficiency, we remove the record from the cache instead of
clearing them. It was better to clear a dict but a record is less expensive to
re-instantiate than clearing.

issue9369
issue9225
review297861002
2020-06-13 09:48:03 +02:00
Cédric Krier 386347e46f Add test for relation with PYSON domain
issue9383
review317531002
2020-06-12 12:37:50 +02:00
Cédric Krier 3242096509 Evaluate PYSON domain with the origin record
When a relation domain is not valid, the domain used to set on the exception
must be evaluated with the origin record and not the invalid target record.
We take the first origin record as any of the passed record will generate the
same domain per design.

issue9383
review317531002
2020-06-12 12:36:47 +02:00
Cédric Krier 547bd561bf Remove sphinx configuration
The HTML can be generated with sphinx-build -C . _build/html

issue9370
review295661002
2020-06-06 14:04:01 +02:00
Cédric Krier cdb19908ee Wait Pool.init threads before serving
In WSGI server that forks the main process, not waiting the end of threads
creates a dead lock.

issue9377
review311651002
2020-06-06 13:58:32 +02:00
David Harper bc01b3ed99 Add icon license file
issue9152
review317481002
2020-06-01 10:08:02 +01:00
Cédric Krier eed1f5fe58 Check price_decimal configuration
The price_decimal stored in ir.configuration is checked against the current
configuration value. We do not allow to start serving a database for which the
values are different as it may be due to a misconfiguration which can lead to
data corruption.

issue9324
review317381002
2020-05-28 18:22:45 +02:00
Cédric Krier cf1cdf1c98 Ignore link of action that user can not read
We must also prevent the client to read link action for which the user has not
read access.

issue9364
review305661002
2020-05-28 18:17:40 +02:00
Nicolas Évrard cfb307238e Add support for properties to fields.depends
issue9313
review319451002
2020-05-25 09:39:17 +02:00
Sergi Almacellas Abellana 70ca04ee3d Ensure User application key is different on bunch creation
issue9306
review321301002
2020-05-22 11:27:27 +02:00
Sergi Almacellas Abellana c2ca4704db Add sleep and logging on run_task without worker
issue9325
review293701002
2020-05-22 11:25:01 +02:00
David Harper 67acdddc3a Allow authentication methods to be combined
issue9303
review291621002
2020-05-21 09:06:10 +02:00
Cédric Krier 163f99ff65 Add context to export URL
issue9304
review317361002
2020-05-19 19:36:09 +02:00
Cédric Krier 7521bfd8df Test icons of each module
This ensures that the path is valid.

issue9291
review315431002
2020-05-10 12:02:59 +02:00
Cédric Krier 8996bd6f56 Increase version number 2020-05-04 12:01:52 +02:00
Cédric Krier ff06849df2 Add tag 5.6.0 [skip ci] 2020-05-04 12:01:34 +02:00
Cédric Krier 75075aa8f4 Prepare release 5.6.0 [skip ci] 2020-05-04 12:01:34 +02:00
Cédric Krier fc66c17eb0 Call getter function when accessing Function field
If the record is unsaved and the getter is based on on_change_with, we can call
the getter to compute the value.
This value must not be stored in the cache as it may change prior to saving.

issue4193
issue9263
review317291002
2020-05-03 14:34:44 +02:00
Cédric Krier ec4a8e9a90 Update translations 2020-05-02 10:29:26 +02:00