[IMP] Open Invoices - Order accounts, partners and moves on report
parent
7a29c61db3
commit
736ed55535
|
@ -20,6 +20,7 @@ class OpenInvoiceReport(models.AbstractModel):
|
|||
docargs = {
|
||||
'doc_model': 'account.move.line',
|
||||
'doc_ids': doc_ids,
|
||||
'sorted': sorted,
|
||||
}
|
||||
if data:
|
||||
docargs.update(data)
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Informations group by account -->
|
||||
<t t-foreach="data" t-as="account">
|
||||
<t t-foreach="sorted(data.keys())" t-as="account">
|
||||
<t t-set="account_debit" t-value="0.0" />
|
||||
<t t-set="account_credit" t-value="0.0" />
|
||||
<t t-set="account_balance" t-value="0.0" />
|
||||
|
@ -64,7 +64,7 @@
|
|||
<span t-esc="account"/>
|
||||
</div>
|
||||
<!-- Informations group by partner -->
|
||||
<t t-foreach="data[account]" t-as="partner">
|
||||
<t t-foreach="sorted(data[account].keys())" t-as="partner">
|
||||
<t t-set="partner_debit" t-value="0.0" />
|
||||
<t t-set="partner_credit" t-value="0.0" />
|
||||
<t t-set="partner_balance" t-value="0.0" />
|
||||
|
|
|
@ -66,7 +66,6 @@ class OpenInvoiceWizard(models.TransientModel):
|
|||
elif data['result_selection'] == 'supplier':
|
||||
account_type = ('payable', )
|
||||
domain = [
|
||||
('reconciled', '=', False),
|
||||
('company_id', '=', data['company_id'].id),
|
||||
('move_id.date', '<=', data['at_date']),
|
||||
('account_id.user_type_id.type', 'in', account_type)
|
||||
|
@ -100,7 +99,8 @@ class OpenInvoiceWizard(models.TransientModel):
|
|||
@api.multi
|
||||
def print_report(self):
|
||||
self.ensure_one()
|
||||
moves = self.env['account.move.line'].search(self._get_domain(self))
|
||||
moves = self.env['account.move.line'].search(
|
||||
self._get_domain(self), order='date asc')
|
||||
if not moves:
|
||||
return True # ----- Show a message here
|
||||
datas = {}
|
||||
|
|
Loading…
Reference in New Issue