Commit Graph
5358 Commits
Author SHA1 Message Date
Cédric Krier c8896c1efb Add Persian
issue7311
review45371002
2018-04-14 17:20:08 +02:00
Cédric Krier 9353fa6aac Add viewBox attribute to SVG
issue7320
review47291002
2018-04-09 10:54:41 +02:00
Cédric Krier 67fd16fa5d Add tests for extra pattern in get_multivalue and set_multivalue
issue6672
review47291003
2018-04-09 10:50:49 +02:00
Cédric Krier 0d50aa9c05 Filter extra pattern in get_multivalue and set_multivalue
The pattern can be passed from one field to another and so it may contains
extra keys that does not exist in the Value model as field.

issue6672
review47291003
2018-04-09 10:50:19 +02:00
Cédric Krier 60f167bcfe Add index method to order field set calls
issue7090
review46301002
2018-04-05 19:18:52 +02:00
Cédric Krier 710c0ab2e9 Rename with_inactive_records decorator
issue7026
2018-04-03 14:55:01 +02:00
Cédric Krier 8c61a67c2b Remove active test in search_domain of Many2One and Reference
As the target is stored on the record, the target is always visible so
searching on it should not add active clause.

issue7026
review41231002
2018-04-03 13:20:37 +02:00
Cédric Krier ef297a8cd1 Deep copy the context before modifying in RPC
issue7287
review46271002
2018-03-30 18:15:04 +02:00
Cédric Krier df4e5f0cb0 Replace day and month by 1 in date_trunk for SQLite
The value 0 is not valid for day and month.

issue7263
review45311002
2018-03-27 22:14:01 +02:00
Sergi Almacellas Abellana bfb76a70ad Add deactivable mixin and ensure active field is present
issue4341
review38401002
2018-03-26 14:07:45 +02:00
Sergi Almacellas Abellana b06f72c1be Manage depends xml attribute on field tag
issue7127
review40081002
2018-03-26 10:33:02 +02:00
Cédric Krier 9865cc43e6 Add test to check that depends on _parent_ contains also the relation
Otherwise, the depends decorator will set the relation to None if the record
is not in One2Many widget. And the method will not behave the same as if the
record was in a One2Many widget.
And if it is an on_change call, it will remove the value on the client side.

issue7249
review45291002
2018-03-24 13:50:47 +01:00
Nicolas Évrard dc8f111662 Add expand attribute on group tag
issue7220
review38061002
2018-03-23 16:29:35 +01:00
Sergi Almacellas Abellana 514a38fbf2 Use field_description as field rec_name when available
issue7238
review40191002
2018-03-22 11:03:33 +01:00
Cédric Krier 7ae6a23128 Add non-standard exclude constraint in TableHandler definition
PostgreSQL does not include non-standard constraints in the
information_schema.table_constraints view.

issue7244
review37121002
2018-03-22 10:40:52 +01:00
Nicolas Évrard ff5b79819b Add support for search_* attributes on relational fields
issue6081
review25871002
2018-03-21 17:59:55 +01:00
Cédric Krier ca2b442afc Add depends on Pool.register
issue7178
review37051002
2018-03-20 17:27:12 +01:00
Cédric Krier b15f3fb4c5 Do not append Exclude where clause if empty 2018-03-19 17:48:55 +01:00
Cédric Krier b3ca13748b Add Exclude constraint
issue1422
review44061002
2018-03-19 16:57:49 +01:00
Nicolas Évrard acdbe5a08f Allow to perform unaccented searches on Char fields
issue7115
review44611002
2018-03-16 18:17:53 +01:00
Sergi Almacellas Abellana 8e80421ae2 Set admin password when TRYTONPASSFILE environment variable is set
This behaviour was wrongly removed in changeset 5ade83a210f0

issue7221
review37091002
2018-03-16 11:53:47 +01:00
Cédric Krier 036ca6d6a9 Always raise exception in table handler
issue7175
review40161002
2018-03-15 00:43:32 +01:00
Cédric Krier 57248f9655 Clear cache for all records of ModelSingleton
As write and delete can be called with any ids for records and the super calls
are always on the real record, the cache is only cleared for the real record.
So ModelSingleton must ensure to clear the cache for any record ids.

issue7205
review44731002
2018-03-15 00:23:11 +01:00
Cédric Krier 1c32a02b64 Simplify API for Session
- Allow to extend session management with a domain
- Let security manage the logging
- Let check differentiate expired session and session that does not exist

issue7134
review39171002
2018-03-07 00:34:09 +01:00
Sergi Almacellas Abellana 6d39f13489 Add migration to register buttons on ir module
changeset 83757dc87808 moved the buttons from res to ir module but it missed
the migration of the model data to allow updates from previous databases

