Commit Graph
77 Commits
Author SHA1 Message Date
Cédric Krier 29129855ec Add support for Python 3
issue3211
review7311002
2016-02-07 16:46:16 +01:00
Cédric Krier 1bd76628c6 Set view_ids attribute only if it is not empty
issue5207
review15861002
2015-12-31 14:17:03 +01:00
Cédric Krier 71c0e0a3af Allow nested inherited views
Search and use the recursive type of the views

issue5206
review17691002
2015-12-31 14:15:51 +01:00
Cédric Krier 1f04a58562 Remove comments from view.arch
A side effect of this change is that now the method parse only once the arch of
each view instead of dumping and parsing the intermediary result of
inheritance.

issue5189
review18831002
2015-12-31 14:13:03 +01:00
Cédric Krier 2e37bf7852 Don't return changed many2one if the id is None
If the id is None, it is a temporary record which should not be considered as a
value change.

issue5190
review20601002
2015-12-27 20:03:59 +01:00
Cédric Krier 1a7c6c3a06 Add missing id on label
Fields without read access are replaced by empty label but they still require
at least a name attribute or an id.

issue5187
review19701002
2015-12-27 20:01:03 +01:00
Cédric Krier 9a58954703 Add view_ids on tree view
issue5052
review24511002
2015-11-10 12:55:06 +01:00
Cédric Krier 0e467f1b5d Fix order when searching view in ModelView
When id is given, there is no need to perform a search otherwise only root
views or inherited views from other model should be considered.
Instead of explicitly define orders, it is better for modularity to use the
default one defined on the view model.

issue2041
review21461002
2015-10-15 10:44:30 +02:00
Cédric Krier cd47b8cf85 Use specific test 'elem is None' to remove lxml warning
FutureWarning: The behavior of this method will change in future
versions. Use specific 'len(elem)' or 'elem is not None' test instead.
2015-09-15 14:52:03 +02:00
Cédric Krier 9bc7174254 Backed out changeset 0fd061e7c87f 2015-09-15 14:51:13 +02:00
Cédric Krier 228a8ca7d9 Use specific test 'elem is not None' to remove lxml warning
FutureWarning: The behavior of this method will change in future
versions. Use specific 'len(elem)' or 'elem is not None' test instead.
2015-09-14 12:00:43 +02:00
Cédric Krier 8299e1c133 Validate XML generated by ModelView.fields_view_get
- Add missing attributes to {form,tree}.rn{c,g}
- Add validatation to test_view
- Prevent fields_view_get to set attribute to the wrong view type

issue4944
review19421002
2015-09-04 12:04:07 +02:00
Cédric Krier dad49fa98b Always test field presence in initial value when computed changed values
The value could be None which is also the default value returned by dict.get.
So it will fail to detect change in such case.

issue4839
review23281002
2015-07-14 00:04:08 +02:00
Nicolas Évrard 34acc0885b Allow to replace view's root node with an XPATH
issue4802
review19291002
2015-06-23 17:12:18 +02:00
Cédric Krier 611b96c5f0 Add is_instance_method tool compatible with Python3
issue3211
2015-03-18 23:34:55 +01:00
Cédric Krier ad5eb3ed97 Add ModelView.button_change
issue4397
review7781002
2015-03-16 12:56:11 +01:00
Cédric Krier c17fbf5f25 Iter over copy of lxml.etree children
and remove deprecated usage of lxml.etree getchildren.
The cffi implemenation of lxml doesn't support to change the parent of element
while itering over it. It results of missing loop of some elements.

issue4408
review11741002
2015-03-15 15:49:37 +01:00
Cédric Krier bcd28ca071 Remove safe_eval
We convert all the fields that were storing python code into PYSON.
We add a pyson attribute on field tag to store PYSON value.

issue4416
review6971002
2015-03-09 19:40:41 +01:00
Sergi Almacellas Abellana 1ecdc9d3c9 Remove all the view elements which the user doesn't have access
issue4487
review10071002
2015-01-21 19:50:39 +01:00
Cédric Krier 286860f6b1 Fix documentation of ModelView.fields_view_get
review8811002
2014-12-16 22:19:01 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Udo Spallek 389b56a7b6 Test 'field' object for attribute 'field'
issue4358
review12731002
2014-11-24 16:36:58 +00:00
Cédric Krier 8553dfe9b0 _change_values miss some one2many changes
If only records of one2many change but the tuple is still the same than
_changed_values miss it.

issue4345
review7721002
2014-11-21 10:08:35 +01:00
Cédric Krier fee97ca399 New API for on_change
Modify the instance instead of returning a dictionary.

issue4203
review8581002
2014-10-29 20:38:17 +01:00
Cédric Krier b00094bb83 Avoid double evaluation from inherit with different model
safe_eval forbid to evaluate '__' but PYSON encoded contains such strings. So
with inherit from different model, the XML attributes could already been
encoded we should prevent to evaluate them a second times because it will fail.

issue4228
review5681002
2014-10-06 22:24:16 +02:00
Cédric Krier a2c8111f26 Use context to check model and field access
* Model and Field access checked only if _check_access is set
* Add check_access to RPC
* Add check_access to Wizard and Report

issue4081
review8481002
2014-09-17 21:43:53 +02:00
Cédric Krier e339a57b3e No need to use context in the key of _view_toolbar_get_cache
Cache already use by default the context to generate the key.

issue3993
review13351002
2014-06-22 17:18:01 +02:00
Cédric Krier f72b983c0f Check relation access in fields_get and for default fields in read
issue3750
review4261002
2014-03-15 11:01:14 +01:00
Cédric Krier 51abc3fb62 field_childs in generated view must be None instead of False
issue3403
2013-10-08 20:26:29 +02:00
Cédric Krier fc6c6cfdda Migration to python-sql
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method

review1001002
2013-09-06 22:32:37 +02:00
Cédric Krier 52a8141bda Remove validation of unused XML attributes
Those XML attributes are no more allowed in XML.
The domain is not only allowed in dashboard and it is not a field domain.

issue3310
review986002
2013-08-01 16:09:41 +02:00
Antoine Smolders c98af564f6 Add calendar view
review398003
2013-06-09 20:14:14 +02:00
Pierre-Louis Bonicoli b5245c82e1 View: remove encoding declaration (fix lxml usage)
issue3119
review765002
2013-04-08 10:57:39 +02:00
Cédric Krier a95ae0dad9 Remove _inherits
review670002
2013-03-20 22:49:16 +01:00
Cédric Krier 84240b78c3 Add dynamic label and prefix, suffix on tree view
review689003
2013-03-15 21:44:22 +01:00
Cédric Krier 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +01:00
Cédric Krier 3cb9f0468f Always update attributes and store view per id
This is needed to allow the client to choose the right view when the same field
is displayed multiple times with different views.

review656002
2013-02-05 19:31:22 +01:00
Cédric Krier e5446dde37 Allow to use XML file for views
issue70
2012-09-26 19:38:20 +02:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier 4dcb7b6dd3 Merge all kind of buttons
review483002
2012-09-10 15:26:34 +02:00
Cédric Krier e4dd1a25d0 Remove hexmd5 from ModelView.fields_view_get
review366001
2012-06-08 19:04:41 +02:00
Cédric Krier 0485538910 Add relation fields to auto-generated view
review368001
2012-05-14 15:27:06 +02:00
Cédric Krier 7a356c8197 Remove unused code 2012-04-09 17:48:28 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier be0e5c54a9 Simplify workflow engine
- Remove workflow module
- Add ir.model.button for access rights

review256001
2012-03-25 00:15:17 +01:00
Cédric Krier 585ca06b1d Keep the mode of the field even if view_ids are defined
We must have a full mode list otherwise the client skip the missing when
switching view.
2012-03-01 17:07:05 +01:00
Cédric Krier 66e77d8ae6 Replace nested view by reference id
issue2401
review226004
2012-01-31 23:26:48 +01:00
Cédric Krier a94ceb4321 Add default database language code
The configuration option defines which translated value will be stored in the
main field.
The methods of ir.translation which were already publicly used are now public.
Setting the main translation mark translations of other languages fuzzy.

review198001
2012-01-27 21:11:06 +01:00
Cédric Krier 537288cef7 Add cache on view_toolbar_get and get_keyword
review224003
2012-01-22 00:00:57 +01:00
Cédric Krier cc48eb8532 New search widget
- Change select on fields into Boolean
- Change format of search_value on ir.action.act_window

review95002
2011-10-03 09:45:21 +02:00