Fix on_change_party when no journal is set
issue2883 review596002
This commit is contained in:
1 parent
2dd14fb331
commit
94053d161e
1 file changed
+5
-2
@@ -936,8 +936,11 @@ class Line(ModelSQL, ModelView):
|
||||
res['account.rec_name'] = \
|
||||
self.party.account_receivable.rec_name
|
||||
|
||||
journal = (self.journal
|
||||
or Journal(Transaction().context.get('journal')))
|
||||
journal = None
|
||||
if self.journal:
|
||||
journal = self.journal
|
||||
elif Transaction().context.get('journal'):
|
||||
journal = Journal(Transaction().context.get('journal'))
|
||||
if journal and self.party:
|
||||
if journal.type == 'revenue':
|
||||
if 'account' not in res:
|
||||
|
||||
Reference in new issue
Block a user