Commit 1fdadb53 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_travel_expense: limit number to check

parent 91e832b0
from Products.ZSQLCatalog.SQLCatalog import Query
from erp5.component.module.DateUtils import addToDate
from DateTime import DateTime
portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate(
portal_type="Expense Validation Request",
method_id='ExpenseValidationRequest_createRepresentativeRecord',
creation_date = Query(creation_date=addToDate(DateTime(), to_add={'day': -120}), range="min"),
activate_kw={'tag': tag},
)
context.activate(after_tag=tag).getId()
from Products.ZSQLCatalog.SQLCatalog import Query
from erp5.component.module.DateUtils import addToDate
from DateTime import DateTime
portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate(
portal_type="Leave Request",
method_id='LeaveRequest_createRepresentativeRecord',
creation_date = Query(creation_date=addToDate(DateTime(), to_add={'day': -90}), range="min"),
activate_kw={'tag': tag},
)
context.activate(after_tag=tag).getId()
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