Commit 990e43d4 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_maileva_connector: Fix up naming convention

   The script is supposed to be called on portal context (or any context) and not on MailevaSOAPConnector, and it should return a MailevaSOAPConnector for a given reference.
parent 024bc40e
portal = context.getPortalObject()
maileva_connector = context.MailevaSOAPConnector_getAvailableConnector()
maileva_connector = portal.ERP5Site_getAvailableMailevaSOAPConnector()
notification_dict = maileva_connector.checkPendingNotifications()
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>MailevaSOAPConnector_getAvailableConnector</string> </value>
<value> <string>ERP5Site_getAvailableMailevaSOAPConnector</string> </value>
</item>
</dictionary>
</pickle>
......
maileva_connector = context.MailevaSOAPConnector_getAvailableConnector()
maileva_connector = context.getPortalObject().ERP5Site_getAvailableMailevaSOAPConnector()
result = maileva_connector.getPendingNotificationDetails(track_id)
if result['status'] == "SENT":
document = context.getFollowUpValue()
......
......@@ -4,7 +4,7 @@ now = DateTime()
portal = context.getPortalObject()
# Do some check here
maileva_connector = context.MailevaSOAPConnector_getAvailableConnector()
maileva_connector = portal.ERP5Site_getAvailableMailevaSOAPConnector()
today = now.toZone('UTC').asdatetime().strftime('%Y-%m-%d')
number = str(portal.portal_ids.generateNewId(
......
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