Skip to content

Commit

Permalink
[IMP] l10n_it_fatturapa_pec state related source strings (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
primes2h authored and eLBati committed Dec 27, 2018
1 parent 4ddbdea commit 718c10d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,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
Expand All @@ -62,7 +64,9 @@ def send_via_pec(self):
self._check_fetchmail()
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,
Expand Down Expand Up @@ -238,6 +242,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()

0 comments on commit 718c10d

Please sign in to comment.