Commit Graph
5146 Commits
Author SHA1 Message Date
Nicolas Évrard f2a60e1127 Set the right license in the classifiers
review9191003
2017-02-13 16:33:42 +01:00
Cédric Krier 2569f4dd52 Allow Many2One on ModelSQL to target ModelStorage
issue6237
review26081002
2017-02-11 19:08:52 +01:00
Cédric Krier 631c9782a3 Use proper timezone value for MySQL
issue6224
review32021002
2017-02-11 19:05:18 +01:00
Cédric Krier 42e5bca015 Disable transaction cache when initialize database from command line
issue6216
review30001002
2017-02-10 11:05:02 +01:00
Daniel Möller d9b37b2547 Change logging into warnings in __init__.py
The logging is not yet configured when __init__.py is run.

issue5455
review28921002
2017-02-08 11:10:52 +01:00
Cédric Krier 601b8218e3 Do not log, as error, exception in cursor execute
There are expected exceptions that should not be logged and the others should
be logged by the caller.

issue6211
review26101002
2017-02-08 10:22:40 +01:00
Sergi Almacellas Abellana 5278085a98 Disable transaction cache for database list
issue6216
review31071002
2017-02-07 17:06:39 +01:00
Cédric Krier d8e7a041c5 Disable transaction cache also for database cache restore
issue6216
2017-02-02 13:31:01 +01:00
Cédric Krier 9a1e636954 Initialize earlier the ir_cache table
As now the cache is managed by the Transaction, when creating the database for
the tests, the ir_cache table should be present before the registration of the
ir module. Also the transactions to create or drop the database should not have
cache because either the database is not created at the start or dropped at the
commit.

issue6216
review29171003
2017-02-02 13:14:19 +01:00
Cédric Krier 3d0c21cbec Add list of buttons on group form view
issue6229
review27931003
2017-02-02 12:09:28 +01:00
Cédric Krier cc89a96c35 Do not copy clicks of ModelButton
issue6228
review26061002
2017-02-02 12:08:20 +01:00
Cédric Krier 7004574de7 Add logging on cursor execute
issue6211
review34651002
2017-02-02 12:06:55 +01:00
Cédric Krier cdc5952145 Manage Cache in Transaction
issue6216
review33021002
2017-02-02 12:04:27 +01:00
Cédric Krier aec4208225 Allow to register multiple exit functions on Transaction
Use Transaction.atexit for sleeping on login attempt to put back the
transaction as soon as possible.

issue6217
review27911002
2017-02-02 12:00:49 +01:00
Cédric Krier 2351008095 Fill cache with selected columns in ModelSQL.read
This minimizes missing cache on the instances when computing Function field.

issue6209
review31981002
2017-02-02 11:57:18 +01:00
Cédric Krier afdc884277 Return 429 status when too many login attempts
This prevents to consume too much resource by sleeping over a very long period.

issue6215
review29161002
2017-02-02 11:55:44 +01:00
Nicolas Évrard 39c12cf496 Add set_rpc on Field
The __rpc__ attribute is currently filled by method in ModelView. Allowing
fields to define themselves what endpoints should be remotely callable make
this process more flexible.

issue4044
review30991002
2017-02-01 16:11:00 +01:00
Cédric Krier 37cd24210a Use integer as default value for id when compare to 0
In Python3, it is no more allowed to compare None with integer.

issue6231
review27941002
2017-02-01 10:29:54 +01:00
Sergi Almacellas Abellana 8339247071 Ensure add_remove attribute is a valid domain
issue6230
review34671002
2017-02-01 10:15:12 +01:00
Cédric Krier b5ea083f7b Do not instantiate global DB nor POOL in test_tryton.py
The database is not yet created so it fails if the Database tries to connect.
This happens since changeset 5e8fc3bec7.
2017-01-29 02:16:28 +01:00
Cédric Krier 94be12542c Return result after cache reset in with_transaction wrapper
issue6200
review34641002
2017-01-29 01:17:08 +01:00
Cédric Krier 1b3dbec3b4 Ensure only one connection pool is created per database
It is too complex and expensive to lazy create the connection pool because all
methods which uses the pool needs to acquire a lock. So it is easier to create
it when the instance is also created. In this case, on closing the database, it
should be unregistered from the instances dictionary.

issue6202
review32991002
2017-01-29 01:15:45 +01:00
Cédric Krier c0aa69fa23 Make wsgi app returns Internal Server Error on exception
If no protocol convert the data into a Response and if the data is an exception
it should be returned as an Internal Server Error instead of a succeed
response.
The exception can be used as description for the Internal Server Error.

issue6201
review31951002
2017-01-29 01:11:57 +01:00
Cédric Krier c2b76dd685 Use root user to init pool in with_pool wrapper
All requests do not have necessary a user id, for example request for user
application.

issue6199
review26041002
2017-01-29 01:07:33 +01:00
Cédric Krier 811cbb2ad4 Fix test to translate read field
The test was using the field name instead of the field instance.
It is better to keep the usual convention of using fname for name and field for
the instance.

