I've seen the proposal includes creating a new module but I'm wonder if it's not better to include it as part of the account_statement module like we do for the Analytic Rules with the analytic_account module.
IIUC if the user does not want to use this functionality is as easy as not definig any statement rule
I do not think so. There are no real benefit to have it always included.
The case of analytic is different because it would have been harder to make it a separate module and it is useful to more users analytic users than this one (mainly because analytic rules are about Tryton internals while statement rules are about external data).
First try:
- the name of the button is "Apply Rule". Shouldn't "Apply Rules" be better ?
- it isn't simple to understand that in order to set an Account in Line, it is required to have a Company on Criteria (I have looked at code to understand why the search list was empty). Maybe document it doc/index.rst ?
- a rule seems to match once only: having two origins with "foobar" in description, and a rule matching "foobar", results in a new line is added for first origin, but not for the second. Calling "Apply Rule" a second time proceeded the second origin.