trytonpsk-account_col/asset.py

16 lines
469 B
Python
Raw Normal View History

2021-08-14 23:58:07 +02:00
from trytond.pool import Pool, PoolMeta
2020-04-07 15:34:03 +02:00
class Asset(metaclass=PoolMeta):
__name__ = 'account.asset'
def get_move(self, line):
move = super(Asset, self).get_move(line)
Company = Pool().get('company.company')
company = Company.search([])
if move:
for line in move.lines:
2021-08-05 19:26:59 +02:00
if line.account.type.statement == 'income':
2020-04-07 15:34:03 +02:00
line.party = company[0].party
return move