issue6208
review33011002
2017-01-25 23:30:23 +01:00
Cédric Krier c1b8ee10c6 Add has_select_for on Database
- Use has_select_for for ir.sequence.strict instead of lock

issue6134
review32911002
2017-01-25 23:21:57 +01:00
Florian Preinstorfer a4288f206f Update report documentation for office suite UI changes
The UI for office suites (LibreOffice, OpenOffice) has changed. Update the
description accordingly and fix a formatting issue.

issue6218
review29161003
2017-01-25 22:46:04 +01:00
Cédric Krier bc4e675935 Add warning about mutating cache values
issue6186
review29931002
2017-01-19 22:57:09 +01:00
Cédric Krier 9ea02c7b5e Test resource model using string
issue6091
review33701002
2016-12-28 23:18:17 +01:00
Cédric Krier 24f386cd58 Backed out changeset bd4fb1ec9ebb
issue6128
2016-12-26 19:36:22 +01:00
Cédric Krier 037780d5ae Avoid to convert IntegrityError into string
Use message attribute instead of calling str because the message could be
non-ASCII encoded.

issue6128
review31831002
2016-12-26 18:56:07 +01:00
Xavier Codinas c300756a9d Return the default language for user
Returning a default value prevents the client get displayed in two different
languages.

issue6118
review29831003
2016-12-22 09:39:13 +01:00
Cédric Krier dd3e0a4c2a Improve assertion in convert_domain of Function field
The field name from the domain could be a nested if the Function field is
relational. So it must just if it starts with the name of the field.
2016-12-22 01:15:46 +01:00
Cédric Krier 4d5046f028 Store custom report translation in separate module
Such translations should not be linked to the original report module as they
are only available in this database.
The translations menu entry should show also those who are not linked to a
module.

issue6059
review29761002
2016-12-21 23:44:21 +01:00
Cédric Krier 8bcd39008d Add form_action keyword for set/synchronize translation on report and view
This allows to run the wizard from reports or views and limit them to the
active records.

issue6063
review30811002
2016-12-21 23:41:37 +01:00
Cédric Krier 9c6cc66a41 Make HOSTNAME public
issue6127
review34561002
2016-12-21 23:24:56 +01:00
Cédric Krier ab794f6411 Use negative col attribute
issue2090
review33661002
2016-12-21 23:17:56 +01:00
Cédric Krier b60f97a948 Add negative value for col attribute
issue2090
review33661002
2016-12-21 23:17:19 +01:00
Cédric Krier f6deed5941 Allow to use domain_<field name> method with Function fields
issue6113
review26961003
2016-12-21 23:08:30 +01:00
Sergi Almacellas Abellana 04a027a105 Validate wizard definition on module tests
issue6067
review32831002
2016-12-21 10:07:57 +01:00
Cédric Krier 361ad96471 Add documentation about database update
review31791002
2016-12-19 10:05:48 +01:00
Sergi Almacellas Abellana cd51241e3a Add test about editing and coping translations without admin access
issue6115
review34541002
2016-12-19 09:42:12 +01:00
Sergi Almacellas Abellana d6f1eaf10b Read translations without checking access
Since changeset de90bf5435ce instance records are used (instead of writing the
values) but when they are read with the check_access, as this context  is used
to save the values, they raise incorrect access error.

issue6115
review34541002
2016-12-19 09:40:40 +01:00
Cédric Krier bb27960228 Remove order constraint on register ModelSQL
We create the foreign table if needed before adding the foreign key constraint,
thus it is no more needed to order the registration of the ModelSQL.

issue5682
review32841002
2016-12-17 00:38:21 +01:00
Cédric Krier 49ec3dcce1 Add relate from report to translations
issue6057
review26901002
2016-12-17 00:25:01 +01:00
Cédric Krier 4430d97a68 Test action keyword model using string
With changeset b8d76b07910f, negative ids are no more instantiated but so
testing the model with __name__ does not work any more for such value.
Instead we must always compare using the string version of the model.

issue6091
review31801002
2016-12-16 17:09:25 +01:00
Cédric Krier 2b84a80789 Test no instantiation of reference field with negative id
issue6091
review26941002
2016-12-16 11:00:49 +01:00
Cédric Krier 92d8d29fad Do not instantiate reference field with negative id
The reference fields can have a negative id if no record was selected on the
client. It is not expected to get such temporary instance from a reference
field on a saved record.

issue6091
review26941002
2016-12-16 11:00:04 +01:00
Cédric Krier cbf4e70c09 Do not try to read empty filename configuration
configfile can be a list with None values as the default argument value is a
list with TRYTOND_CONFIG environment variable which could be not set.

issue6101
review25891002
2016-12-13 18:36:52 +01:00
Cédric Krier 015603c847 Hide report path if custom template is set
This gives visual hint to the user about customization.

issue6064
review25831002
2016-12-13 18:31:42 +01:00