Skip to content

Commit

Permalink
FIX search_account_kind in case option is not payable or receivable
Browse files Browse the repository at this point in the history
#168070
  • Loading branch information
raimonesteve committed Aug 22, 2024
1 parent 1d88743 commit 16fb723
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion move.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ def on_change_with_account_kind(self, name=None):
@classmethod
def search_account_kind(cls, name, clause):
value = clause[2]
return [('account.type.%s'%value, *clause[1], True)]
if value in ('', None):
return [
('account.type.payable', *clause[1], True),
('account.type.receivable', *clause[1], True),
]
else:
return [('account.type.%s' % value, *clause[1], True)]

@fields.depends('account')
def on_change_account(self):
Expand Down

0 comments on commit 16fb723

Please sign in to comment.