2020-04-07 15:34:03 +02:00
|
|
|
from trytond.pool import Pool
|
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
|
|
|
|
|
|
|
|
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
|