mirror of
https://github.com/NaN-tic/trytond-account_invoice_facturae.git
synced 2023-12-14 03:32:59 +01:00
Don't return a traceback if the password is wrong. (#7)
Instead return a UserError. Locales Task #160407
This commit is contained in:
parent
9b9fe4ee67
commit
f100e5a156
4 changed files with 23 additions and 1 deletions
|
@ -502,7 +502,9 @@ class Invoice(metaclass=PoolMeta):
|
|||
except ValueError as e:
|
||||
logger.warning("Error load_key_and_certificates file",
|
||||
exc_info=True)
|
||||
raise UserError(str(e))
|
||||
raise UserError(gettext(
|
||||
'account_invoice_facturae.msg_certificate_error',
|
||||
error=str(e)))
|
||||
|
||||
# DER is an ASN.1 encoding type
|
||||
crt = certificate.public_bytes(serialization.Encoding.DER)
|
||||
|
|
|
@ -195,6 +195,10 @@ msgid "Missing Password Factura-e Certificate in company \"%(company)s\"."
|
|||
msgstr ""
|
||||
"Falta la contrasenya del certificat Factura-e a l'empresa \"%(company)s\"."
|
||||
|
||||
msgctxt "model:ir.message,text:msg_certificate_error"
|
||||
msgid "Error while getting the certificate: \"%(error)s\"."
|
||||
msgstr "S'ha produït un error mentre s'obtenia el certificat: \"%(error)s\"."
|
||||
|
||||
msgctxt "model:ir.message,text:no_rate"
|
||||
msgid "No rate found for currency \"%(currency)s\" on \"%(date)s\""
|
||||
msgstr ""
|
||||
|
|
13
locale/es.po
13
locale/es.po
|
@ -200,6 +200,11 @@ msgstr ""
|
|||
"Falta la contraseña del certificado Factura-e Certificate en la empresa "
|
||||
"\"%(company)s\"."
|
||||
|
||||
msgctxt "model:ir.message,text:msg_certificate_error"
|
||||
msgid "Error while getting the certificate: \"%(error)s\"."
|
||||
msgstr ""
|
||||
"Se ha producido un error mientras se obtenía el certificado: \"%(error)s\"."
|
||||
|
||||
msgctxt "model:ir.message,text:no_rate"
|
||||
msgid "No rate found for currency \"%(currency)s\" on \"%(date)s\""
|
||||
msgstr ""
|
||||
|
@ -780,6 +785,14 @@ msgctxt "view:account.invoice:"
|
|||
msgid "Generate Factura-e"
|
||||
msgstr "Generar Factura-e"
|
||||
|
||||
msgctxt "view:account.tax.template:"
|
||||
msgid "Factura-e"
|
||||
msgstr "Factura-e"
|
||||
|
||||
msgctxt "view:account.tax:"
|
||||
msgid "Factura-e"
|
||||
msgstr "Factura-e"
|
||||
|
||||
msgctxt "view:party.party:"
|
||||
msgid "Factura-e"
|
||||
msgstr "Factura-e"
|
||||
|
|
|
@ -61,5 +61,8 @@ Message returned by signing process: %(process_output)s</field>
|
|||
<record model="ir.message" id="msg_draft_invoice_facturae_sent">
|
||||
<field name="text">Can not draft "%(invoices)s" that have been sent to Factura-e.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_certificate_error">
|
||||
<field name="text">Error while getting the certificate: "%(error)s".</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
Loading…
Reference in a new issue