[IMP] link partner funtionality without remote owner

This commit is contained in:
unknown
2014-02-03 10:55:43 +01:00
committed by Holger Brunn
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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