Commit Graph
776 Commits
Author SHA1 Message Date
Cédric Krier 792ebac88b Use locale format for data export and import
issue8196
review255151002
2019-03-28 19:22:49 +01:00
Cédric Krier bb0242faf8 Raise NotImplementedError when setting Function field without setter
issue7985
review265101002
2019-03-27 00:28:58 +01:00
Cédric Krier 44011b1435 Take the field type from the right definition
The field type should be taken from the current fields definition and not from
the class.

issue8212
review273131002
2019-03-22 18:25:52 +01:00
Cédric Krier 9e10625111 Set the requested view_id in result of fields_view_get
The client uses the id of the view received by fields_view_get to construct
the URL so it must be the one requested to ensure to have the same view.

issue7988
review275081002
2019-03-22 18:18:36 +01:00
Cédric Krier 6d16b629f2 Add CSV exports to print toolbar
issue8130
review54571002
2019-03-22 17:21:21 +01:00
Cédric Krier 2752490423 Improve note button
* Add resources method to ModelStorage
* Support badge on icon
* Display unread and total of notes
* Add two extra colors for icon

issue8122
review70561002
2019-03-22 12:16:36 +01:00
Cédric Krier 07d79c7861 Validate selection format in Dict schema
issue7947
review257131002
2019-03-22 11:46:52 +01:00
Cédric Krier e2318257bb Allow to extend Field string and help
Those attributes are stored as StringPartitioned and each part creates its own
translation record. The translated strings are constructed by concatenation of
each translated part.

issue8040
review46731002
2019-03-15 13:01:11 +01:00
Cédric Krier 10e31bc311 Add Model.__names__ to retrieve model and field names
issue8159
review72431002
2019-03-15 12:27:44 +01:00
Cédric Krier 986da58a48 Use model name instead of class to translate field definition
The typo was introduced in changeset 1094d993d89c.
2019-03-09 15:23:11 +01:00
Cédric Krier c255cfe785 Display ids and rule names on access error
issue8093
review60551002
2019-03-03 23:11:17 +01:00
Cédric Krier f6c3fa2d68 Fill add_remove definition only if it is not None
issue8037
2019-02-18 17:03:13 +01:00
Cédric Krier 8a9d5297c6 Fill size definition only if it is not None
The clients expect to have an integer for the size or no key.

issue8037
2019-02-13 13:57:33 +01:00
Cédric Krier 9ea41ef4c8 Wrong class in super call
Introduced in changeset 5075df5e9872

issue8084
2019-02-13 12:30:05 +01:00
Cédric Krier 67cdf02720 Fill relation_field definition only with real field name
proteus expects the definition to have a field name for relation_field key or
no key at all. So parent_name is always a string.

issue8037
2019-02-13 11:38:16 +01:00
Cédric Krier 98bb26a386 Move field definition from Model to Field
issue8037
review74441002
2019-02-13 10:37:40 +01:00
Cédric Krier 951dbdfa82 Make DateTime field inherit from Timestamp field
The DateTime is a particular case of Timestamp.
This allows to share the sql_cast of DateTime with Timestamp.

issue8084
review64561002
2019-02-13 10:17:27 +01:00
Cédric Krier b315e9a6d9 Do not update db_id when deleting XML record without noupdate
If the record has been removed from the XML file, the db_id field will be
required. So we must not update it and let convert delete the data in
post_import.

issue8051
review70521002
2019-02-03 20:33:01 +01:00
Cédric Krier b34cac78d5 Allow to lock records for update
issue8012
review45901002
2019-01-30 09:45:59 +01:00
Cédric Krier 889b1cc9f8 Allow to search and order on Dict key value
issue7905
review62391002
2019-01-18 11:32:47 +01:00
Cédric Krier 9eb1c2eaaa Compute depends on-demand instead of for all callable
issue7939
review64521002
2019-01-18 00:24:28 +01:00
Cédric Krier c39858aac7 Allow to delete record from XML with noupdate
We set the db_id to None to avoid to link later to a different record.