issue7186
review38031003
2018-03-02 14:21:17 +01:00
Sergi Almacellas Abellana ff2bded417 Ensure that all buttons are registered in ir.model.button
issue6389
review36621002
2018-03-01 11:59:23 +01:00
Cédric Krier 4a909f94a2 Add reset password
The reset password button generates a temporary random password which expires
after 1 day and is sent to the email address of the user.
The temporary password does not work as soon as a new password has been set.
The trytond-admin asks the email address for admin user and has an option to
set the admin email and to reset its password.

issue7037
review41761002
2018-02-23 19:13:19 +01:00
Cédric Krier e778370e02 Ensure to put back the connection with a try/finally
This prevents to leak connection in the ThreadedConnectionPool of psycopg2.

issue7137
review39181002
2018-02-19 19:11:33 +01:00
Cédric Krier 62a90a603e Use unicode instead of str for DatabaseIntegrityError
The exception message could contain non-ASCII errors for which standard
__str__ may fail, but as the database should always be in UTF-8 we may except
that unicode will not fail.

issue6128
review43971002
2018-02-19 19:09:06 +01:00
Cédric Krier 8a7953bb8f Use proper SQL types
- When recreating the table to drop a column, the correct SQL type must be
  converted by the database.
- SQLite uses BOOLEAN as base type for BOOL

issue7120
review37001002
2018-02-19 19:07:30 +01:00
Sergi Almacellas Abellana 54f70e2971 Add depends on Button
issue6919
review40811002
2018-02-19 11:35:37 +01:00
Cédric Krier b197b6b13d Add cache for check_xml_record
This allows fast return when the checked model has no record in ir.model.data
which is the most common case. This allow to prevent to search for non
existing records.

issue7119
review37991002
2018-02-14 19:35:57 +01:00
Cédric Krier fbf488948b Limit authentication attempt per IP network
ip_address and ip_network are added to LoginAttempt.

issue7110
review41031002
2018-02-14 19:24:01 +01:00
Cédric Krier e8ee8dedac Manage 'X-Forwarded' headers from proxies
issue7110
review41031002
2018-02-14 19:23:11 +01:00
Cédric Krier 7388e7b233 Add '_request' attribute to Transaction context
issue7110
review41031002
2018-02-14 19:22:03 +01:00
Cédric Krier f911f48ed4 Delete translations only when model has translatable field
The call to Translation.delete_ids has a cost as it does search queries. So it
is better to not call it if we already know that there is nothing to delete.

issue7118
review37981003
2018-02-11 14:59:58 +01:00
Sergi Almacellas Abellana 0eaf7c16b8 Add 10 digits validation test on numeric field
issue7091
review37981002
2018-02-07 12:27:52 +01:00
Sergi Almacellas Abellana b53fcf111a Do not strip trailing zeros on Decimal digits validation
In order to support the 0 digits case rstrip was introduced in changeset
d3fec5da0dbdbut it breaks the case where the number of digits is high
as python uses manting representation when converting the float value
to string. This causes the last trailing zero is also removed which
breaks the validation.

issue7091
review37981002
2018-02-07 12:26:59 +01:00
Sergi Almacellas Abellana a9595f3c25 Only convert to unicode exceptions string on python2
issue7097
review43941002
2018-02-07 12:08:56 +01:00
Cédric Krier d1874d4f5f Ensure all modules are activated by testing tools
issue7079
review41801002
2018-02-07 01:16:15 +01:00
Cédric Krier bd8214a6a9 Ensure Session key is different on bunch creation
issue7087
review40041002
2018-02-07 00:35:46 +01:00
Cédric Krier 4f586030a6 merge 2018-02-02 01:05:42 +01:00
Cédric Krier 25df09ead1 Replace assertItemsEqual for Python3 2018-02-02 00:58:15 +01:00
Cédric Krier ef74636148 Remove import of removed test.py file 2018-02-02 00:27:41 +01:00
Cédric Krier 21fd0496a1 Remove trailing 0 in exp of Decimal.quantize
The digits validation on Decimal should remove trailing 0 when create exp.
Because the string of "10.0 ** -0" is "1.0" because it is a float.

issue7091
review39111002
2018-02-02 00:08:22 +01:00
Cédric Krier 478c4e6928 Refactor fields tests
issue7085
review40051002
2018-02-02 00:04:19 +01:00
Cédric Krier b32d158d10 Remove MySQL backend
issue7017
review41771002
2018-01-24 20:12:42 +01:00
Nicolas Évrard 5673bdd98f Add keyword attribute to button tag
issue7067
review39101002
2018-01-24 14:32:09 +01:00
Cédric Krier 50f4a789c0 Allow field name on image tag
issue7058
review43891002
2018-01-23 22:13:30 +01:00
Cédric Krier 60e218d9b6 Improve dependency links
issue7049
2018-01-21 19:57:11 +01:00