Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.0][IMP] l10n_it_fatturapa_pec state related source strings #735

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()