Commit Graph
5866 Commits
Author SHA1 Message Date
Cédric Krier 82e64bf66a Send client email via server
issue9449
review292001002
2020-09-17 17:18:02 +02:00
Cédric Krier ab4bcc470c Test Lang.format
issue9585
review306331002
2020-09-16 23:26:09 +02:00
Cédric Krier c2aee769f2 Assign seps variable of Lang.format before using it
issue9585
review306331002
2020-09-16 23:25:48 +02:00
José Salvador 2a0fdf407e Disable explicitly CRITICAL logging level in test
The default value has been only added in Python 3.7.

issue9597
review326091002
2020-09-16 22:54:38 +02:00
Cédric Krier d1db3bba30 Queue trigger action only when there are records
issue9579
review315901002
2020-09-12 18:33:30 +02:00
Cédric Krier 54fc9d0805 Disable logging when running tests
issue9545
review294331002
2020-09-12 18:26:41 +02:00
Cédric Krier 2f19e94033 Register mixins to generic Report class
issue9531
review300261002
2020-09-12 18:25:14 +02:00
Cédric Krier d3494d767c Support MsgDirective and cache template for report
We add the Translator directives to the template so we can use the i18n
extension on HTML report.
We also cache in memory the parsed template and avoid to write it in temp
directory for the loader.

issue9511
issue6489
review321891002
2020-09-12 16:35:52 +02:00
Cédric Krier 2df53593f0 Count active session instead of only fresh one
issue9580
review325991002
2020-09-12 10:00:03 +02:00
Cédric Krier 28356c0b54 Do not reuse browse list of modules once some have been deleted
The browse list keep a reference to the deleted modules, so a read error
may be raised when accessing an attribute of any record of the list.

issue9567
review318151002
2020-09-09 23:36:33 +02:00
Cédric Krier a22aae46de Add debug logging when exception happens in dispatch request
issue9526
review310201002
2020-09-05 23:40:29 +02:00
Cédric Krier be7edef2ef Support PYSON comparison of date and datetime
issue4879
review270061002
2020-09-05 22:59:38 +02:00
Cédric Krier 642bd01520 Modify a copy of the context when pushing into the queue
issue9549
review327901002
2020-08-29 18:26:14 +02:00
Cédric Krier 261c7b0a52 Do not set transaction as readonly with psycopg2cffi
issue9546
review294341002
2020-08-29 18:23:26 +02:00
Cédric Krier db6cc1324d Do not set WWW-Authenticate on XMLHttpRequest
Client using XMLHttpRequest should manage themselves the authentication.
So by not setting the header, we prevent the browser to raise an authentication
popup.

issue9535
review290791002
2020-08-29 18:21:01 +02:00
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