Add more information in the sale error message
This commit is contained in:
parent
3c6dce1223
commit
b4bb7b14b2
|
@ -58,11 +58,6 @@ msgctxt "error:res.user:"
|
|||
msgid "You can not have two users with the same login!"
|
||||
msgstr "No podeu tenir dos usuaris amb el mateix identificador d'entrada."
|
||||
|
||||
msgctxt "error:sale.payment:"
|
||||
msgid "A customer invoice/refund from sale device has not been created."
|
||||
msgstr ""
|
||||
"Una factura/devolució d'un terminal de venda no s'ha creat."
|
||||
|
||||
msgctxt "error:sale.payment:"
|
||||
msgid "A draft statement for \"%s\" payments has not been created."
|
||||
msgstr "Un extracte esborrany per \"%s\" pagaments no s'ha creat."
|
||||
|
@ -78,9 +73,9 @@ msgid "You have not defined a sale device for your user."
|
|||
msgstr "No heu definit un terminal de venda per al vostre usuari."
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "A customer invoice/refund from sale device has not been created."
|
||||
msgid "A customer invoice/refund from sale device (%s) has not been created."
|
||||
msgstr ""
|
||||
"Una factura/devolució d'un terminal de venda no s'ha creat."
|
||||
"Una factura/devolució d'un terminal de venda (%s) no s'ha creat."
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Go to user preferences and select a shop (\"%s\")"
|
||||
|
|
|
@ -53,8 +53,8 @@ msgid "You have not defined a sale device for your user."
|
|||
msgstr "No ha definido un terminal de venta para su usuario."
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "A customer invoice/refund from sale device has not been created."
|
||||
msgstr "Una factura/devolución del terminal de venta no se ha creado."
|
||||
msgid "A customer invoice/refund from sale device (%s) has not been created."
|
||||
msgstr "Una factura/devolución del terminal de venta (%s) no se ha creado."
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Go to user preferences and select a shop (\"%s\")"
|
||||
|
|
4
sale.py
4
sale.py
|
@ -44,7 +44,7 @@ class Sale:
|
|||
})
|
||||
cls._error_messages.update({
|
||||
'not_customer_invoice': ('A customer invoice/refund '
|
||||
'from sale device has not been created.'),
|
||||
'from sale device (%s) has not been created.'),
|
||||
})
|
||||
|
||||
@staticmethod
|
||||
|
@ -67,7 +67,7 @@ class Sale:
|
|||
cls.process([sale])
|
||||
|
||||
if not sale.invoices and sale.invoice_method == 'order':
|
||||
cls.raise_user_error('not_customer_invoice')
|
||||
cls.raise_user_error('not_customer_invoice', (sale.reference,))
|
||||
|
||||
grouping = getattr(sale.party, 'sale_invoice_grouping_method',
|
||||
False)
|
||||
|
|
Loading…
Reference in New Issue