Commit Graph
5181 Commits
Author SHA1 Message Date
Cédric Krier 6d783acf42 Make save parameter of set_multivalue public
It can be useful for performance when setting values for MultiValue field on a
large set of records.

issue6625
review39491002
2017-07-27 00:05:04 +02:00
Cédric Krier 965f8b0cdb Add test to ensure rec_name is a char, text type
Model.default_get with 'default_rec_name' context relies on the fact that
rec_name is a string base field.

issue6630
review36501002
2017-07-26 23:44:00 +02:00
Cédric Krier 6b3551c834 Ensure rec_name is a char, text type
Model.default_get with 'default_rec_name' context relies on the fact that
rec_name is a string base field.

issue6630
review36501002
2017-07-26 23:43:00 +02:00
Sergi Almacellas Abellana 6f8582d168 Pass pattern argument on multivalue default field test
This allows to catch all the multivalue default methods which miss the
pattern argument.
issue6658
review40541002
2017-07-25 09:45:12 +02:00
Sergi Almacellas Abellana 7de2022a2d Remove line breaks from password file
issue6657
review41461002
2017-07-25 09:35:50 +02:00
Cédric Krier 79fb0bcb7d Use next to get first record instead of index
This allows to use set with ModelStorage.save.

issue6633
review40521002
2017-07-19 19:57:30 +02:00
Sergi Almacellas Abellana 6e92c8e3ba Add environment variables to wsgi script
issue6344
review32131002
2017-07-19 10:10:04 +02:00
Cédric Krier fe674cef55 Enforce unique list of records on method calls
An option is added on RPC definition to enforce uniqueness of records
instantiated. The key methods ModeView.button and Workflow.transition have an
assert to detect error in development code.

issue6184
review36411002
2017-07-16 23:49:15 +02:00
brunnenschacht cb2d234230 Ensure the proper encoding for the authentication header response
issue6628
review36441002
2017-07-13 09:19:08 +02:00
Cédric Krier fce24f3e4e Add test for function field methods
It tests if getter, setter and searcher really exists on the model.

issue6616
review34241002
2017-07-12 19:58:13 +02:00
Cédric Krier 4130a14d48 Use _changed_values for added record on One2Many
This allows to have the 'rec_name' set for xxx2One and Reference field but we
need to ensure that even the initial values are returned because the instance
does not come from the client.

issue6579
review40471002
2017-07-10 23:59:26 +02:00
Sergi Almacellas Abellana 010043fbe0 Ensure egg modules path is absolute
Paths defined on sys.path may contain a relative path, so it must
be converted to absoulte path otherwise the starting comparison will
fail

issue6607
review39471002
2017-07-03 18:13:27 +02:00
Sergi Almacellas Abellana e3455875fb Add option to install module dependencies with trytond-admin
issue5696
review29361002
2017-06-30 09:50:49 +02:00
Sergi Almacellas Abellana 1aae453480 Don't use an sql query to delete target models if not ModelSQL
issue6525
review35431002
2017-06-30 09:46:21 +02:00
Cédric Krier a53883484e Update MPTT before the validation of created records
This prevent to fill the cache of the instances created with wrong values for
left/right fields. And it ensure that the validation code has valid MPTT
values.

issue6591
review34211002
2017-06-29 23:08:36 +02:00
Cédric Krier 96e8ceb7c7 Skip test_get_smtp_server_extra_parameters on python version < 2.7.4
Older Python version does not parse query for smtp scheme.
https://bugs.python.org/issue9374
2017-06-18 20:24:56 +02:00
Kurt Miebach 5af7ff1117 Improve password dialog and error messages
- Ask password of user "admin" instead of 'Admin'
- Use double quotes for user name and db name
- Terminate error messages with fullstop instead of exclamation mark.

issue6566
review35061002
2017-06-18 15:24:41 +02:00
Cédric Krier 1c92359998 Decode username only if it is bytes
The decoding is only needed on Python2 because bytes_to_wsgi returns always a
str but str on Python2 is not unicode.

issue6578
review41381002
2017-06-18 15:24:05 +02:00
Sergi Almacellas Abellana 71b8d38cef Add ondelete cascade on export lines
Also make the export field required

issue6551
review34171002
2017-06-16 09:51:48 +02:00
Sergi Almacellas Abellana 5dfd3b0791 Add localhost_name and timeout as get_smtp_server uri parameters
This allows a better customization of the smtp connection

