diff options
| -rw-r--r-- | addons/account/i18n/account.pot | 28 | ||||
| -rw-r--r-- | addons/account/models/account_invoice.py | 2 | ||||
| -rw-r--r-- | addons/iap/i18n/iap.pot | 12 | ||||
| -rw-r--r-- | addons/iap/models/iap.py | 6 | ||||
| -rw-r--r-- | addons/l10n_it_edi/models/account_invoice.py | 4 | ||||
| -rw-r--r-- | addons/l10n_it_edi/models/ir_mail_server.py | 2 | ||||
| -rw-r--r-- | addons/l10n_it_edi/models/res_company.py | 10 | ||||
| -rw-r--r-- | addons/mail/i18n/mail.pot | 84 | ||||
| -rw-r--r-- | addons/mail/models/mail_channel.py | 14 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_resend_message.py | 2 | ||||
| -rw-r--r-- | addons/mass_mailing/models/mass_mailing.py | 2 | ||||
| -rw-r--r-- | addons/portal/controllers/portal.py | 6 | ||||
| -rw-r--r-- | addons/portal/i18n/portal.pot | 27 | ||||
| -rw-r--r-- | addons/sale/i18n/sale.pot | 10 | ||||
| -rw-r--r-- | addons/sale/models/sale.py | 2 | ||||
| -rw-r--r-- | addons/sale_management/i18n/sale_management.pot | 18 | ||||
| -rw-r--r-- | addons/sale_management/models/sale_order_template.py | 6 |
17 files changed, 177 insertions, 58 deletions
diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 6aa2e23c430..124da269c03 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-10 09:57+0000\n" -"PO-Revision-Date: 2019-07-10 09:57+0000\n" +"POT-Creation-Date: 2019-08-08 13:35+0000\n" +"PO-Revision-Date: 2019-08-08 13:35+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -10792,55 +10792,61 @@ msgid "You can set here the default communication that will appear on customer i msgstr "" #. module: account -#: code:addons/account/models/account_move.py:370 +#: code:addons/account/models/account_move.py:373 #, python-format msgid "You cannot add/modify entries prior to and inclusive of the lock date %s" msgstr "" #. module: account -#: code:addons/account/models/account_move.py:372 +#: code:addons/account/models/account_move.py:375 #, python-format msgid "You cannot add/modify entries prior to and inclusive of the lock date %s. Check the company settings or ask someone with the 'Adviser' role" msgstr "" #. module: account -#: code:addons/account/models/company.py:267 +#: code:addons/account/models/company.py:283 #, python-format msgid "You cannot change the currency of the company since some journal items already exist" msgstr "" #. module: account -#: code:addons/account/models/account.py:310 +#: code:addons/account/models/account.py:317 #, python-format msgid "You cannot change the owner company of an account that already contains journal items." msgstr "" #. module: account -#: code:addons/account/models/account_move.py:688 +#: code:addons/account/models/account_invoice.py:1929 +#, python-format +msgid "You cannot change the type of an invoice line. Instead you should delete the current line and create a new line of the proper type." +msgstr "" + +#. module: account +#: code:addons/account/models/account_move.py:703 #, python-format msgid "You cannot create journal items with a secondary currency without filling both 'currency' and 'amount currency' fields." msgstr "" #. module: account -#: code:addons/account/models/company.py:171 +#: code:addons/account/models/company.py:187 #, python-format msgid "You cannot define stricter conditions on advisors than on users. Please make sure that the lock date on advisor is set before the lock date for users." msgstr "" #. module: account -#: code:addons/account/models/account_payment.py:583 +#: code:addons/account/models/account_payment.py:611 #, python-format msgid "You cannot delete a payment that is already posted." msgstr "" #. module: account -#: code:addons/account/models/account_invoice.py:729 +#: code:addons/account/models/account_invoice.py:786 #, python-format msgid "You cannot delete an invoice after it has been validated (and received a number). You can set it back to \"Draft\" state and modify its content, then re-confirm it." msgstr "" #. module: account -#: code:addons/account/models/account_invoice.py:727 +#: code:addons/account/models/account_invoice.py:784 #, python-format msgid "You cannot delete an invoice which is not draft or cancelled. You should create a credit note instead." msgstr "" diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 1d4eaa76d59..cc2a5a90a81 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1926,7 +1926,7 @@ class AccountInvoiceLine(models.Model): @api.multi def write(self, values): if 'display_type' in values and self.filtered(lambda line: line.display_type != values.get('display_type')): - raise UserError("You cannot change the type of an invoice line. Instead you should delete the current line and create a new line of the proper type.") + raise UserError(_("You cannot change the type of an invoice line. Instead you should delete the current line and create a new line of the proper type.")) return super(AccountInvoiceLine, self).write(values) _sql_constraints = [ diff --git a/addons/iap/i18n/iap.pot b/addons/iap/i18n/iap.pot index 47b76f9ab88..296d97af0a3 100644 --- a/addons/iap/i18n/iap.pot +++ b/addons/iap/i18n/iap.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~11.5\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-02 10:05+0000\n" -"PO-Revision-Date: 2018-10-02 10:05+0000\n" +"POT-Creation-Date: 2019-08-08 13:34+0000\n" +"PO-Revision-Date: 2019-08-08 13:34+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -166,6 +166,12 @@ msgid "Temporarily unavailable" msgstr "" #. module: iap +#: code:addons/iap/models/iap.py:72 +#, python-format +msgid "The url that this service requested returned an error. Please contact the author the app. The url it tried to contact was %s" +msgstr "" + +#. module: iap #. openerp-web #: code:addons/iap/static/src/xml/iap_templates.xml:34 #, python-format diff --git a/addons/iap/models/iap.py b/addons/iap/models/iap.py index a83220ece11..c32746e9b11 100644 --- a/addons/iap/models/iap.py +++ b/addons/iap/models/iap.py @@ -7,7 +7,7 @@ import uuid import werkzeug.urls import requests -from odoo import api, fields, models, exceptions +from odoo import api, fields, models, exceptions, _ from odoo.tools import pycompat _logger = logging.getLogger(__name__) @@ -68,7 +68,9 @@ def jsonrpc(url, method='call', params=None, timeout=15): raise e return response.get('result') except (ValueError, requests.exceptions.ConnectionError, requests.exceptions.MissingSchema, requests.exceptions.Timeout, requests.exceptions.HTTPError) as e: - raise exceptions.AccessError('The url that this service requested returned an error. Please contact the author the app. The url it tried to contact was ' + url) + raise exceptions.AccessError( + _('The url that this service requested returned an error. Please contact the author the app. The url it tried to contact was %s') % url + ) #---------------------------------------------------------- # Helpers for proxy diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py index 54ff7b11e70..c78a295a008 100644 --- a/addons/l10n_it_edi/models/account_invoice.py +++ b/addons/l10n_it_edi/models/account_invoice.py @@ -95,7 +95,7 @@ class AccountInvoice(models.Model): # <1.2.1.8> if not seller.l10n_it_tax_system: - raise UserError("The seller's company must have a tax system.") + raise UserError(_("The seller's company must have a tax system.")) # <1.2.2> if not seller.street and not seller.street2: @@ -737,7 +737,7 @@ class AccountTax(models.Model): for tax in self: if tax.l10n_it_has_exoneration: if not tax.l10n_it_kind_exoneration or not tax.l10n_it_law_reference or tax.amount != 0: - raise ValidationError("If the tax has exoneration, you must enter a kind of exoneration, a law reference and the amount of the tax must be 0.0.") + raise ValidationError(_("If the tax has exoneration, you must enter a kind of exoneration, a law reference and the amount of the tax must be 0.0.")) if tax.l10n_it_kind_exoneration == 'N6' and tax.l10n_it_vat_due_date == 'S': raise UserError(_("'Scissione dei pagamenti' is not compatible with exoneration of kind 'N6'")) diff --git a/addons/l10n_it_edi/models/ir_mail_server.py b/addons/l10n_it_edi/models/ir_mail_server.py index 86fa674fa55..19568dbe7f5 100644 --- a/addons/l10n_it_edi/models/ir_mail_server.py +++ b/addons/l10n_it_edi/models/ir_mail_server.py @@ -36,7 +36,7 @@ class FetchmailServer(models.Model): def _check_pec(self): for record in self: if record.l10n_it_is_pec and record.type != 'imap': - raise ValidationError("PEC mail server must be of type IMAP.") + raise ValidationError(_("PEC mail server must be of type IMAP.")) @api.multi def fetch_mail(self): diff --git a/addons/l10n_it_edi/models/res_company.py b/addons/l10n_it_edi/models/res_company.py index a0cce53b9a5..dc170405d92 100644 --- a/addons/l10n_it_edi/models/res_company.py +++ b/addons/l10n_it_edi/models/res_company.py @@ -1,7 +1,7 @@ # -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import api, fields, models +from odoo import api, fields, models, _ from odoo.exceptions import ValidationError TAX_SYSTEM = [ @@ -94,7 +94,7 @@ class ResCompany(models.Model): or not record.l10n_it_eco_index_share_capital\ or not record.l10n_it_eco_index_sole_shareholder\ or not record.l10n_it_eco_index_liquidation_state: - raise ValidationError("All fields about the Economic and Administrative Index must be completed.") + raise ValidationError(_("All fields about the Economic and Administrative Index must be completed.")) @api.constrains('l10n_it_has_tax_representative', 'l10n_it_tax_representative_partner_id') @@ -103,8 +103,8 @@ class ResCompany(models.Model): if not record.l10n_it_has_tax_representative: continue if not record.l10n_it_tax_representative_partner_id: - raise ValidationError("You must select a tax representative.") + raise ValidationError(_("You must select a tax representative.")) if not record.l10n_it_tax_representative_partner_id.vat: - raise ValidationError("Your tax representative partner must have a tax number.") + raise ValidationError(_("Your tax representative partner must have a tax number.")) if not record.l10n_it_tax_representative_partner_id.country_id: - raise ValidationError("Your tax representative partner must have a country.") + raise ValidationError(_("Your tax representative partner must have a country.")) diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index 741f43e9906..7cdfae7656f 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-29 10:09+0000\n" -"PO-Revision-Date: 2019-03-29 10:09+0000\n" +"POT-Creation-Date: 2019-08-08 13:50+0000\n" +"PO-Revision-Date: 2019-08-08 13:50+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -3259,6 +3259,12 @@ msgid "Moderated channels" msgstr "" #. module: mail +#: code:addons/mail/models/mail_channel.py:170 +#, python-format +msgid "Moderated channels must have moderators." +msgstr "" + +#. module: mail #: model:ir.model.fields,field_description:mail.field_mail_channel__moderation_count msgid "Moderated emails count" msgstr "" @@ -3304,6 +3310,18 @@ msgid "Moderators" msgstr "" #. module: mail +#: code:addons/mail/models/mail_channel.py:154 +#, python-format +msgid "Moderators must have an email address." +msgstr "" + +#. module: mail +#: code:addons/mail/models/mail_channel.py:160 +#, python-format +msgid "Moderators should be members of the channel they moderate." +msgstr "" + +#. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_activity_type_view_form msgid "Modifying the model can have an impact on existing activities using this activity type, be careful." msgstr "" @@ -3540,14 +3558,20 @@ msgstr "" #. module: mail #. openerp-web -#: code:addons/mail/static/src/xml/thread.xml:28 +#: code:addons/mail/static/src/xml/thread.xml:29 #, python-format msgid "No message matches your search. Try to change your search filters." msgstr "" #. module: mail +#: code:addons/mail/wizard/mail_resend_message.py:51 +#, python-format +msgid "No message_id found in context" +msgstr "" + +#. module: mail #. openerp-web -#: code:addons/mail/static/src/xml/thread.xml:134 +#: code:addons/mail/static/src/xml/thread.xml:135 #, python-format msgid "No starred message" msgstr "" @@ -3723,18 +3747,30 @@ msgstr "" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/discuss.xml:156 -#: code:addons/mail/static/src/xml/discuss.xml:276 +#: code:addons/mail/static/src/xml/discuss.xml:277 #, python-format msgid "Online" msgstr "" #. module: mail -#: code:addons/mail/models/ir_model.py:28 +#: code:addons/mail/models/mail_channel.py:436 +#, python-format +msgid "Only an administrator or a moderator can send guidelines to channel members!" +msgstr "" + +#. module: mail +#: code:addons/mail/models/ir_model.py:53 #, python-format msgid "Only custom models can be modified." msgstr "" #. module: mail +#: code:addons/mail/models/mail_channel.py:165 +#, python-format +msgid "Only mailing lists can be moderated." +msgstr "" + +#. module: mail #: selection:mail.channel.partner,fold_state:0 msgid "Open" msgstr "" @@ -4219,6 +4255,14 @@ msgid "Record Thread ID" msgstr "" #. module: mail +#: code:addons/mail/models/mail_activity.py:244 +#: code:addons/mail/models/mail_message.py:728 +#: code:addons/mail/models/mail_message.py:899 +#, python-format +msgid "Records:" +msgstr "" + +#. module: mail #: model:ir.model.fields,field_description:mail.field_mail_mail__references msgid "References" msgstr "" @@ -5327,12 +5371,20 @@ msgid "User name" msgstr "" #. module: mail +#: code:addons/mail/models/mail_activity.py:244 +#: code:addons/mail/models/mail_message.py:728 +#: code:addons/mail/models/mail_message.py:899 +#, python-format +msgid "User:" +msgstr "" + +#. module: mail #: model:ir.model,name:mail.model_res_users msgid "Users" msgstr "" #. module: mail -#: code:addons/mail/models/mail_channel.py:959 +#: code:addons/mail/models/mail_channel.py:965 #, python-format msgid "Users in this channel: %s %s and you." msgstr "" @@ -5360,7 +5412,13 @@ msgid "View" msgstr "" #. module: mail -#: code:addons/mail/models/mail_thread.py:745 +#: code:addons/mail/models/mail_channel.py:434 +#, python-format +msgid "View \"mail.mail_channel_send_guidelines\" was not found. No email has been sent. Please contact an administrator to fix this issue." +msgstr "" + +#. module: mail +#: code:addons/mail/models/mail_thread.py:752 #, python-format msgid "View %s" msgstr "" @@ -5541,13 +5599,19 @@ msgid "You cannot create a new user from here.\n" msgstr "" #. module: mail -#: code:addons/mail/models/mail_channel.py:241 +#: code:addons/mail/models/mail_channel.py:246 #, python-format msgid "You cannot delete those groups, as the Whole Company group is required by other modules." msgstr "" #. module: mail -#: code:addons/mail/models/mail_thread.py:2358 +#: code:addons/mail/models/mail_channel.py:257 +#, python-format +msgid "You do not have the rights to modify fields related to moderation on one of the channels you are modifying." +msgstr "" + +#. module: mail +#: code:addons/mail/models/mail_thread.py:2365 #, python-format msgid "You have been assigned to %s" msgstr "" diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index 9335e2f32a3..2fcc65d17b6 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -151,23 +151,23 @@ class Channel(models.Model): @api.constrains('moderator_ids') def _check_moderator_email(self): if any(not moderator.email for channel in self for moderator in channel.moderator_ids): - raise ValidationError("Moderators must have an email address.") + raise ValidationError(_("Moderators must have an email address.")) @api.constrains('moderator_ids', 'channel_partner_ids', 'channel_last_seen_partner_ids') def _check_moderator_is_member(self): for channel in self: if not (channel.mapped('moderator_ids.partner_id') <= channel.sudo().channel_partner_ids): - raise ValidationError("Moderators should be members of the channel they moderate.") + raise ValidationError(_("Moderators should be members of the channel they moderate.")) @api.constrains('moderation', 'email_send') def _check_moderation_parameters(self): if any(not channel.email_send and channel.moderation for channel in self): - raise ValidationError('Only mailing lists can be moderated.') + raise ValidationError(_('Only mailing lists can be moderated.')) @api.constrains('moderator_ids') def _check_moderator_existence(self): if any(not channel.moderator_ids for channel in self if channel.moderation): - raise ValidationError('Moderated channels must have moderators.') + raise ValidationError(_('Moderated channels must have moderators.')) @api.multi def _compute_is_member(self): @@ -254,7 +254,7 @@ class Channel(models.Model): # First checks if user tries to modify moderation fields and has not the right to do it. if any(key for key in MODERATION_FIELDS if vals.get(key)) and any(self.env.user not in channel.moderator_ids for channel in self if channel.moderation): if not self.env.user.has_group('base.group_system'): - raise UserError("You do not possess the rights to modify fields related to moderation on one of the channels you are modifying.") + raise UserError(_("You do not have the rights to modify fields related to moderation on one of the channels you are modifying.")) tools.image_resize_images(vals) result = super(Channel, self).write(vals) @@ -431,9 +431,9 @@ class Channel(models.Model): if self.env.user in self.moderator_ids or self.env.user.has_group('base.group_system'): success = self._send_guidelines(self.channel_partner_ids) if not success: - raise UserError('View "mail.mail_channel_send_guidelines" was not found. No email has been sent. Please contact an administrator to fix this issue.') + raise UserError(_('View "mail.mail_channel_send_guidelines" was not found. No email has been sent. Please contact an administrator to fix this issue.')) else: - raise UserError("Only an administrator or a moderator can send guidelines to channel members!") + raise UserError(_("Only an administrator or a moderator can send guidelines to channel members!")) @api.multi def _send_guidelines(self, partners): diff --git a/addons/mail/wizard/mail_resend_message.py b/addons/mail/wizard/mail_resend_message.py index 12255735871..561597509f2 100644 --- a/addons/mail/wizard/mail_resend_message.py +++ b/addons/mail/wizard/mail_resend_message.py @@ -48,7 +48,7 @@ class MailResendMessage(models.TransientModel): rec['mail_message_id'] = mail_message_id.id rec['partner_ids'] = partner_ids else: - raise UserError('No message_id found in context') + raise UserError(_('No message_id found in context')) return rec @api.multi diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index 95fe20d1231..28191872f55 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -252,7 +252,7 @@ class MassMailingContact(models.Model): contacts = self.env['mail.mass_mailing.list_contact_rel'].search([('list_id', '=', active_list_id)]) return [('id', 'in', [record.contact_id.id for record in contacts if record.opt_out == value])] else: - raise UserError('Search opt out cannot be executed without a unique and valid active mailing list context.') + raise UserError(_('Search opt out cannot be executed without a unique and valid active mailing list context.')) @api.depends('subscription_list_ids') def _compute_opt_out(self): diff --git a/addons/portal/controllers/portal.py b/addons/portal/controllers/portal.py index ea019834c15..d60c26f11d9 100644 --- a/addons/portal/controllers/portal.py +++ b/addons/portal/controllers/portal.py @@ -234,7 +234,7 @@ class CustomerPortal(Controller): document = request.env[model_name].browse([document_id]) document_sudo = document.sudo().exists() if not document_sudo: - raise MissingError("This document does not exist.") + raise MissingError(_("This document does not exist.")) try: document.check_access_rights('read') document.check_access_rule('read') @@ -269,12 +269,12 @@ class CustomerPortal(Controller): def _show_report(self, model, report_type, report_ref, download=False): if report_type not in ('html', 'pdf', 'text'): - raise UserError("Invalid report type: %s" % report_type) + raise UserError(_("Invalid report type: %s") % report_type) report_sudo = request.env.ref(report_ref).sudo() if not isinstance(report_sudo, type(request.env['ir.actions.report'])): - raise UserError("%s is not the reference of a report" % report_ref) + raise UserError(_("%s is not the reference of a report") % report_ref) method_name = 'render_qweb_%s' % (report_type) report = getattr(report_sudo, method_name)([model.id], data={'report_type': report_type})[0] diff --git a/addons/portal/i18n/portal.pot b/addons/portal/i18n/portal.pot index 343ecca4e51..3a49003b306 100644 --- a/addons/portal/i18n/portal.pot +++ b/addons/portal/i18n/portal.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-09 10:32+0000\n" -"PO-Revision-Date: 2019-01-09 10:32+0000\n" +"POT-Creation-Date: 2019-08-08 13:50+0000\n" +"PO-Revision-Date: 2019-08-08 13:50+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -23,6 +23,12 @@ msgid "%d days overdue" msgstr "" #. module: portal +#: code:addons/portal/controllers/portal.py:277 +#, python-format +msgid "%s is not the reference of a report" +msgstr "" + +#. module: portal #: model_terms:ir.ui.view,arch_db:portal.portal_show_sign_in msgid "<b>Sign in</b>" msgstr "" @@ -212,6 +218,11 @@ msgstr "" #. module: portal #: model_terms:ir.ui.view,arch_db:portal.portal_my_details +msgid "Changing company name is not allowed once document(s) have been issued for your account. Please contact us directly for this operation." +msgstr "" + +#. module: portal +#: model_terms:ir.ui.view,arch_db:portal.portal_my_details msgid "City" msgstr "" @@ -368,6 +379,12 @@ msgid "Invalid Email! Please enter a valid email address." msgstr "" #. module: portal +#: code:addons/portal/controllers/portal.py:272 +#, python-format +msgid "Invalid report type: %s" +msgstr "" + +#. module: portal #: model:ir.model.fields,field_description:portal.field_portal_wizard__welcome_message msgid "Invitation Message" msgstr "" @@ -601,6 +618,12 @@ msgid "There are no comments for now." msgstr "" #. module: portal +#: code:addons/portal/controllers/portal.py:237 +#, python-format +msgid "This document does not exist." +msgstr "" + +#. module: portal #: model_terms:ir.ui.view,arch_db:portal.portal_back_in_edit_mode msgid "This is a preview of the customer portal." msgstr "" diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot index 4c08b46a90e..d28bb6c298c 100644 --- a/addons/sale/i18n/sale.pot +++ b/addons/sale/i18n/sale.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-29 10:09+0000\n" -"PO-Revision-Date: 2019-03-29 10:09+0000\n" +"POT-Creation-Date: 2019-08-08 13:35+0000\n" +"PO-Revision-Date: 2019-08-08 13:35+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -3871,6 +3871,12 @@ msgid "You can set here the communication type that will appear on sales orders. msgstr "" #. module: sale +#: code:addons/sale/models/sale.py:1115 +#, python-format +msgid "You cannot change the type of a sale order line. Instead you should delete the current line and create a new line of the proper type." +msgstr "" + +#. module: sale #: model_terms:ir.actions.act_window,help:sale.product_template_action msgid "You must define a product for everything you purchase,\n" " whether it's a physical product, a consumable or services." diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 833d59adba4..ac06b1368f6 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -1112,7 +1112,7 @@ class SaleOrderLine(models.Model): @api.multi def write(self, values): if 'display_type' in values and self.filtered(lambda line: line.display_type != values.get('display_type')): - raise UserError("You cannot change the type of a sale order line. Instead you should delete the current line and create a new line of the proper type.") + raise UserError(_("You cannot change the type of a sale order line. Instead you should delete the current line and create a new line of the proper type.")) if 'product_uom_qty' in values: precision = self.env['decimal.precision'].precision_get('Product Unit of Measure') diff --git a/addons/sale_management/i18n/sale_management.pot b/addons/sale_management/i18n/sale_management.pot index 54e666a65cd..ac5cb57a25b 100644 --- a/addons/sale_management/i18n/sale_management.pot +++ b/addons/sale_management/i18n/sale_management.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-09 10:31+0000\n" -"PO-Revision-Date: 2019-01-09 10:31+0000\n" +"POT-Creation-Date: 2019-08-08 13:50+0000\n" +"PO-Revision-Date: 2019-08-08 13:50+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -93,6 +93,12 @@ msgid "Attributes" msgstr "" #. module: sale_management +#: code:addons/sale_management/models/sale_order_template.py:39 +#, python-format +msgid "Before archiving \"%s\" please select another default template in the settings." +msgstr "" + +#. module: sale_management #: model:ir.model,name:sale_management.model_res_config_settings msgid "Config Settings" msgstr "" @@ -495,12 +501,18 @@ msgid "Use templates to create polished, professional quotes in minutes.\n" msgstr "" #. module: sale_management -#: code:addons/sale_management/models/sale_order.py:178 +#: code:addons/sale_management/models/sale_order.py:198 #, python-format msgid "You cannot add options to a confirmed order." msgstr "" #. module: sale_management +#: code:addons/sale_management/models/sale_order_template.py:90 +#, python-format +msgid "You cannot change the type of a sale quote line. Instead you should delete the current line and create a new line of the proper type." +msgstr "" + +#. module: sale_management #: model_terms:ir.ui.view,arch_db:sale_management.sale_order_template_view_form msgid "days" msgstr "" diff --git a/addons/sale_management/models/sale_order_template.py b/addons/sale_management/models/sale_order_template.py index 6260794d388..f0853b09e69 100644 --- a/addons/sale_management/models/sale_order_template.py +++ b/addons/sale_management/models/sale_order_template.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import api, fields, models +from odoo import api, fields, models, _ from odoo.addons import decimal_precision as dp from odoo.exceptions import UserError @@ -36,7 +36,7 @@ class SaleOrderTemplate(models.Model): template_id = self.env['ir.default'].get('sale.order', 'sale_order_template_id') for template in self: if template_id and template_id == template.id: - raise UserError('Before archiving "%s" please select another default template in the settings.' % template.name) + raise UserError(_('Before archiving "%s" please select another default template in the settings.') % template.name) return super(SaleOrderTemplate, self).write(vals) @@ -87,7 +87,7 @@ class SaleOrderTemplateLine(models.Model): @api.multi def write(self, values): if 'display_type' in values and self.filtered(lambda line: line.display_type != values.get('display_type')): - raise UserError("You cannot change the type of a sale quote line. Instead you should delete the current line and create a new line of the proper type.") + raise UserError(_("You cannot change the type of a sale quote line. Instead you should delete the current line and create a new line of the proper type.")) return super(SaleOrderTemplateLine, self).write(values) _sql_constraints = [ |
