Browse Source

[ADD] pass through rruleset functions

pull/480/head
Holger Brunn 9 years ago
parent
commit
50eb5c7174
No known key found for this signature in database GPG Key ID: 1C9760FECA3AE18
  1. 2
      field_rrule/README.rst
  2. 12
      field_rrule/field_rrule.py

2
field_rrule/README.rst

@ -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.*`

12
field_rrule/field_rrule.py

@ -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):

Loading…
Cancel
Save