Commit a99c7db3 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_officejs_appstore_base: Various improvment for ERP5JS compatibility

parent a7588514
...@@ -49,5 +49,8 @@ if software_product: ...@@ -49,5 +49,8 @@ if software_product:
return software_publication.SoftwarePublication_attachSoftwareProduct(relative_url=software_product) return software_publication.SoftwarePublication_attachSoftwareProduct(relative_url=software_product)
return software_publication.Base_redirect( return software_publication.Base_redirect(
'SoftwarePublication_attachSoftwareProductDialog', '',
keep_items= {
"portal_status_message": portal.Base_translateString("Please create a software Product using the action")
}
) )
...@@ -91,7 +91,9 @@ ...@@ -91,7 +91,9 @@
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list/> <list>
<string>listbox_modification_date</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -195,14 +195,6 @@ ...@@ -195,14 +195,6 @@
<string>resource_title</string> <string>resource_title</string>
<string>Type</string> <string>Type</string>
</tuple> </tuple>
<tuple>
<string>destination_section_title</string>
<string>Client</string>
</tuple>
<tuple>
<string>destination_decision_title</string>
<string>Requester</string>
</tuple>
<tuple> <tuple>
<string>source_section_title</string> <string>source_section_title</string>
<string>Supplier</string> <string>Supplier</string>
...@@ -223,6 +215,10 @@ ...@@ -223,6 +215,10 @@
<string>translated_simulation_state_title</string> <string>translated_simulation_state_title</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
...@@ -362,12 +358,7 @@ ...@@ -362,12 +358,7 @@
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>modification_date</string>
<string>descending</string>
</tuple>
</list>
</value> </value>
</item> </item>
<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>date_only</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_modification_date</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>
</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>
</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>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>title="", description="", relative_url=""</string> </value> <value> <string>title="", description="", relative_url="", **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
software_publication_line_list = context.objectValues(portal_type="Software Publication Line")
if len(software_publication_line_list) == 0:
return
software_publication_line = software_publication_line_list[0]
software_release = software_publication_line.getAggregateValue(portal_type="Software Release")
software_product = software_publication_line.getResourceValue(portal_type="Software Product")
if not software_product or not software_release:
return
software_release_version = software_release.getReference()
#if as_link:
# return '<a href="%(link)s">%(link)s</a>' % {"link": (software_product.getFollowUpValue(portal_type="Web Site")[software_release_version].absolute_url() + "/")}
return software_product.getFollowUpValue(portal_type="Web Site")[software_release_version].absolute_url() + "/"
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>as_link=True</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SoftwarePublication_jumpToRelatedWebSection</string> </value> <value> <string>SoftwarePublication_getTestUrl</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
software_publication_line = context.objectValues(portal_type="Software Publication Line")[0]
software_release_version = software_publication_line.getAggregateValue(portal_type="Software Release").getReference()
web_section = software_publication_line.getResourceValue().getFollowUpValue(portal_type="Web Site")[software_release_version]
return context.REQUEST.RESPONSE.redirect(
web_section.absolute_url() + "/",
)
...@@ -90,5 +90,6 @@ software_release.activate(after_tag=tag, tag=tag + "_2").SoftwareRelease_fixRela ...@@ -90,5 +90,6 @@ software_release.activate(after_tag=tag, tag=tag + "_2").SoftwareRelease_fixRela
if portal.portal_workflow.isTransitionPossible(zip_file, 'submit'): if portal.portal_workflow.isTransitionPossible(zip_file, 'submit'):
zip_file.submit() zip_file.submit()
software_release.submit() if portal.portal_workflow.isTransitionPossible(software_release, 'submit'):
software_release.submit()
software_publication.activate(after_tag=tag + "_2").submit() software_publication.activate(after_tag=tag + "_2").submit()
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