I forgot a small detail: I import the bank statements, so the origin lines are created automatically.
Yes, but the account_statement_rule doesn’t do anything with that. It tries to find the party again based on account number or party name, but neither of those exists in the keywords. And if there is no party, the rule-system stops.
When you want to create origin lines with an account where party is required and the rule-system doesn’t find a party, the rule-system should try to get the party from the origin line. If it then fails, that’s no problem.
In this way, users are able to automatically generate almost all the statement lines, which is a big win, when you have a lot of origin lines with a party. Those lines are then automatically generated.