- Timestamp:
- 11 Feb 2015, 11:59:34 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/products/product.py
r12397 r12592 22 22 from time import time 23 23 from grok import index 24 from datetime import date 24 25 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 25 26 from zope.event import notify … … 62 63 return self.contract_title 63 64 return self.title 65 66 @property 67 def active(self): 68 now = date.today() 69 return (not self.valid_from or self.valid_from <= now) and \ 70 (not self.valid_to or self.valid_to >= now) 64 71 65 72 Product = attrs_to_fields(Product)
Note: See TracChangeset for help on using the changeset viewer.