Commit 56c530c3 authored by Rafael Monnerat's avatar Rafael Monnerat

bt5: Fixup import of DateUtils

parent 60eca4b9
......@@ -2,7 +2,7 @@ if params is None:
params = {}
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
from Products.ZSQLCatalog.SQLCatalog import Query
def getAccountingDate(accounting_date):
......
......@@ -2,7 +2,7 @@ from zExceptions import Unauthorized
if REQUEST is not None:
raise Unauthorized
from Products.ERP5Type.DateUtils import addToDate, getClosestDate
from erp5.component.module.DateUtils import addToDate, getClosestDate
hosting_subscription = context
portal = context.getPortalObject()
......
......@@ -2,7 +2,7 @@ from zExceptions import Unauthorized
if REQUEST is not None:
raise Unauthorized
from Products.ERP5Type.DateUtils import addToDate, getClosestDate
from erp5.component.module.DateUtils import addToDate, getClosestDate
hosting_subscription = context
portal = context.getPortalObject()
......
from Products.ERP5Type.DateUtils import addToDate, getClosestDate
from erp5.component.module.DateUtils import addToDate, getClosestDate
from DateTime import DateTime
portal = context.getPortalObject()
......
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
from Products.ZSQLCatalog.SQLCatalog import Query
from DateTime import DateTime
......
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
from DateTime import DateTime
from Products.ZSQLCatalog.SQLCatalog import Query
......
......@@ -14,7 +14,7 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbo
import os
import tempfile
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate, getClosestDate
from erp5.component.module.DateUtils import addToDate, getClosestDate
from zExceptions import Unauthorized
class Simulator:
......
......@@ -7,7 +7,7 @@
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbort
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
from erp5.component.document.SimulationMovement import SimulationMovement
import transaction
......
from Products.ERP5Type.DateUtils import addToDate, getClosestDate
from erp5.component.module.DateUtils import addToDate, getClosestDate
hosting_subscription = state_change['object']
edit_kw = {}
......
from zExceptions import Unauthorized
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
if REQUEST is not None:
raise Unauthorized
......
......@@ -6,7 +6,7 @@ import json
import time
from zExceptions import Unauthorized
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
from App.Common import rfc1123_date
class TestSlapOSCoreSlapOSAssertHostingSubscriptionPredecessorAlarm(
......
from DateTime import DateTime
# from Products.ERP5Type.DateUtils import addToDate
# from erp5.component.module.DateUtils import addToDate
# from Products.ZSQLCatalog.SQLCatalog import Query
portal = context.getPortalObject()
......
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
hosting_subscription = context
portal = context.getPortalObject()
......
from Products.ERP5Type.DateUtils import addToDate
from erp5.component.module.DateUtils import addToDate
from Products.ZSQLCatalog.SQLCatalog import Query
from DateTime import DateTime
......
......@@ -452,7 +452,7 @@ class TestSlapOSPayzenEvent_processUpdate(SlapOSTestCaseMixinWithAbort):
script_name,
'*args, **kwargs',
'# Script body\n'
"""from Products.ERP5Type.DateUtils import addToDate
"""from erp5.component.module.DateUtils import addToDate
return addToDate(DateTime(), to_add={'day': -1, 'second': -1}).toZone('UTC'), 'foo'""")
def _dropPaymentTransaction_getPayzenId(self):
......
......@@ -443,7 +443,7 @@ class TestSlapOSWechatEvent_processUpdate(SlapOSTestCaseMixinWithAbort):
script_name,
'*args, **kwargs',
'# Script body\n'
"""from Products.ERP5Type.DateUtils import addToDate
"""from erp5.component.module.DateUtils import addToDate
return addToDate(DateTime(), to_add={'day': -1, 'second': -1}).toZone('UTC'), 'foo'""")
def _dropPaymentTransaction_getWechatId(self):
......
......@@ -51,7 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ERP5Type.DateUtils import atTheEndOfPeriod\n
from erp5.component.module.DateUtils import atTheEndOfPeriod\n
request = container.REQUEST\n
portal = context.getPortalObject()\n
from_date = request.get(\'from_date\', None)\n
......
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