issue7668
review50671002
2019-01-07 22:08:52 +01:00
Cédric Krier 93e3c0f9df Order selection field with instance method on column
issue7934
review66491002
2018-12-30 00:14:27 +01:00
Cédric Krier 83bf159aef Check foreign key in last on database integrity error
The search is done on a new transaction so it can not find targets that were
created during the main transaction.
2018-12-29 23:28:40 +01:00
Cédric Krier 1738a4ec35 Add ir.message and use custom exceptions
issue3672
review35291002
2018-12-29 14:19:08 +01:00
Cédric Krier b387adc7bc Add check on ModelSQL for positive id
issue7867
review50631002
2018-12-22 00:01:41 +01:00
Cédric Krier d1bb790cb8 New API to read related fields
issue7888
review58431002
2018-12-21 23:41:56 +01:00
Cédric Krier e4e7ae740d Disable sortable and searchable on ModelView only
Those feature depends on the Model having a search method.

issue7878
review56491002
2018-12-17 23:03:19 +01:00
Sergi Almacellas Abellana fc5f906ce5 Do not initiate sql table when table_query is defined
issue7896
review64491002
2018-12-03 11:29:43 +01:00
Cédric Krier c7f5c54a83 Remove implicit fields names in ModelStorage.read
It is a bad practice to not explicit the fields to read. So we should not
support it.

issue7830
review54421002
2018-11-28 10:05:01 +01:00
Cédric Krier 1a3ee131fe Check read access on field in search domain
issue7766
review50591002
2018-11-12 17:18:06 +01:00
Cédric Krier e115ef92d3 Remove check access to trigger_write_get_eligibles
The triggers returned need to be read without any check access.

issue7764
review68321002
2018-10-15 22:49:51 +02:00
Cédric Krier 81375e0d45 Use callable instead of instance of collections.Callable
issue7666
review50571002
2018-09-11 00:19:52 +02:00
Cédric Krier a6a7325f46 Remove deprecation warning
- remove invalid escape sequence
- use  read_file instead of read_fp
- use importlib instead of imp and __import__
- use callable instead of instance of collections.Callable
- fix silent file closing
- replace SafeConfigParser by ConfigParser
- replace decodestring by decodebytes
- replace encodestring by encodebytes

issue7666
issue7390
review53361004
2018-09-01 17:06:28 +02:00
Cédric Krier d221e36653 Improve ModelStorage.copy
* Allow callable in copy default
* Support dotted notation in copy default
* Use setdefault in copy
* Copy default when needed
* Do not set default state in copy
* Use callable and dotted notation in copy default

issue5576
issue7648
review72291002
2018-09-01 01:02:04 +02:00
Cédric Krier c3d2be19f5 Add support of timestamp field on client
issue6463
review50521002
2018-08-01 11:37:09 +02:00
Sergi Almacellas Abellana 3158279cb3 Remove button if it is not allowed to access some of its dependant fields
issue7502
review47511002
2018-08-01 10:44:06 +02:00
Cédric Krier ae06a8bca2 Add transactional queue and workers
issue7406
review45461002
2018-07-27 09:32:28 +02:00
Cédric Krier 7a2ce7905a Add __table_handler__ to ModelSQL
issue7581
review48531002
2018-07-24 22:01:08 +02:00
Sergi Almacellas Abellana 119af696a1 Recursively remove dependant fields when no access
issue7501
review46551002
2018-07-11 16:22:37 +02:00
Nicolas Évrard d9ff752284 Add domain to dictionary schema
issue7199
review51401002
2018-07-09 12:41:40 +02:00
Sergi Almacellas Abellana dab4d42237 Skip access rules when validating relation domain
issue7555
review62291002
2018-07-06 14:32: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 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 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 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 35bba61748 Make depends on methods generic to any method
issue5191
review50381002
2018-05-31 13:23:55 +02:00