define Training inheriting from workcase so they may be linked to expense as well
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 02 Oct 2013 10:15:10 +0200
changeset 69 7ff16dfb9426
parent 67 9931202bb223
child 70 20390f78a8da
define Training inheriting from workcase so they may be linked to expense as well This is weird as Training are defined and used by our internal crm cube, but we've to define it here as well until we've a way to say "import trainings as if they were workcases". Closes #3181451
migration/0.7.0_Any.py
schema.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/migration/0.7.0_Any.py	Wed Oct 02 10:15:10 2013 +0200
@@ -0,0 +1,1 @@
+add_entity_type('Training')
--- a/schema.py	Wed Sep 11 15:24:52 2013 +0200
+++ b/schema.py	Wed Oct 02 10:15:10 2013 +0200
@@ -1,6 +1,10 @@
 # template's specific schema
 from yams.buildobjs import RelationDefinition
 from cubicweb.schema import RRQLExpression
+from cubes.workcase.schema import Workcase
+
+class Training(Workcase):
+    __specializes_schema__ = True
 
 class spent_for(RelationDefinition):
     subject = 'Expense'