Steps:
- New invoice
- Select a partner that has no invoices yet
- Create a new line
- The default account is quite random
Fix:
Only use the most frequent account for the set partner if there are existing invoices for that partner.
Otherwise we fallback on the default account of the invoice's journal (instead of the suspense account).
closesodoo/odoo#102350
Task-id: 2972993
X-original-commit: 471924c0d0e2647a25aa38507224f8321b598211
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>