mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] Only commercial partners are allowed in bank statement lines
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
{'name': "Bank statement extension and profiles",
|
{'name': "Bank statement extension and profiles",
|
||||||
'version': '1.3.0',
|
'version': '1.3.1',
|
||||||
'author': 'Camptocamp',
|
'author': 'Camptocamp',
|
||||||
'maintainer': 'Camptocamp',
|
'maintainer': 'Camptocamp',
|
||||||
'category': 'Finance',
|
'category': 'Finance',
|
||||||
|
|||||||
@@ -658,6 +658,11 @@ class AccountBankSatementLine(Model):
|
|||||||
# This can be quite a performance killer as we read ir.properity fields
|
# This can be quite a performance killer as we read ir.properity fields
|
||||||
if partner_id:
|
if partner_id:
|
||||||
part = obj_partner.browse(cr, uid, partner_id, context=context)
|
part = obj_partner.browse(cr, uid, partner_id, context=context)
|
||||||
|
part = part.commercial_partner_id
|
||||||
|
# When the method is called from bank statement completion,
|
||||||
|
# ensure that the line's partner is a commercial
|
||||||
|
# (accounting) entity
|
||||||
|
res['partner_id'] = part.id
|
||||||
pay_account = part.property_account_payable.id
|
pay_account = part.property_account_payable.id
|
||||||
receiv_account = part.property_account_receivable.id
|
receiv_account = part.property_account_receivable.id
|
||||||
# If no value, look on the default company property
|
# If no value, look on the default company property
|
||||||
|
|||||||
Reference in New Issue
Block a user