[FIX] sale: _get_sale_order_line with order in state='done'
[FIX] sale: _get_sale_order_line with order in state='done'

Steps to reproduce in runbot 10.0:

1.Create a new sale order and use the Odoo Monthly quotation template.
It will set the Odoo SAAS product on the sale order.
2.Go to the Odoo SAAS product form view, check "Can be expensed",
then on Invoicing tab, choose "At Cost" for the "Re-Invoice Expenses" field.
3.Confirm the sale order so it is in done (Locked) state.
4.Create an invoice, try to validate it, a UserError is raised:
'The Sale Order SO0158 linked to the Analytic Account must be validated before registering expenses.'

This UserError only makes sens when new SO lines are created.

NB:Now it's possible possible to update an analytic line linked to SO  in other state than 'sale'
but it's still forbidden to create a SO line when the state is different than 'sale'.

opw:708661

ygol/odoo,ygol/odoo,hip-odoo/odoo,hip-odoo/odoo,hip-odoo/odoo,ygol/odoo,ygol/odoo,ygol/odoo,hip-odoo/odoo,hip-odoo/odoo,ygol/odoo,ygol/odoo,hip-odoo/odoo