pax_global_header 0000666 0000000 0000000 00000000064 12011157173 0014510 g ustar 00root root 0000000 0000000 52 comment=0280f02ae684f9dad3cf665c5ac00cc7489b8738
erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/ 0000775 0000000 0000000 00000000000 12011157173 0025221 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/ 0000775 0000000 0000000 00000000000 12011157173 0025713 5 ustar 00root root 0000000 0000000 erp5_tiosafe_magento_test/ 0000775 0000000 0000000 00000000000 12011157173 0032772 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5 ActionTemplateItem/ 0000775 0000000 0000000 00000000000 12011157173 0036522 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test portal_types/ 0000775 0000000 0000000 00000000000 12011157173 0041247 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem Magento%20Test%20Module/ 0000775 0000000 0000000 00000000000 12011157173 0045265 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types Magento%20Test%20Module/view.xml 0000664 0000000 0000000 00000004733 12011157173 0046770 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types
-
action
AAAAAAAAAAI=
-
categories
action_type/object_list
-
category
object_list
-
condition
-
description
-
icon
-
id
view
-
permissions
View
-
portal_type
Action Information
-
priority
1.0
-
title
View
-
visible
1
-
text
string:${object_url}/MagentoTestModule_viewMagentoTestObjectList
Magento%20Test%20Person/ 0000775 0000000 0000000 00000000000 12011157173 0045306 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types Magento%20Test%20Person/view.xml 0000664 0000000 0000000 00000004666 12011157173 0047016 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types
-
action
AAAAAAAAAAI=
-
categories
action_type/object_view
-
category
object_view
-
condition
-
description
-
icon
-
id
view
-
permissions
View
-
portal_type
Action Information
-
priority
1.0
-
title
View
-
visible
1
-
text
string:${object_url}/MagentoTestPerson_view
Magento%20Test%20Product/ 0000775 0000000 0000000 00000000000 12011157173 0045460 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types Magento%20Test%20Product/view.xml 0000664 0000000 0000000 00000004704 12011157173 0047161 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types
-
action
AAAAAAAAAAI=
-
categories
action_type/object_view
-
category
object_view
-
condition
-
description
-
icon
-
id
view
-
permissions
View
-
portal_type
Action Information
-
priority
1.0
-
title
1
-
visible
1
-
text
string:${object_url}/MagentoTestProduct_view
Magento%20Test%20Sale%20Order%20Item/ 0000775 0000000 0000000 00000000000 12011157173 0047155 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types Magento%20Test%20Sale%20Order%20Item/view.xml 0000664 0000000 0000000 00000004712 12011157173 0050655 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types
-
action
AAAAAAAAAAI=
-
categories
action_type/object_view
-
category
object_view
-
condition
-
description
-
icon
-
id
view
-
permissions
View
-
portal_type
Action Information
-
priority
1.0
-
title
1
-
visible
1
-
text
string:${object_url}/MagentoTestSaleOrderItem_view
Magento%20Test%20Sale%20Order/ 0000775 0000000 0000000 00000000000 12011157173 0046127 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types Magento%20Test%20Sale%20Order/view.xml 0000664 0000000 0000000 00000004706 12011157173 0047632 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ActionTemplateItem/portal_types
-
action
AAAAAAAAAAI=
-
categories
action_type/object_view
-
category
object_view
-
condition
-
description
-
icon
-
id
view
-
permissions
View
-
portal_type
Action Information
-
priority
1.0
-
title
1
-
visible
1
-
text
string:${object_url}/MagentoTestSaleOrder_view
ExtensionTemplateItem/ 0000775 0000000 0000000 00000000000 12011157173 0037261 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test MagentoTest.py 0000664 0000000 0000000 00000011763 12011157173 0042075 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ExtensionTemplateItem ##############################################################################
#
# Copyright (c) 2002-2010 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from lxml import etree
from cStringIO import StringIO
from zLOG import LOG, ERROR
from Acquisition import aq_base
import transaction
from DateTime import DateTime
class MagentoTestConnector:
def __init__(self):
"""
"""
from Products.ERP5.ERP5Site import getSite
self.context = getSite()
def generateResultHeader(self):
# generate xml
root = etree.Element("DataResultService")
# Header part
status_code = etree.SubElement(root, "StatusCode")
status_code.text = "200"
status_subcode = etree.SubElement(root, "StatusSubCode")
status_subcode = "0"
etree.SubElement(root, "ErrorDetails")
return root
def getPropertySheetDefinitionList(self, object):
from Products.ERP5Type import interfaces, Constraint, Permissions, PropertySheet
prop_list = []
for property_sheet_name in object.getTypeInfo().getTypePropertySheetList():
if "Magento" in property_sheet_name:
base = getattr(PropertySheet, property_sheet_name, None)
if base is not None:
prop_list = [x['id'] for x in base._properties]
return prop_list
def UserGetList(self, *args, **kw):
person_list = self.context.getPortalObject().magento_test_module.searchFolder(portal_type="Magento Test Person",
validation_state='validated')
result_list = []
for person in person_list:
person = person.getObject()
userInfo = {}
userInfo["customer_id"] = person.getId().decode('utf-8')
userInfo["firstname"] = person.getFirstname().decode('utf-8')
userInfo["lastname"] = person.getLastname().decode('utf-8')
userInfo["email"] = person.getEmail().decode('utf-8')
result_list.append(userInfo)
return "", result_list
def UserGet(self, *args, **kw):
if not kw.has_key('customer_id'):
raise ValueError, "No customer_id in the arguments, got %s / %s" %(args, kw)
customer_id = kw['customer_id']
person_list = self.context.getPortalObject().magento_test_module.searchFolder(reference=customer_id,
portal_type="Magento Test Person",
validation_state='validated')
if len(person_list) != 1:
raise KeyError, "Error retrieving user with ID %s" %(customer_id,)
else:
person = person_list[0].getObject()
result_list = []
user_info = {}
user_info["customer_id"] = person.getId().decode('utf-8')
user_info["firstname"] = person.getFirstname().decode('utf-8')
user_info["lastname"] = person.getLastname().decode('utf-8')
user_info["email"] = person.getEmail().decode('utf-8')
result_list.append(user_info)
return "", result_list
def UserUpdate(self, *args, **kw):
if not kw.has_key('customer_id'):
raise ValueError, "No customer_id int the paramaters, got %s / %s" %(args, kw)
customer_id = kw['customer_id']
person_list = self.context.getPortalObject().magento_test_module.searchFolder(reference=user_id,
portal_type="Magento Test Person")
if len(person_list) != 1:
raise KeyError, "Error retrieving person with ID %s" %(customer_id)
else:
person = person_list[0].getObject()
context = etree.iterparse(StringIO(kw['data']), events=('end',))
person_dict = {}
for k,v in kw.iteritems():
person_dict[k] = v
LOG("editing person %s with %s" %(person.getPath(), person_dict,), 300, "\n")
person.edit(**person_dict)
transaction.commit()
# Return default xml
return "", []
ModuleTemplateItem/ 0000775 0000000 0000000 00000000000 12011157173 0036532 5 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test magento_test_module.xml 0000664 0000000 0000000 00000004541 12011157173 0043316 0 ustar 00root root 0000000 0000000 erp5-0280f02ae684f9dad3cf665c5ac00cc7489b8738-bt5-erp5_tiosafe_magento_test/bt5/erp5_tiosafe_magento_test/ModuleTemplateItem
magento_test_module
Access Transient Objects
Assignee
Assignor
Associate
Auditor
Author
Manager
Access contents information
Assignee
Assignor
Associate
Auditor
Author
Manager
Access session data
Assignee
Assignor
Associate
Auditor
Author
Manager
Add portal content
Assignor
Author
Manager
Add portal folders
Assignor
Author
Manager
Change local roles
Assignor
Manager
Copy or Move
Assignee
Assignor
Associate
Auditor
Author
Manager
Delete objects
Assignor
Manager
List folder contents
Assignee
Assignor
Associate
Auditor
Author
Manager
Modify portal content
Assignor
Manager
View
Assignee
Assignor
Associate
Auditor
Manager
View History
Assignee
Assignor
Associate
Auditor
Author
Manager
Magento Test Module
Magento Tests