Use correct id for error message when creating invoice line not draft

Closes #12863
(grafted from b052e8902bb286b6b1d84333e9b2bacd46970384)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2023-12-22 18:34:45 +01:00
1 parent a109bf9dd4
commit bf55f9310d
1 file changed
+1 -1
+1 -1
View File
@@ -2705,7 +2705,7 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
for invoice in Invoice.browse(list(invoice_ids)):
if invoice.state != 'draft':
raise AccessError(
gettext('account_invoice.msg_invoice_line_create',
gettext('account_invoice.msg_invoice_line_create_draft',
invoice=invoice.rec_name))
return super(InvoiceLine, cls).create(vlist)