# HG changeset patch # User Sylvain Thénault <sylvain.thenault@logilab.fr> # Date 1297335386 -3600 # Thu Feb 10 11:56:26 2011 +0100 # Branch stable # Node ID efe4197be8e198f2e66d66d3b1714071119f91cc # Parent 6f326f9908bd375725287b703693d68901b0d4e5 cw 3.10 api updates diff --git a/entities.py b/entities.py --- a/entities.py +++ b/entities.py @@ -7,7 +7,7 @@ @property def workcase(self): rql = 'Any R WHERE E has_lines EL, EL eid %(el)s, E spent_for W, W ref R' - rset = self._cw.execute(rql, {'el': self.eid}, 'el') + rset = self._cw.execute(rql, {'el': self.eid}) if rset: return rset[0][0] return None diff --git a/views/accounting.py b/views/accounting.py --- a/views/accounting.py +++ b/views/accounting.py @@ -9,13 +9,13 @@ from logilab.mtconverter import xml_escape -from cubicweb.selectors import implements +from cubicweb.selectors import is_instance from cubicweb.view import EntityView class ExpenseAccountingXmlView(EntityView): __regid__ = 'accexpense' - __select__ = implements('Expense') + __select__ = is_instance('Expense') title = _('accounting entry view') templatable = False @@ -41,7 +41,7 @@ class ExpenseLineAccountingEntryXmlView(EntityView): __regid__ = 'accentry' - __select__ = implements('ExpenseLine',) + __select__ = is_instance('ExpenseLine',) title = _('accounting entry view') templatable = False diff --git a/views/actions.py b/views/actions.py --- a/views/actions.py +++ b/views/actions.py @@ -6,12 +6,12 @@ """ __docformat__ = "restructuredtext en" -from cubicweb.selectors import implements +from cubicweb.selectors import is_instance from cubicweb.web.action import Action class AccountingAction(Action): __regid__ = 'accaction' - __select__ = implements('Expense') + __select__ = is_instance('Expense') title = _('generate accounting entries') def url(self):