Commit 6e2eb0d8 authored by Sebastien Robin's avatar Sebastien Robin

Predicate.py

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1805 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 199e46ad
......@@ -44,10 +44,6 @@ class Alarm:
'description' : 'the method used to know if there is a problem',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'alarm_date',
'description' : 'this is the date where we should be prevented',
'type' : 'date',
'mode' : 'w' },
)
_categories = ( 'group', 'site')
......
......@@ -28,30 +28,35 @@
class Periodicity:
"""
A Recurence allows to define an event wich happens periodically.
A Periodicity allows to define an event wich happens periodically.
Here an explanation of wich kind of period we can define:
- Every 2 days:
- set periodicity_day to 2
- Every monday and wednesday
- set periodicity_week to 1
- set periodicity_week_day to ['monday','wednesday']
- Every 10th of every 3 months
- set periodicity_month to 3
- set periodicity_month_day to 10
- Every 2nd Thursday of every 4 months
- set periodicity_month to 4
- set periodicity_month_week to 2
- set periodicity_month_week_day to 'thursday'
"""
_properties = (
{ 'id' : 'peridocity_start_date',
{ 'id' : 'periodicity_start_date',
'description' : 'When this periodic event will start',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'periodicity_stop_date',
'description' : 'When this periodic envent will stop',
'description' : 'When this periodic event will stop',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'reminder_minute',
'description' : 'The time in minute before the begin where we should remind the user',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'reminder_hour',
'description' : 'The time in hours before the begin where we should remind the user',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'reminder_day',
'description' : 'The time in days before the begin where we should remind the user',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_day',
'description' : 'Recur every periodicity days (ex every 2 days)',
'type' : 'int',
......@@ -72,7 +77,16 @@ class Periodicity:
'description' : 'Recur on some days of the month (ex 5th)',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_years',
{ 'id' : 'periodicity_month_week',
'description' : 'On wich (1st, 2nd, 3rd, 4th) month_week_day it will recur',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'periodicity_month_week_day',
'description' : 'The day of the week where it should recur (should be associated with periodicity_month_week),' \
'for example "wednesday"',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'periodicity_year',
'description' : 'Recur every periodicity years (ex every 1 year)',
'type' : 'int',
'mode' : 'w' },
......
......@@ -44,13 +44,15 @@ class Predicate:
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'membership_criterion_base_category',
{ 'id' : 'membership_criterion_base_category', # OR, we check if we have one
# of theses categories
'storage_id' : 'domain_base_category_list', # Compatibility with legacy implementation
'description' : 'The base categories to test',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'multimembership_criterion_base_category',
{ 'id' : 'multimembership_criterion_base_category', # AND, we check we have all
# theses categories
'description' : 'The base categories which allow multiple values and required AND test',
'type' : 'tokens',
'default' : (),
......
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