Skip to content
Snippets Groups Projects
Commit efe4197be8e1 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

cw 3.10 api updates

parent 6f326f9908bd
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@property @property
def workcase(self): def workcase(self):
rql = 'Any R WHERE E has_lines EL, EL eid %(el)s, E spent_for W, W ref R' 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: if rset:
return rset[0][0] return rset[0][0]
return None return None
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
from logilab.mtconverter import xml_escape from logilab.mtconverter import xml_escape
from cubicweb.selectors import implements from cubicweb.selectors import is_instance
from cubicweb.view import EntityView from cubicweb.view import EntityView
class ExpenseAccountingXmlView(EntityView): class ExpenseAccountingXmlView(EntityView):
__regid__ = 'accexpense' __regid__ = 'accexpense'
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
from cubicweb.view import EntityView from cubicweb.view import EntityView
class ExpenseAccountingXmlView(EntityView): class ExpenseAccountingXmlView(EntityView):
__regid__ = 'accexpense' __regid__ = 'accexpense'
__select__ = implements('Expense') __select__ = is_instance('Expense')
title = _('accounting entry view') title = _('accounting entry view')
templatable = False templatable = False
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
class ExpenseLineAccountingEntryXmlView(EntityView): class ExpenseLineAccountingEntryXmlView(EntityView):
__regid__ = 'accentry' __regid__ = 'accentry'
__select__ = implements('ExpenseLine',) __select__ = is_instance('ExpenseLine',)
title = _('accounting entry view') title = _('accounting entry view')
templatable = False templatable = False
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
""" """
__docformat__ = "restructuredtext en" __docformat__ = "restructuredtext en"
from cubicweb.selectors import implements from cubicweb.selectors import is_instance
from cubicweb.web.action import Action from cubicweb.web.action import Action
class AccountingAction(Action): class AccountingAction(Action):
__regid__ = 'accaction' __regid__ = 'accaction'
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
from cubicweb.web.action import Action from cubicweb.web.action import Action
class AccountingAction(Action): class AccountingAction(Action):
__regid__ = 'accaction' __regid__ = 'accaction'
__select__ = implements('Expense') __select__ = is_instance('Expense')
title = _('generate accounting entries') title = _('generate accounting entries')
def url(self): def url(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment