Commit Graph
5374 Commits
Author SHA1 Message Date
Cédric Krier 5ca66d5ccf Add tree mixin
- Implement generic get_rec_name and search_rec_name
- Include recursive check

issue7383
review48281002
2018-05-12 00:45:55 +02:00
Sergi Almacellas Abellana 9771137d6a Include inactive users when searching for admin user
issue7396
review45451002
2018-05-10 17:22:53 +02:00
Xavier Codinas afe5c180b4 Rename "install-dependences" into "activate-dependencies"
issue7343
review50281002
2018-05-09 15:30:48 +02:00
Cédric Krier c1e08465dd Correctly document the behaviour of child_of/parent_of
issue7404
review46421002
2018-05-07 16:38:34 +02:00
Ezra Erb b3a383e3ef Expand ~ and ~user in configfile
issue6637
review36091002
2018-05-07 15:15:53 +02:00
Cédric Krier 4ed54e9bbc Support child_of/parent_of with None in the value list
This was a implicit behaviour before the changeset 6fefd00369c1.
As a lot of code rely on this behaviour, we make it explicit by adding a test
case.

issue7405
review36251002
2018-05-03 11:57:10 +02:00
Cédric Krier 4c1fe028c1 Use recursive common table expression for child_of/parent_of operators
issue7116
review46331002
2018-04-30 16:03:34 +02:00
Cédric Krier d23d7c9ccb Do not call table_query for testing
Only the callable property of table_query is used to test if the ModelSQL uses
a table query or not.

issue5726
review47321002
2018-04-30 15:55:31 +02:00
Cédric Krier 00e4a51a41 Add sql_cast on Field
issue7266
review37141002
2018-04-30 14:59:01 +02:00
Cédric Krier b2b613f433 Increase version number 2018-04-23 17:12:38 +02:00
Cédric Krier 550107d01b Added tag 4.8.0 for changeset 321b0104a732 2018-04-23 17:12:01 +02:00
Cédric Krier 1303161735 Prepare release 4.8.0 2018-04-23 17:12:01 +02:00
Cédric Krier 921702a6c2 Update translations 2018-04-21 13:04:38 +02:00
Cédric Krier aa8281c1e3 Fix class name for ModelSQL.search documentation
issue7358
review47341002
2018-04-18 10:14:58 +02:00
Cédric Krier 962b164709 Test Decimal in PYSONEncoder
issue7291
review46341002
2018-04-17 17:58:40 +02:00
Cédric Krier 088627dcd2 Support Decimal in PYSONEncoder
issue7291
review46341002
2018-04-17 17:58:13 +02:00
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