mirror of
https://github.com/bringout/odoomates.git
synced 2026-04-18 03:52:00 +02:00
Fix running saldo with previous balance, default reconciled to True
🤖 assisted by claude
This commit is contained in:
parent
e65f2ee0ec
commit
a7dfb5e818
2 changed files with 5 additions and 1 deletions
|
|
@ -29,6 +29,10 @@ class ReportPartnerLedger(models.AbstractModel):
|
|||
self.env.cr.execute(query, tuple(params))
|
||||
res = self.env.cr.dictfetchall()
|
||||
sum = 0.0
|
||||
# Start running balance from previous balance if enabled
|
||||
if data['form'].get('previous_balance') and data['form'].get('date_from'):
|
||||
prev_bal = self._previous_balance(data, partner)
|
||||
sum = prev_bal.get('balance', 0.0)
|
||||
lang_code = self.env.context.get('lang') or 'en_US'
|
||||
lang = self.env['res.lang']
|
||||
lang_id = lang._lang_get(lang_code)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
'default_partner_ids':active_ids,
|
||||
'default_target_move': 'posted',
|
||||
'default_result_selection': 'customer_supplier',
|
||||
'default_reconciled': False,
|
||||
'default_reconciled': True,
|
||||
'hide_partner':1,
|
||||
}</field>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue