Commit Graph
5399 Commits
Author SHA1 Message Date
Cédric Krier f72767bb6c Remove mock from tests requirements 2018-06-26 19:59:01 +02:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier d81519d312 Limit the cache to only matching multivalue records
Non matching records will not be used any way and they could trigger an
unneeded exception.

issue7529
issue7439
review45661002
2018-06-24 16:56:12 +02:00
Cédric Krier 93526b9cd0 Check rule after indirect fields and modification
The rule may depend on indirect field written latter so it must be checked
after the storage of those fields.
On write, the rule must be checked before the modification but also after to
ensure users do not generate records that they can not modify after.

issue7403
review53301002
2018-06-24 16:54:46 +02:00
Cédric Krier 0d07dea2ac Return new records from copy following the input order
issue7512
review58291002
2018-06-24 16:48:27 +02:00
Cédric Krier f4b1789339 Delete rule group on cascade when model is deleted
issue7526
review52381002
2018-06-24 16:44:02 +02:00
Cédric Krier 58f2725049 Allow to define view id in switch client action
issue7364
review36181002
2018-06-20 10:18:33 +02:00
Cédric Krier 1eaea7d1de Do not validate Function fields even with setter
Their values should be already validated by the underlying storage and also
the domain validation requires to have a searcher.

issue7507
review48471002
2018-06-18 21:55:16 +02:00
Cédric Krier 1f6dcc3e56 Precise the view_ids order for Many2Many
issue7509
review47531002
2018-06-18 21:53:33 +02:00
Cédric Krier 7408bb8090 Simplify the creation of dependencies graph
There is no need to create the graph step by step with only dependencies
already registered as far as the depth computation is propagated to all the
children.
Instead of searching level by level the nodes to iterate, it is faster to use
the sort of Python.
create_graph does not need to return its internal states but only the graph.
The ir.module activate and update method does not need to check for missing
dependencies because it is already checked at startup.

issue7466
review45211002
2018-06-11 23:22:35 +02:00
Cédric Krier c244bdf422 Clean ir.model and ir.model.field once every models have been registered
The same model can be registered multiple times by one module so the cleaning
can only happen when the all the classes have been registered.

issue7500
review53271002
2018-06-11 23:18:28 +02:00
Cédric Krier 65659dcf30 Remove clean of ir_model_field in register
issue7500
review53271002
2018-06-11 23:17:54 +02:00
Cédric Krier 02572c1249 Define title outside the loop
If languages is empty for Report.get_email, the title is used before
assignation.

issue7499
review47501002
2018-06-11 23:15:05 +02:00
Cédric Krier 23ab0cdb13 Ensure second domain argument is a string before testing against OPERATORS
If the second argument is a PYSON expression, the Python 'in' test calls
__eq__ on it which return a PYSON Equal object between the expression and the
operator. If the PYSON expression does not have the string type, an
incompatibility exception is raised.
So this operation must be prevented if the argument is not a string.

issue7491
review45251003
2018-06-11 23:10:27 +02:00
Cédric Krier 1fc70d083d Use server_version from psycopg2 connection object
instead of executing a statement and manage our own cache.

issue7465
review51311002
2018-06-04 19:05:25 +02:00
Cédric Krier 35bba61748 Make depends on methods generic to any method
issue5191
review50381002
2018-05-31 13:23:55 +02:00
Cédric Krier 6a50848201 Document _parent_ behaviour on One2Many
issue6711
review38841002
2018-05-29 10:35:26 +02:00
Cédric Krier 13b211494c Add width/height attribute to notebook
issue7432
review47411002
2018-05-29 10:32:41 +02:00
Cédric Krier aab2b6e015 Allow to call set_lang with None or language instance
This simplify code in report. When the language is None, the default language
from the configuration is used.

issue7449
review51271002
2018-05-23 23:08:44 +02:00
Cédric Krier e85a4891ac Serve index.html for static directory
This allows to have shorter sao URL because it is without index.html.
Also this adds the support of static web root when launching WSGI app from a
different WSGI server.

issue6677
review45501002
2018-05-22 23:44:10 +02:00
Cédric Krier 0aed819d47 Add hostname configuration to list database
issue7375
review44991002
2018-05-22 23:42:35 +02:00
Cédric Krier 487ffc07e4 Add module to current_state of XML parser
issue7435
review45471002
2018-05-22 23:39:57 +02:00
Cédric Krier 1a2f0edbbb Add _request context to with_transaction wrapper
issue7444
review45151002
2018-05-22 23:38:36 +02:00
Cédric Krier 968c838b70 Update missing translations
issue7414
2018-05-21 23:13:05 +02:00
Cédric Krier 90502790f9 Add tree name clause only if not yet present
We can not rely on the deepcopy of the field because the Mixin maybe added
after the class that define the field. In this case we modify the reference
field for the deepcopy.

issue7434
review47421002
2018-05-17 18:26:54 +02:00
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