Commit 96d6380d authored by Sebastien Robin's avatar Sebastien Robin

modified to support the new erp5_trade business template


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2865 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2e197a06
......@@ -77,27 +77,24 @@ class Test(ERP5TypeTestCase):
ZopeTestCase._print('\n%s ' % message)
LOG('Testing... ',0,message)
def getSalePackingListModule(self):
return getattr(self.getPortal(),'sale_packing_list',None)
def getSaleOrderModule(self):
return getattr(self.getPortal(),'sale_order',None)
return getattr(self.getPortal(),'sale_order_module',None)
def getOrderLine(self):
return self.getSaleOrderModule()['1']['1']
def getPredicate(self):
return self.getSalePackingListModule()['1']
return self.getOrganisationModule()['1']
def createData(self):
# We have no place to put a Predicate, we will put it in a
# Sale Packing List Module
# Organisation Module
portal = self.getPortal()
type_tool = self.getTypeTool()
module_type = type_tool['Sale Packing List Module']
module_type = type_tool['Organisation Module']
module_type.allowed_content_types += ('Predicate Group',)
packing_list_module = self.getSalePackingListModule()
predicate = packing_list_module.newContent(id='1',portal_type='Predicate Group')
organisation_module = self.getOrganisationModule()
predicate = organisation_module.newContent(id='1',portal_type='Predicate Group')
predicate.setCriterion('quantity',identity=None,min=None,max=None)
predicate.immediateReindexObject()
......
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