[FIX] account: Bank statements from invoices
bzr revid: mra@mra-laptop-20100802122158-5hswbx69avy7as1t
This commit is contained in:
committed by
Mustufa Rangwala
parent
32392534dc
commit
119964f10e
@@ -34,21 +34,23 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
}
|
||||
|
||||
def populate_statement(self, cr, uid, ids, context=None):
|
||||
|
||||
|
||||
statement_id = context.get('statement_id', False)
|
||||
if not statement_id:
|
||||
return {}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
line_ids = data['line_ids']
|
||||
if not line_ids:
|
||||
return {}
|
||||
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
statement_obj = self.pool.get('account.bank.statement')
|
||||
statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
|
||||
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
line_ids = data['line_ids']
|
||||
line_date = time.strftime('%Y-%m-%d')
|
||||
|
||||
if not line_ids:
|
||||
return {}
|
||||
statement_id = 'statement_id' in context and context['statement_id']
|
||||
statement = statement_obj.browse(cr, uid, statement_id, context=context)
|
||||
|
||||
# for each selected move lines
|
||||
for line in line_obj.browse(cr, uid, line_ids, context=context):
|
||||
ctx = context.copy()
|
||||
|
||||
Reference in New Issue
Block a user