minor fix assets party required

This commit is contained in:
wilson gomez sanchez 2021-02-19 14:45:11 -05:00
parent 36f0ed638d
commit a2c38f2e7d
1 changed files with 1 additions and 3 deletions

View File

@ -6,14 +6,12 @@ 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:
code = str(line.account.code)
if code.startswith("5"):
if line.account.kind == 'expense':
line.party = company[0].party
return move