mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] add filter to list on analytic line linked with a general account analytic journal
This commit is contained in:
@@ -36,10 +36,12 @@ class account_hours_block(report_sxw.rml_parse):
|
|||||||
|
|
||||||
def _get_analytic_lines(self, hours_block):
|
def _get_analytic_lines(self, hours_block):
|
||||||
al_pool = self.pool.get('account.analytic.line')
|
al_pool = self.pool.get('account.analytic.line')
|
||||||
|
aj_pool = self.pool.get('account.analytic.journal')
|
||||||
|
tcj_ids = aj_pool.search(self.cr,self.uid,[('type','=','general')])
|
||||||
al_ids = al_pool.search(
|
al_ids = al_pool.search(
|
||||||
self.cr,
|
self.cr,
|
||||||
self.uid,
|
self.uid,
|
||||||
[('invoice_id', '=', hours_block.invoice_id.id)],
|
[('invoice_id', '=', hours_block.invoice_id.id),('journal_id','in',tcj_ids)],
|
||||||
order='date desc',
|
order='date desc',
|
||||||
context=self.context)
|
context=self.context)
|
||||||
return al_pool.browse(self.cr, self.uid, al_ids, context=self.context)
|
return al_pool.browse(self.cr, self.uid, al_ids, context=self.context)
|
||||||
|
|||||||
Reference in New Issue
Block a user