Fix report trial_balance sum total balance detailed
This commit is contained in:
parent
f056be754a
commit
c63f7a85a3
|
@ -1933,6 +1933,8 @@ class TrialBalanceClassic(Report):
|
|||
report_context['company'] = company
|
||||
report_context['digits'] = company.currency.digits
|
||||
report_context['sumto'] = lambda accounts, field: cls.sumto(accounts, field)
|
||||
report_context['type_balance'] = data['detailed']
|
||||
print('----', data['detailed'])
|
||||
return report_context
|
||||
|
||||
@classmethod
|
||||
|
@ -1961,7 +1963,6 @@ class TrialBalanceClassic(Report):
|
|||
credit = [in_account.credit]
|
||||
end_balance = [end_account.balance]
|
||||
|
||||
|
||||
def sum_amount_to_parent(acc):
|
||||
try:
|
||||
dict_accounts[acc.parent]['debit'].extend(debit)
|
||||
|
|
10
purchase.py
10
purchase.py
|
@ -51,6 +51,16 @@ class Purchase(metaclass=PoolMeta):
|
|||
res.append(purchase)
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
def process(cls, purchases):
|
||||
Invoice = Pool().get('account.invoice')
|
||||
for purchase in purchases:
|
||||
super(Purchase, cls).process(purchases)
|
||||
reference = purchase.reference
|
||||
for invoice in purchase.invoices:
|
||||
Invoice.write([invoice], {'reference': reference})
|
||||
|
||||
@classmethod
|
||||
def post_invoices(cls, purchases):
|
||||
Invoice = Pool().get('account.invoice')
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue