[FIX] account,iap,sale,mail,portal: translate error messages

The error were untranslatables

Courtesy of Moises Lopez

closes odoo/odoo#35573

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Martin Trigaux
2019-08-08 13:56:25 +00:00
parent 5b83f7214f
commit 496d2c30ad
17 changed files with 177 additions and 58 deletions
+17 -11
View File
@@ -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 ""
+1 -1
View File
@@ -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 = [
+9 -3
View File
@@ -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"
@@ -165,6 +165,12 @@ msgstr ""
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
+4 -2
View File
@@ -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
+2 -2
View File
@@ -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'"))
+1 -1
View File
@@ -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):
+5 -5
View File
@@ -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."))
+74 -10
View File
@@ -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"
@@ -3258,6 +3258,12 @@ msgstr ""
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"
@@ -3303,6 +3309,18 @@ msgstr ""
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."
@@ -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,17 +3747,29 @@ 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"
@@ -4218,6 +4254,14 @@ msgstr ""
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"
@@ -5326,13 +5370,21 @@ msgstr ""
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 ""
+7 -7
View File
@@ -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):
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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):
+3 -3
View File
@@ -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]
+25 -2
View File
@@ -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"
@@ -22,6 +22,12 @@ msgstr ""
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>"
@@ -210,6 +216,11 @@ msgstr ""
msgid "Changing VAT number 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 "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"
@@ -367,6 +378,12 @@ msgstr ""
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"
@@ -600,6 +617,12 @@ msgstr ""
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."
+8 -2
View File
@@ -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"
@@ -3870,6 +3870,12 @@ msgstr ""
msgid "You can set here the communication type that will appear on sales orders.The communication will be given to the customer when they choose the payment method."
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"
+1 -1
View File
@@ -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')
@@ -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"
@@ -92,6 +92,12 @@ msgstr ""
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"
@@ -495,11 +501,17 @@ 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"
@@ -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 = [