[FIX] base_gengo: removed required=True on gengo_translation field as the way to create translation is a bit unusual (created in a temporary table for mass import then using SQL queries to update the right table), it would be tricky to inherit at the right spot to apply the default value

bzr revid: qdp-launchpad@openerp.com-20120831090249-v0meyp1luf29eddn
This commit is contained in:
Quentin (OpenERP)
2012-08-31 11:02:49 +02:00
parent 7d96e13e23
commit 48b6fc09b3
+4 -8
View File
@@ -48,15 +48,11 @@ class ir_translation(osv.Model):
_inherit = "ir.translation"
_columns = {
'gengo_comment': fields.text("Comments & Activity Linked to Gengo"),
'job_id': fields.char('Gengo JobId', size=32),
"gengo_translation": fields.selection([('', 'Do not translate this term by Gengo'),
('machine', 'Translation By Machine'),
'job_id': fields.char('Gengo Job ID', size=32),
"gengo_translation": fields.selection([('machine', 'Translation By Machine'),
('standard', 'Standard'),
('pro', 'Pro'),
('ultra', 'Ultra')], "Gengo Translation Service Level", help='You can select here the service level you want for an automatic translation using Gengo.', required=True),
}
_defaults = {
'gengo_translation': '',
('ultra', 'Ultra')], "Gengo Translation Service Level", help='You can select here the service level you want for an automatic translation using Gengo.'),
}
def _get_all_supported_languages(self, cr, uid, context=None):
@@ -79,7 +75,7 @@ class ir_translation(osv.Model):
supported_langs = self._get_all_supported_languages(cr, uid, context=context)
if supported_langs:
for term in self.browse(cr, uid, ids, context=context):
if term.gengo_translation == "":
if not term.gengo_translation:
continue
tier = "nonprofit" if term.gengo_translation == 'machine' else term.gengo_translation
language = self._get_gengo_corresponding_language(term.lang)