It was not possible to manually set a default analytic account as it was overriden by the onchange, even if no account was returned by account_get Apply the same logic as in _prepare_invoice_line on sale.order.line closes odoo/odoo#30282 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>