minor fix assets party required
This commit is contained in:
parent
36f0ed638d
commit
a2c38f2e7d
4
asset.py
4
asset.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue