--- a/web/views/actions.py Fri Sep 16 14:01:17 2011 +0200
+++ b/web/views/actions.py Fri Sep 16 17:30:26 2011 +0200
@@ -239,7 +239,7 @@
return self._cw.__('add a %s' % self.rsettype) # generated msgid
def url(self):
- return self._cw.build_url('add/%s' % self.rsettype)
+ return self._cw.vreg["etypes"].etype_class(self.rsettype).cw_create_url(self._cw)
class AddRelatedActions(action.Action):
@@ -310,8 +310,9 @@
yield rschema, teschema, role
def linkto_url(self, entity, rtype, etype, target, **kwargs):
- return self._cw.build_url('add/%s' % etype,
- __linkto='%s:%s:%s' % (rtype, entity.eid, target), **kwargs)
+ return self._cw.vreg["etypes"].etype_class(etype).cw_create_url(
+ self._cw, __linkto='%s:%s:%s' % (rtype, entity.eid, target),
+ **kwargs)
class ViewSameCWEType(action.Action):