Browse Source
[ADD] pass through rruleset functions
pull/480/head
Holger Brunn
9 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
2 changed files with
13 additions and
1 deletions
-
field_rrule/README.rst
-
field_rrule/field_rrule.py
|
|
@ -14,7 +14,7 @@ Usage |
|
|
|
To use this module, you need to: |
|
|
|
|
|
|
|
* depend on it |
|
|
|
* say ``from openerp.addons.field_rrule.field_rrule import FieldRRule`` |
|
|
|
* say ``from openerp.addons.field_rrule import FieldRRule`` |
|
|
|
* use ``FieldRRule`` like any other field |
|
|
|
* on forms, use ``widget="rrule"`` |
|
|
|
* have a look at `demo/res_partner.*` |
|
|
|
|
|
@ -70,6 +70,18 @@ class SerializableRRuleSet(rruleset, list): |
|
|
|
def __getslice__(self, i, j): |
|
|
|
return rruleset.__getitem__(self(), slice(i, j)) |
|
|
|
|
|
|
|
def between(self, after, before, inc=False): |
|
|
|
return self().between(after, before, inc=inc) |
|
|
|
|
|
|
|
def after(self, dt, inc=False): |
|
|
|
return self().after(dt, inc=inc) |
|
|
|
|
|
|
|
def before(self, dt, inc=False): |
|
|
|
return self().before(dt, inc=inc) |
|
|
|
|
|
|
|
def count(self): |
|
|
|
return self().count() |
|
|
|
|
|
|
|
|
|
|
|
class FieldRRule(fields.Serialized): |
|
|
|
def convert_to_cache(self, value, record, validate=True): |
|
|
|