# HG changeset patch # User Sylvain Thénault # Date 1302077421 -7200 # Node ID 59d953d8694e1ca02b6a55fda510c49ce68ad856 # Parent c031ea58d5f10803bdf36930ca5b69bc06dc6f01# Parent 5ea2bfd55399ad270082592d6a465f036059aaac backport stable diff -r c031ea58d5f1 -r 59d953d8694e hooks/syncschema.py --- a/hooks/syncschema.py Tue Apr 05 13:24:02 2011 +0200 +++ b/hooks/syncschema.py Wed Apr 06 10:10:21 2011 +0200 @@ -912,6 +912,10 @@ def __call__(self): entity = self.entity if entity.cw_edited.get('final'): + # final entity types don't need a table in the database and are + # systematically added by yams at initialization time so there is no + # need to do further processing. Simply assign its eid. + self._cw.vreg.schema[entity.name].eid = entity.eid return CWETypeAddOp(self._cw, entity=entity) diff -r c031ea58d5f1 -r 59d953d8694e web/views/calendar.py --- a/web/views/calendar.py Tue Apr 05 13:24:02 2011 +0200 +++ b/web/views/calendar.py Wed Apr 06 10:10:21 2011 +0200 @@ -229,15 +229,15 @@ events = [] for entity in self.cw_rset.entities(): icalendarable = entity.cw_adapt_to('ICalendarable') + if not (icalendarable.start and icalendarable.stop): + continue + start_date = icalendarable.start or icalendarable.stop event = {'eid': entity.eid, 'title': entity.view('calendaritem'), 'url': xml_escape(entity.absolute_url()), 'className': 'calevent', 'description': entity.view('tooltip'), } - start_date = icalendarable.start - if not start_date: - start_date = icalendarable.stop event['start'] = start_date.strftime('%Y-%m-%dT%H:%M') event['allDay'] = True if icalendarable.stop: diff -r c031ea58d5f1 -r 59d953d8694e web/views/editcontroller.py --- a/web/views/editcontroller.py Tue Apr 05 13:24:02 2011 +0200 +++ b/web/views/editcontroller.py Wed Apr 06 10:10:21 2011 +0200 @@ -182,7 +182,12 @@ # process inlined relations at the same time as attributes # this will generate less rql queries and might be useful in # a few dark corners - formid = self._cw.form.get('__form_id', 'edition') + if is_main_entity: + formid = self._cw.form.get('__form_id', 'edition') + else: + # XXX inlined forms formid should be saved in a different formparams entry + # inbetween, use cubicweb standard formid for inlined forms + formid = 'edition' form = self._cw.vreg['forms'].select(formid, self._cw, entity=entity) eid = form.actual_eid(entity.eid) form.formvalues = {} # init fields value cache