Vauxoo / pylint-odoo

1 stars 4 forks source link

Unnecessary translation required in pylint #147

Closed umiphos closed 6 years ago

umiphos commented 6 years ago

Currently in a new PR I'm having an issue with translation required in the use of message_post

At that part there is no translation requiered actually because it requieres it in the variable or methods of the call.

Travis with the red: https://travis-ci.com/Vauxoo/odoo-peru/jobs/121887543#L4721

Extract from travis

************* Module l10n_pe_edi.models.account_invoice
l10n_pe_edi/models/account_invoice.py:544: [C8107(translation-required), AccountInvoice._l10n_pe_edi_post_sign_process] String parameter on "message_post" requires translation. Use body=_((body_msg) + (create_list_html(post_msg)))
l10n_pe_edi/models/account_invoice.py:863: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_get_status_cdr_sunat] String parameter on "message_post" requires translation. Use body=_((_('A CDR have been recovered for %s')) % (attachment.name))
l10n_pe_edi/models/account_invoice.py:1451: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_get_status_sunat] String parameter on "message_post" requires translation. Use body=_((_("Sunat is returning something unexpected: '%s'")) % (status_code[0].text))
l10n_pe_edi/models/account_invoice.py:1461: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_get_status_sunat] String parameter on "message_post" requires translation. Use body=_((_('This document is still being processing by SUNAT in the document %s')) % (attachment.name))
l10n_pe_edi/models/account_invoice.py:1554: [C8107(translation-required), AccountInvoice._l10n_pe_edi_update_cdr_date] String parameter on "message_post" requires translation. Use body=_((_("Wrong CDR Date format received in %s: '%s'")) % ((cdr_name, date)))
l10n_pe_edi/models/account_invoice.py:2047: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_regenerate] String parameter on "message_post" requires translation. Use body=_((_('Summary document %s cannot be regenerated')) % (old_summary.name))
l10n_pe_edi/models/account_invoice.py:2065: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_regenerate] String parameter on "message_post" requires translation. Use body=_((_('Summary document %s cannot be regenerated')) % (old_summary.name))
l10n_pe_edi/models/account_invoice.py:2086: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_regenerate] String parameter on "message_post" requires translation. Use subject=_('Document regenerated')
l10n_pe_edi/models/account_invoice.py:2086: [C8107(translation-required), AccountInvoice.l10n_pe_edi_action_regenerate] String parameter on "message_post" requires translation. Use body=_(('Document %s have been regenerated into %s') % ((old_summary.name, new_summary.name)))
luisg123v commented 6 years ago

Hi @moylop260 There is a similar issue reported in the OCA at OCA/pylint-odoo#187

Are you sure this should be addressed from here?

umiphos commented 6 years ago

@moylop260 should I close this issue? the lint is no longer a problem in my builds as a red, but they can be visible as a beta lint, check this travis https://travis-ci.com/Vauxoo/odoo-peru/jobs/122103260#L4718

cc @luisg123v

moylop260 commented 6 years ago

It’s a valid issue yet