Commit 2fe2e129 by aagusti

redifine filter compnay in company

1 parent 1837e5f8
...@@ -181,6 +181,12 @@ class ViewCompany(BaseView): ...@@ -181,6 +181,12 @@ class ViewCompany(BaseView):
def view_list(self): def view_list(self):
return super().view_list() return super().view_list()
def filter_company(self, query):
if self.req.user.company_id:
return query.filter(
self.table.id == self.req.user.company_id)
return query
@view_config(route_name='company-act', renderer='json', @view_config(route_name='company-act', renderer='json',
permission='view') permission='view')
def view_act(self): def view_act(self):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!