mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[IMP] link partner funtionality without remote owner
This commit is contained in:
@@ -1409,7 +1409,6 @@ class account_bank_statement_line(orm.Model):
|
||||
line.state == 'draft'
|
||||
and not line.partner_id
|
||||
and line.import_transaction_id
|
||||
and line.import_transaction_id.remote_owner
|
||||
and line.import_transaction_id.remote_account)
|
||||
return res
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ class link_partner(orm.TransientModel):
|
||||
_('Error'),
|
||||
_('Statement line is already linked to a bank account '))
|
||||
|
||||
if not(transaction and transaction.remote_owner
|
||||
if not(transaction
|
||||
and transaction.remote_account):
|
||||
raise orm.except_orm(
|
||||
_('Error'),
|
||||
@@ -117,6 +117,8 @@ class link_partner(orm.TransientModel):
|
||||
self.pool, cr, uid, transaction, context=context)
|
||||
if not vals.get('name'):
|
||||
vals['name'] = transaction.remote_owner
|
||||
if not vals['name']:
|
||||
vals['name'] = '/'
|
||||
if not vals.get('remote_account'):
|
||||
vals['remote_account'] = transaction.remote_account
|
||||
|
||||
|
||||
Reference in New Issue
Block a user