Commit ab19779b 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 29774d66
portal = context.getPortalObject() portal = context.getPortalObject()
maileva_connector = context.MailevaSOAPConnector_getAvailableConnector() maileva_connector = portal.ERP5Site_getAvailableMailevaSOAPConnector()
notification_dict = maileva_connector.checkPendingNotifications() notification_dict = maileva_connector.checkPendingNotifications()
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>MailevaSOAPConnector_getAvailableConnector</string> </value> <value> <string>ERP5Site_getAvailableMailevaSOAPConnector</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
maileva_connector = context.MailevaSOAPConnector_getAvailableConnector() maileva_connector = context.getPortalObject().ERP5Site_getAvailableMailevaSOAPConnector()
result = maileva_connector.getPendingNotificationDetails(track_id) result = maileva_connector.getPendingNotificationDetails(track_id)
if result['status'] == "SENT": if result['status'] == "SENT":
document = context.getFollowUpValue() document = context.getFollowUpValue()
......
...@@ -4,7 +4,7 @@ now = DateTime() ...@@ -4,7 +4,7 @@ now = DateTime()
portal = context.getPortalObject() portal = context.getPortalObject()
# Do some check here # Do some check here
maileva_connector = context.MailevaSOAPConnector_getAvailableConnector() maileva_connector = portal.ERP5Site_getAvailableMailevaSOAPConnector()
today = now.toZone('UTC').asdatetime().strftime('%Y-%m-%d') today = now.toZone('UTC').asdatetime().strftime('%Y-%m-%d')
number = str(portal.portal_ids.generateNewId( 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