issue6540
review39411002
2017-06-16 09:47:39 +02:00
Kurt Miebach b01181b76d Convert max_attempt value from config file to integer
issue6565
review40451002
2017-06-15 22:41:49 +02:00
Sergi Almacellas Abellana ae5fcfe03b Delete missing modules not activated when updating module list
issue6472
review42271002
2017-06-13 09:55:44 +02:00
Nicolas Évrard bd965457e7 Use correct way to specify inline view in test 2017-06-09 16:51:05 +02:00
Nicolas Évrard ddf4e0fe3c Remove empty pages from notebook
issue3295
review40421002
2017-06-09 16:07:03 +02:00
Sergi Almacellas Abellana b637c503e7 Only convert dict fields when they are strings
issue6382
review28101002
2017-06-09 13:22:42 +02:00
Jean Cavallo c24bcbdab1 Only update translation cache when necessary
issue6403
review28191002
2017-06-03 11:34:12 +02:00
Sergi Almacellas Abellana a483471bf9 Invalidate get_keyword cache when modifying action window domains
issue6536
review37441002
2017-06-01 16:50:51 +02:00
Sergi Almacellas Abellana 0f5cc535b7 Avoid reading undefined senderrs variable when sendmail fails
issue6535
review41341003
2017-06-01 16:40:29 +02:00
Cédric Krier d1a971fb61 Decode username before logging it
The username of request authorisation is bytes encoded in UTF-8.
The logging module tries to decode it as ASCII by default.

issue6517
review34991002
2017-05-30 22:07:46 +02:00
Cédric Krier 677f2c213c Remove duplicate ids when searching parent menu
This prevents to generate a too big SQL query and also avoid to fail in the
SQLite bug: https://www.sqlite.org/src/tktview?name=61fe97454c

issue6514
review34131002
2017-05-30 22:03:32 +02:00
Cédric Krier 9136ecf206 Encode data name if it is an unicode
In Python3 hashlib works only with bytes.
2017-05-12 12:42:35 +02:00
Cédric Krier 4520afedd3 Convert into hash too long data name
Some back-ends have constraint on the length of data name, they usually
silently truncate them, but this can create collision. The solution is to hash
the name when it is too long.

issue4620
issue6494
review37381003
2017-05-12 12:00:44 +02:00
Sergi Almacellas Abellana b1fbc675f1 Use correct target model on One2ManyFilterDomainTarget origin field
issue6492
review39361002
2017-05-09 10:08:19 +02:00
Sergi Almacellas Abellana 7ed3976d80 Use issubclass to test if foreign keys must be created
issue6491

review42321002
2017-05-08 12:00:37 +02:00
Cédric Krier 8770be28d6 Increase version number 2017-05-01 19:22:33 +02:00
Cédric Krier e16ef4adb1 Prepare release 4.4.0 2017-05-01 19:18:13 +02:00
Cédric Krier d3960ecc04 Update translations 2017-04-29 18:53:35 +02:00
Cédric Krier 0478cd4456 Add test for nested ordered search
issue6458
review37341002
2017-04-26 19:34:11 +02:00
Cédric Krier 8479768619 Ensure Many2One target join is unique if Target has history
The joins added in tables must ensure to make a Cartesian product.
So when joining on a history table, the target id is not unique so the latest
must be used only for the join. Otherwise a search query may return multiple
times the same id.

issue6458
review37341002
2017-04-26 19:33:32 +02:00
Sergi Almacellas Abellana d4028626d5 Add test for fields.depends decorator
issue6450
review40271002
2017-04-26 13:56:52 +02:00
Sergi Almacellas Abellana 7cc9585630 Ensure all _parent_ values are set on fields.depends
If the client does not sent all the values of the parent model fields, we must
ensure that the empty ones have None value

issue6450
review40271002
2017-04-26 13:56:30 +02:00
Cédric Krier f7c1de84c4 Support instantiate model with _parent_ of _parent_
This is a valid depends value for a field but the __init__ method lose the
second _parent_ once it has been instantiated a first time.
Setting _parent_ value must be done recursively.

issue6441
review40261002
2017-04-19 10:31:45 +02:00
Nicolas Évrard 12824d6457 Reset the database list cache on the right class
issue6429
review35371003
2017-04-17 00:17:09 +02:00
Cédric Krier 2d1143fd26 Sanitize path in file_open against suffix
issue6361
review33191002
2017-04-03 18:23:41 +02:00
Cédric Krier 050f2070dd Use byte password to find on mmap 2017-04-03 18:16:28 +02:00
Cédric Krier f7a6da3328 Add constraint on user password
issue6379
review28091002
2017-04-03 17:05:23 +02:00
Sergi Almacellas Abellana 5b86281166 Add missing types mapping for Postgresql backend
issue6411
review34071002
2017-04-03 13:11:07 +02:00
Cédric Krier a178546d0d Use _field for sql_format of Function field
It is useful to allow to use sql_format on Function field when writing SQL
query that emulate the field.

issue6410
review34051002
2017-04-01 19:55:35 +02:00
Cédric Krier 826f30219d Re-use method as default parameter of TableHandler add_column
There is no guarantee that the method will not raise a database error on the
first registration because it can rely on other tables being registered.
So the method must be called only when needed. This is when the table already
exists and has records. In this case other tables also already exist.

issue6409
2017-04-01 16:14:36 +02:00
Cédric Krier 62826903c2 Raise KeyError instead of generic Exception
This is a more specific exception that allows better catch.

issue6409
review34891002
2017-04-01 10:38:51 +02:00