Commit 6b359e3b authored by Roque's avatar Roque

[HARDCODED] erp5_officejs: workaround to hide modification_date in form views

parent 00085c96
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.21116.33810.46779</string> </value>
<value> <string>976.22359.27411.27050</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1560255278.97</float>
<float>1560329876.02</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -125,10 +125,15 @@
element_id = my_element.replace("my_", "");
} else if (my_element.startsWith("your_")) {
element_id = my_element.replace("your_", "");
//TODO hardcoded to hide modification date in doc views
//fix bug that prevents to set field as hidden
if (my_element === "your_modification_date") {
element_id = undefined;
}
} else {
element_id = my_element;
}
if (raw_properties.hasOwnProperty(my_element)) {
if (element_id && raw_properties.hasOwnProperty(my_element)) {
field_info = raw_properties[my_element];
rendered_field = renderField(element_id, field_info, document);
form_json.erp5_document._embedded._view[my_element] = rendered_field;
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.21123.1432.19609</string> </value>
<value> <string>976.22364.34666.31795</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1560255763.32</float>
<float>1560330271.29</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.20864.50403.3310</string> </value>
<value> <string>976.21310.32010.65041</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1560247832.99</float>
<float>1560266942.88</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment