Skip to content
Snippets Groups Projects
Commit 7a6a113c1fb6 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

Changed method to allow having readonly in a view on analytic dimensions...

Changed method to allow having readonly in a view on analytic dimensions placeholder so that all analytic fields will get readonly too.
parent 10caecedf90d
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
Changes Changes
======= =======
.. _2.2:
2.2
---
Changed method to allow having readonly in a view on analytic dimensions placeholder so that all analytic fields will get readonly too.
Example: <field name="analytic_dimensions" readonly="1"/>
The values that can be set are only 1, True or true. It should already be working with invisible, etc. but a modifiers="{'invisible': True}" might be needed too.
.. _2.1: .. _2.1:
2.1 2.1
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{ {
"name": "Analytic Structure", "name": "Analytic Structure",
"version": "2.0.2", "version": "2.2",
"author": "XCG Consulting", "author": "XCG Consulting",
"category": 'Dependency', "category": 'Dependency',
'website': 'http://www.openerp-experts.com', 'website': 'http://www.openerp-experts.com',
......
...@@ -332,8 +332,7 @@ ...@@ -332,8 +332,7 @@
attrs = {'name': field} attrs = {'name': field}
attrs['modifiers'] = json.dumps({ attrs['modifiers'] = json.dumps({
attr: value for attr, value in modifiers.iteritems() attr: value for attr, value in modifiers.iteritems()
if attr != 'readonly' or if elem.attrib.get(attr, 'False') in ('True', 'true', '1')
elem.attrib.get(attr, 'False') in ('True', 'true', '1')
}) })
for attr, value in elem.attrib.iteritems(): for attr, value in elem.attrib.iteritems():
if attr in ['name', 'prefix', 'suffix', 'modifiers']: if attr in ['name', 'prefix', 'suffix', 'modifiers']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment