Commit b0f6e88c authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_travel_expense: Workflow transition display comments in application

parent 2cbcad20
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Person_jio_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Discussion</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="handlebars.js"></script>
<script src="alertify.js"></script>
<script class="discussion-template" type="text/x-handlebars-template">
<div>
<pre>{{content}}</pre>
{{#if can_add_discussion}}
<div class="ui-header">
<div>
<textarea></textarea>
<button name="submit" type="submit" class="responsive ui-btn ui-icon-comment ui-btn-icon-left ui-corner-all ui-shadow-inset">Post Answer</button>
</div>
</div>
{{/if}}
</div>
</script>
<script src="gadget_officejs_jio_text_post.js"></script>
</head>
<body>
<form></form>
</body>
</html>
/*globals window, rJS, RSVP*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS, loopEventListener, Handlebars) {
"use strict";
var waiting_icon = "responsive ui-btn ui-icon-spinner ui-icon-spin ui-btn-icon-left ui-corner-all ui-shadow-inset ui-disabled",
gadget_klass = rJS(window),
source = gadget_klass.__template_element.querySelector(".discussion-template").innerHTML,
template = Handlebars.compile(source);
gadget_klass
.declareAcquiredMethod('post', 'jio_post')
.declareAcquiredMethod('put', 'jio_put')
.declareAcquiredMethod("repair", "jio_repair")
.declareAcquiredMethod("allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("remove", "jio_remove")
.declareMethod("render", function (options) {
var gadget = this;
gadget.options = options;
return gadget.allDocs({
query: 'portal_type: Person' ,
select_list: ['first_name', 'last_name'],
limit: [0, 1]
})
.push(function (result) {
var i,
content = '',
transition_comment = {};
gadget.author = result.data.rows[0].value.first_name + ' ' + result.data.rows[0].value.last_name;
if (options.doc.transition_comment) {
transition_comment = JSON.parse(options.doc.transition_comment);
}
for (i in transition_comment) {
content += transition_comment[i].time + ' ';
content += transition_comment[i].actor + ': ';
content += transition_comment[i].comment + '\n';
}
gadget.transition_comment = transition_comment;
return template({
content: content,
can_add_discussion: options.can_add_discussion
});
})
.push(function (html) {
gadget.element.querySelector('form').innerHTML = html;
});
})
.declareService(function () {
var gadget = this,
submit = gadget.element.querySelector('button'),
form = gadget.element.querySelector('form');
if (gadget.options.can_add_discussion) {
return loopEventListener(
form,
'submit',
false,
function () {
var len = Object.keys(gadget.transition_comment).length,
tmp;
gadget.transition_comment[len] = {
'actor': gadget.author,
'time': new Date().toISOString().slice(0, 10),
'comment': gadget.element.querySelector('textarea').value
};
gadget.options.doc.state = 'Opened';
gadget.options.doc.transition_comment = JSON.stringify(gadget.transition_comment);
submit.className = waiting_icon;
return gadget.post(gadget.options.doc)
.push(function () {
/*
modify data will change hash code,
which jio will try to push localmodify to erp5
gadget.options.doc.simulation_state = 'delivered';
return gadget.put(gadget.options.jio_key, gadget.options.doc);
*/
return gadget.remove(gadget.options.jio_key);
})
.push(function () {
return gadget.repair();
})
.push(function () {
return gadget.redirect({page: gadget.options.page});
});
});
}
});
}(window, RSVP, rJS, loopEventListener, Handlebars));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>contributor/person_module/2</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_jio_text_post.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_hr_add_comment_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>OfficeJS Jio Text Post Js</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1483631237.36</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.40065.53190.1553</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1484312482.87</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -35,12 +35,10 @@ ...@@ -35,12 +35,10 @@
<div name="state">{{state}}</div> <div name="state">{{state}}</div>
</div> </div>
{{#if not_readonly}} {{#if not_readonly}}
<div class="ui-field-contain"> <div class="ui-field-contain">
<label data-i18n="Description">Description</label> <label data-i18n="Description">Description</label>
<textarea name="comment">{{comment}}</textarea> <textarea name="comment">{{comment}}</textarea>
</div> </div>
<div class="ui-field-contain"> <div class="ui-field-contain">
<label data-i18n="Total Price">Total Price</label> <label data-i18n="Total Price">Total Price</label>
<input type="number" name="quantity" value="{{quantity}}" step="0.01" required> <input type="number" name="quantity" value="{{quantity}}" step="0.01" required>
...@@ -123,7 +121,6 @@ ...@@ -123,7 +121,6 @@
<label for="sync_flag_no" data-i18n="Do Not Sync">Do Not Sync</label> <label for="sync_flag_no" data-i18n="Do Not Sync">Do Not Sync</label>
</div> </div>
</div> </div>
{{else}} {{else}}
<div class="ui-field-contain"> <div class="ui-field-contain">
<label data-i18n="Description">Description</label> <label data-i18n="Description">Description</label>
...@@ -192,10 +189,13 @@ ...@@ -192,10 +189,13 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div class="ui-field-contain">
<label data-i18n="Discussion">Discussion</label>
<div class='discussion'>
</div>
</div>
<div id="myModal" class="modal"> <div id="myModal" class="modal">
<span class="close">&times;</span> <span class="close">&times;</span>
<img class="modal-content" id="img01" name="img01"> <img class="modal-content" id="img01" name="img01">
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.9748.40508.8396</string> </value> <value> <string>956.40028.61290.1433</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1482499947.59</float> <float>1484312287.56</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -316,8 +316,19 @@ ...@@ -316,8 +316,19 @@
return template(ops); return template(ops);
}) })
.push(function (html) { .push(function (html) {
var discussion_div;
gadget.props.element.innerHTML = html; gadget.props.element.innerHTML = html;
discussion_div = gadget.props.element.querySelector('.discussion');
return gadget.declareGadget('gadget_officejs_jio_text_post.html', {element: discussion_div})
.push(function (discussion_gadget) {
options.page = 'expense_record_list';
if (["Closed", "Suspended"].indexOf(options.doc.state) !== -1) {
options.can_add_discussion = true;
}
return discussion_gadget.render(options);
});
})
.push(function () {
return gadget.updateHeader({ return gadget.updateHeader({
title: gadget.options.jio_key + " " + (gadget.options.doc.record_revision || 1), title: gadget.options.jio_key + " " + (gadget.options.doc.record_revision || 1),
save_action: sync_state === 'Synced'? false: true save_action: sync_state === 'Synced'? false: true
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.24261.36171.23790</string> </value> <value> <string>956.40024.27967.8789</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1483434792.47</float> <float>1484301997.49</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
args = {}; args = {};
if (hash !== undefined) { if (hash !== undefined) {
split = hash.split('?'); split = hash.split('?');
query = split[1] || ""; query = split[0] || "";
} }
subhashes = query.split('&'); subhashes = query.split('&');
for (index in subhashes) { for (index in subhashes) {
...@@ -130,20 +130,18 @@ ...@@ -130,20 +130,18 @@
var regexp = /^X-Delegate uri="(http[s]*:\/\/[\/\-\[\]{}()*+:?.,\\\^$|#\s\w%]+)"$/ var regexp = /^X-Delegate uri="(http[s]*:\/\/[\/\-\[\]{}()*+:?.,\\\^$|#\s\w%]+)"$/
var auth_page = error.target.getResponseHeader('WWW-Authenticate'), var auth_page = error.target.getResponseHeader('WWW-Authenticate'),
site; site;
if (! auth_page) {
auth_page = window.location.href + 'hateoas/connection/login_form'; if (regexp.test(auth_page)) {
}
/* if (regexp.test(auth_page)) {
site = UriTemplate.parse( site = UriTemplate.parse(
regexp.exec(auth_page)[1] regexp.exec(auth_page)[1]
).expand({ ).expand({
came_from: window.location.href, came_from: window.location.href + "#{&n.me}",
cors_origin: window.location.origin, cors_origin: window.location.origin,
}); });
}*/ }
if (auth_page) { if (site) {
return gadget.redirect({ toExternal: true, url: auth_page}); return gadget.redirect({ toExternal: true, url: site});
} }
} }
...@@ -242,10 +240,17 @@ ...@@ -242,10 +240,17 @@
.declareMethod('createJio', function () { .declareMethod('createJio', function () {
var gadget = this, var gadget = this,
logout_url_template, tmp = hashParams(),
tmp; hateoas_url,
//localStorage.clear(); default_view,
me;
me = tmp['n.me'] || '';
return new RSVP.Queue() return new RSVP.Queue()
.push(function () {
if (me) {
return gadget.setSetting('me', me);
}
})
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getSetting('hateoas_url'), gadget.getSetting('hateoas_url'),
...@@ -254,15 +259,30 @@ ...@@ -254,15 +259,30 @@
]); ]);
}) })
.push(function (setting_list) { .push(function (setting_list) {
var me = setting_list[2], var jio_storage;
current_date = new Date(), hateoas_url = setting_list[0];
default_view = setting_list[1];
me = setting_list[2];
if (!me) {
jio_storage = jIO.createJIO({
type: "erp5",
url: setting_list[0],
default_view_reference: setting_list[1]
});
return wrapJioCall(gadget, 'getAttachment', ['acl_users', hateoas_url, {format: "json"}], jio_storage)
.push(function (result) {
me = result._links.me.href;
return gadget.setSetting('me', me);
});
}
})
.push(function () {
var current_date = new Date(),
new_date = new Date( new_date = new Date(
current_date.getFullYear(), current_date.getFullYear(),
current_date.getMonth(), current_date.getMonth(),
current_date.getDate() - 60 current_date.getDate() - 60
); );
//office router can't handler me parameter
me = 'tmp';
gadget.state_parameter_dict.me = me; gadget.state_parameter_dict.me = me;
//gadget.state_parameter_dict.authenticated = true; //gadget.state_parameter_dict.authenticated = true;
gadget.state_parameter_dict.jio_storage = jIO.createJIO({ gadget.state_parameter_dict.jio_storage = jIO.createJIO({
...@@ -291,14 +311,14 @@ ...@@ -291,14 +311,14 @@
type: "uuid", type: "uuid",
sub_storage: { sub_storage: {
type: "indexeddb", type: "indexeddb",
database: "mmr-erp5-" + me database: "mmr-erp5-tmp"
} }
} }
}, },
remote_sub_storage: { remote_sub_storage: {
type: "erp5", type: "erp5",
url: setting_list[0], url: hateoas_url,
default_view_reference: setting_list[1] default_view_reference: default_view
} }
}); });
gadget.state_parameter_dict.jio_storage.__storage._signature_sub_storage = jIO.createJIO({ gadget.state_parameter_dict.jio_storage.__storage._signature_sub_storage = jIO.createJIO({
......
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.8685.14094.36198</string> </value> <value> <string>956.45945.18260.25463</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1482921657.76</float> <float>1484657302.88</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
</form> </form>
</script> </script>
<script src="gadget_officejs_jio_leave_request_record_view.js"></script> <script src="gadget_officejs_jio_leave_request_record_view.js"></script>
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>955.41038.59829.61593</string> </value> <value> <string>956.37052.29099.3498</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1480517010.98</float> <float>1484240093.48</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -217,7 +217,6 @@ ...@@ -217,7 +217,6 @@
}) })
.push(function (html) { .push(function (html) {
gadget.props.element.innerHTML = html; gadget.props.element.innerHTML = html;
return gadget.updateHeader({ return gadget.updateHeader({
title: "Demande de congé", title: "Demande de congé",
save_action: sync_state === 'Synced'? false: true save_action: sync_state === 'Synced'? false: true
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.17061.57868.19302</string> </value> <value> <string>956.38999.14763.58112</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1482923877.99</float> <float>1484240163.15</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -78,6 +78,11 @@ ...@@ -78,6 +78,11 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div class="ui-field-contain">
<label data-i18n="Discussion">Discussion</label>
<div class='discussion'>
</div>
</div>
</form> </form>
</script> </script>
<script src="gadget_officejs_jio_travel_request_record_view.js"></script> <script src="gadget_officejs_jio_travel_request_record_view.js"></script>
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>955.52776.55364.53777</string> </value> <value> <string>956.38978.20050.22596</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1481299568.88</float> <float>1484301861.21</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -178,6 +178,7 @@ ...@@ -178,6 +178,7 @@
} else { } else {
not_sync_checked = 'checked'; not_sync_checked = 'checked';
} }
ops = { ops = {
select_options: select_options, select_options: select_options,
title: options.doc.title, title: options.doc.title,
...@@ -198,8 +199,19 @@ ...@@ -198,8 +199,19 @@
return template(ops); return template(ops);
}) })
.push(function (html) { .push(function (html) {
var discussion_div;
gadget.props.element.innerHTML = html; gadget.props.element.innerHTML = html;
discussion_div = gadget.props.element.querySelector('.discussion');
return gadget.declareGadget('gadget_officejs_jio_text_post.html', {element: discussion_div})
.push(function (discussion_gadget) {
options.page = 'travel_request_record_list';
if (["Closed", "Suspended"].indexOf(options.doc.state) !== -1) {
options.can_add_discussion = true;
}
return discussion_gadget.render(options);
});
})
.push(function () {
return gadget.updateHeader({ return gadget.updateHeader({
title: gadget.options.jio_key + " " + (gadget.options.doc.record_revision || 1), title: gadget.options.jio_key + " " + (gadget.options.doc.record_revision || 1),
save_action: sync_state === 'Synced'? false: true save_action: sync_state === 'Synced'? false: true
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.15594.34393.18107</string> </value> <value> <string>956.40024.39635.59818</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1482836213.38</float> <float>1484301994.5</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -200,6 +200,26 @@ ...@@ -200,6 +200,26 @@
<value> <string>string</string> </value> <value> <string>string</string> </value>
</item> </item>
</dictionary> </dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_login</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_logout</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -247,6 +267,14 @@ ...@@ -247,6 +267,14 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>configuration_login</string> </key>
<value> <string>connection/login_form{?came_from}</string> </value>
</item>
<item>
<key> <string>configuration_logout</string> </key>
<value> <string>connection/WebSite_logout{?came_from}</string> </value>
</item>
<item> <item>
<key> <string>container_layout</string> </key> <key> <string>container_layout</string> </key>
<value> <string>ERP5Document_getHateoas</string> </value> <value> <string>ERP5Document_getHateoas</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_comment_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_comment_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import json
portal = context.getPortalObject() portal = context.getPortalObject()
record = context record = context
def byteify(string):
if isinstance(string, dict):
tmp = {}
for key, value in string.iteritems():
tmp[byteify(key)] = byteify(value)
return tmp
elif isinstance(string, list):
return [byteify(element) for element in string]
elif isinstance(string, unicode):
return string.encode('utf-8')
else:
return string
if record.getDestinationReference() is not None: if record.getDestinationReference() is not None:
ticket_brain_list = portal.portal_catalog( ticket_brain_list = portal.portal_catalog(
portal_type="Expense Validation Request", portal_type="Expense Validation Request",
...@@ -16,6 +30,8 @@ else: ...@@ -16,6 +30,8 @@ else:
follow_up_ticket_type="Expense Validation Request", follow_up_ticket_type="Expense Validation Request",
) )
ticket = record.getFollowUpValue() ticket = record.getFollowUpValue()
if portal.portal_workflow.isTransitionPossible(ticket, 'validate'):
ticket.validate()
record.setDestinationReference(ticket.getReference()) record.setDestinationReference(ticket.getReference())
record.setFollowUpValue(ticket) record.setFollowUpValue(ticket)
...@@ -26,6 +42,17 @@ if related_mission_url: ...@@ -26,6 +42,17 @@ if related_mission_url:
source_project_url = travel_request.getFollowUp() source_project_url = travel_request.getFollowUp()
else: else:
source_project_url = "" source_project_url = ""
new_transition_comment = record.getTransitionComment()
if new_transition_comment is not None:
new_transition_comment = byteify(json.loads(new_transition_comment))
old_transition_comment = byteify(json.loads(ticket.Ticket_generateTransitionAndCommentList(listbox_view=False)))
for attr in new_transition_comment:
if attr not in old_transition_comment:
context.log(new_transition_comment)
context.log(old_transition_comment)
if portal.portal_workflow.isTransitionPossible(ticket, 'validate'):
ticket.validate(comment=new_transition_comment[attr]['comment'], actor=new_transition_comment[attr]['actor'])
ticket.edit( ticket.edit(
title=record.getTitle(), title=record.getTitle(),
resource=record.getType(), resource=record.getType(),
......
...@@ -96,6 +96,8 @@ ...@@ -96,6 +96,8 @@
<string>my_related_mission</string> <string>my_related_mission</string>
<string>my_type</string> <string>my_type</string>
<string>my_type_title</string> <string>my_type_title</string>
<string>my_transition_comment</string>
<string>my_destination_reference</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -11,10 +11,17 @@ if not record_relative_url: ...@@ -11,10 +11,17 @@ if not record_relative_url:
elif len(record_brain_list) == 0: elif len(record_brain_list) == 0:
return return
record= record_brain_list[0].getObject() record= record_brain_list[0].getObject()
#XXX Record_archivePreviousVersions deliver this record, but may not index yet
if record.getSimulationState() != 'stopped':
return
# XXX to be finished # XXX to be finished
else: else:
record = portal.restrictedTraverse(record_relative_url) record = portal.restrictedTraverse(record_relative_url)
new_record = record.Base_createCloneDocument(batch_mode=True) new_record = record.Base_createCloneDocument(batch_mode=True)
new_record.edit( new_record.edit(
title=context.getTitle(), title=context.getTitle(),
...@@ -32,6 +39,6 @@ new_record.edit( ...@@ -32,6 +39,6 @@ new_record.edit(
type_title=context.getResourceTitle(), type_title=context.getResourceTitle(),
) )
new_record.setPhotoData(None) new_record.setPhotoData(None)
new_record.setTransitionComment(context.Ticket_generateTransitionAndCommentList(listbox_view=False))
new_record.stop() new_record.stop()
new_record.Record_archivePreviousVersions() new_record.Record_archivePreviousVersions()
import json
portal = context.getPortalObject() portal = context.getPortalObject()
record = context record = context
def byteify(string):
if isinstance(string, dict):
tmp = {}
for key, value in string.iteritems():
tmp[byteify(key)] = byteify(value)
return tmp
elif isinstance(string, list):
return [byteify(element) for element in string]
elif isinstance(string, unicode):
return string.encode('utf-8')
else:
return string
if record.getDestinationReference() is not None: if record.getDestinationReference() is not None:
ticket_brain_list = portal.portal_catalog( ticket_brain_list = portal.portal_catalog(
portal_type="Travel Request", portal_type="Travel Request",
...@@ -16,11 +31,25 @@ else: ...@@ -16,11 +31,25 @@ else:
follow_up_ticket_type="Travel Request", follow_up_ticket_type="Travel Request",
) )
ticket = record.getFollowUpValue() ticket = record.getFollowUpValue()
if portal.portal_workflow.isTransitionPossible(ticket, 'validate'):
ticket.validate()
record.setDestinationReference(ticket.getReference()) record.setDestinationReference(ticket.getReference())
record.setFollowUpValue(ticket) record.setFollowUpValue(ticket)
new_transition_comment = record.getTransitionComment()
if new_transition_comment is not None:
new_transition_comment = byteify(json.loads(new_transition_comment))
old_transition_comment = byteify(json.loads(ticket.Ticket_generateTransitionAndCommentList(listbox_view=False)))
for attr in new_transition_comment:
if attr not in old_transition_comment:
context.log(new_transition_comment)
context.log(old_transition_comment)
if portal.portal_workflow.isTransitionPossible(ticket, 'validate'):
ticket.validate(comment=new_transition_comment[attr]['comment'], actor=new_transition_comment[attr]['actor'])
ticket.edit( ticket.edit(
title=record.getTitle(), title=record.getTitle(),
resource=record.getResource(), resource=record.getResource(),
......
...@@ -92,6 +92,8 @@ ...@@ -92,6 +92,8 @@
<string>my_site</string> <string>my_site</string>
<string>my_destination_node_title</string> <string>my_destination_node_title</string>
<string>your_state</string> <string>your_state</string>
<string>my_transition_comment</string>
<string>my_destination_reference</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -11,6 +11,9 @@ if not record_relative_url: ...@@ -11,6 +11,9 @@ if not record_relative_url:
elif len(record_brain_list) == 0: elif len(record_brain_list) == 0:
return return
record= record_brain_list[0].getObject() record= record_brain_list[0].getObject()
#XXX Record_archivePreviousVersions deliver this record, but may not index yet
if record.getSimulationState() != 'stopped':
return
# XXX to be finished # XXX to be finished
else: else:
record = portal.restrictedTraverse(record_relative_url) record = portal.restrictedTraverse(record_relative_url)
...@@ -30,4 +33,5 @@ new_record.edit( ...@@ -30,4 +33,5 @@ new_record.edit(
) )
new_record.stop() new_record.stop()
new_record.setTransitionComment(context.Ticket_generateTransitionAndCommentList(listbox_view=False))
new_record.Record_archivePreviousVersions() new_record.Record_archivePreviousVersions()
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<key> <string>bottom</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list> <list>
<string>listbox</string> <string>listbox_comment</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
<string>my_source_project_title</string> <string>my_source_project_title</string>
<string>my_destination_title</string> <string>my_destination_title</string>
<string>my_assessment_form_id</string> <string>my_assessment_form_id</string>
<string>listbox_comment_time</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>columns</string>
<string>count_method</string>
<string>description</string>
<string>editable</string>
<string>editable_columns</string>
<string>list_method</string>
<string>portal_types</string>
<string>sort</string>
<string>title</string>
<string>url_columns</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_comment</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>actor</string>
<string>Actor</string>
</tuple>
<tuple>
<string>time</string>
<string>Time</string>
</tuple>
<tuple>
<string>comment</string>
<string>Comment</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>count_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>time</string>
<string>ASC</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
<list>
<tuple>
<string>actor</string>
<string></string>
</tuple>
<tuple>
<string>time</string>
<string></string>
</tuple>
<tuple>
<string>comment</string>
<string></string>
</tuple>
</list>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Ticket_generateTransitionAndCommentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>date_only</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_comment_time</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>date_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Time</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import json
transition_comment = {}
transition_comment_list = []
index = 0
item_list = context.Base_getWorkflowHistoryItemList(workflow_id = workflow_id)
for i in item_list:
comment = getattr(i, 'comment')
if comment:
action = getattr(i, 'action')
if action in ('Ask Question Action','Close Ticket Action','Open Ticket Action','Accept Ticket Acction', 'Open Ticket'):
if listbox_view:
transition_comment_list.append(i)
else:
transition_comment[index] = {
'actor': getattr(i, 'actor'),
'time': getattr(i, 'time').Date().replace('/','-'),
'comment': comment
}
index += 1
if listbox_view:
return transition_comment_list
return json.dumps(transition_comment)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>workflow_id = \'ticket_acceptance_simulation_workflow\', listbox_view=\'true\', **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Ticket_generateTransitionAndCommentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Workflow_statusModify</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>your_comment</string>
<string>your_workflow_action</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Ticket_viewWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Base_viewWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate Workflow Action</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -74,7 +74,9 @@ ...@@ -74,7 +74,9 @@
<item> <item>
<key> <string>bottom</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list/> <list>
<string>listbox_comment</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -94,6 +96,7 @@ ...@@ -94,6 +96,7 @@
<string>my_price</string> <string>my_price</string>
<string>my_price_currency</string> <string>my_price_currency</string>
<string>my_total_price</string> <string>my_total_price</string>
<string>listbox_comment_time</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>columns</string>
<string>count_method</string>
<string>description</string>
<string>editable</string>
<string>editable_columns</string>
<string>list_method</string>
<string>portal_types</string>
<string>sort</string>
<string>title</string>
<string>url_columns</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_comment</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>actor</string>
<string>Actor</string>
</tuple>
<tuple>
<string>time</string>
<string>Time</string>
</tuple>
<tuple>
<string>comment</string>
<string>Comment</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>count_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>time</string>
<string>ASC</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
<list>
<tuple>
<string>actor</string>
<string></string>
</tuple>
<tuple>
<string>time</string>
<string></string>
</tuple>
<tuple>
<string>comment</string>
<string></string>
</tuple>
</list>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Ticket_generateTransitionAndCommentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>date_only</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_comment_time</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>date_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Time</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -10,13 +10,17 @@ ...@@ -10,13 +10,17 @@
<key> <string>actbox_category</string> </key> <key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value> <value> <string>workflow</string> </value>
</item> </item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Close Ticket</string> </value> <value> <string>Close Ticket</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=invalidate_action</string> </value> <value> <string>%(content_url)s/Ticket_viewWorkflowActionDialog?workflow_action=invalidate_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
...@@ -57,10 +61,7 @@ ...@@ -57,10 +61,7 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple>
<global name="Guard" module="Products.DCWorkflow.Guard"/> <global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Suspend Ticket</string> </value> <value> <string>Ask Question</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=suspend_action</string> </value> <value> <string>%(content_url)s/Ticket_viewWorkflowActionDialog?workflow_action=suspend_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Suspend Ticket Action</string> </value> <value> <string>Ask Question Action</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -56,6 +56,12 @@ ...@@ -56,6 +56,12 @@
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
<value> <int>2</int> </value> <value> <int>2</int> </value>
</item> </item>
<item>
<key> <string>var_exprs</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
...@@ -76,4 +82,39 @@ ...@@ -76,4 +82,39 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>actor</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'actor\') if state_change.kwargs.get(\'actor\') else user.getIdOrUserName()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -10,6 +10,7 @@ Expense Validation Request | view ...@@ -10,6 +10,7 @@ Expense Validation Request | view
Leave Request Record | jio_view Leave Request Record | jio_view
Leave Request Record | view Leave Request Record | view
Leave Request | records Leave Request | records
Person | jio_view
Record Module | view Record Module | view
Service | jio_view Service | jio_view
System Preference | hr_preference System Preference | hr_preference
......
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