From c325d8c476e0f71ce08ee87adf1852f0f7b00b03 Mon Sep 17 00:00:00 2001 From: Sergio Zanchetta Date: Thu, 27 Dec 2018 10:45:00 +0100 Subject: [PATCH] [IMP] l10n_it_fatturapa_pec state related source strings (#736) --- .../models/fatturapa_attachment_out.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py b/l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py index 397a2de9c8a1..2f27c74c5366 100644 --- a/l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py +++ b/l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py @@ -43,7 +43,9 @@ class FatturaPAAttachmentOut(models.Model): def reset_to_ready(self): for att in self: if att.state != 'sender_error': - raise UserError(_("You can only reset 'sender error' files.")) + raise UserError( + _("You can only reset files in 'Sender Error' state.") + ) att.state = 'ready' @api.model @@ -62,7 +64,9 @@ def send_via_pec(self): self.env.user.company_id.sdi_channel_id.check_first_pec_sending() states = self.mapped('state') if set(states) != set(['ready']): - raise UserError(_("You can only send 'Ready to Send' files.")) + raise UserError( + _("You can only send files in 'Ready to Send' state.") + ) for att in self: mail_message = self.env['mail.message'].create({ 'model': self._name, @@ -240,6 +244,6 @@ def unlink(self): for att in self: if att.state != 'ready': raise UserError(_( - "You can only delete 'ready to send' files." + "You can only delete files in 'Ready to Send' state." )) return super(FatturaPAAttachmentOut, self).unlink()