mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MRG] account_statement_ext
Statement ext collide with voucher for some on change. As it almost impossible to have a finance installation without voucher, we may add voucher as a dependence on statement ext in order to fix on change, and silent unwanted voucher behavior. We also add the right periode computation for each line in the voucher, as it was previously done in the account_statement_ext_voucher. We mark also this one as deprecated.
This commit is contained in:
@@ -551,7 +551,7 @@ class AccountBankSatementLine(Model):
|
||||
res['account_id'] = receiv_account
|
||||
return res
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, profile_id, context=None):
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, profile_id=None, context=None):
|
||||
"""
|
||||
Override of the basic method as we need to pass the profile_id in the on_change_type
|
||||
call.
|
||||
@@ -571,7 +571,9 @@ class AccountBankSatementLine(Model):
|
||||
type = 'customer'
|
||||
res_type = self.onchange_type(cr, uid, ids, partner_id, type, profile_id, context=context) # Chg
|
||||
if res_type['value'] and res_type['value'].get('account_id', False):
|
||||
return {'value': {'type': type, 'account_id': res_type['value']['account_id']}}
|
||||
return {'value': {'type': type,
|
||||
'account_id': res_type['value']['account_id'],
|
||||
'voucher_id': False}}
|
||||
return {'value': {'type': type}}
|
||||
|
||||
def onchange_type(self, cr, uid, line_id, partner_id, type, profile_id, context=None):
|
||||
|
||||
Reference in New Issue
Block a user