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