[FIX] project: missing translations
authorMiku Laitinen <miku.laitinen@gmail.com>
Sun, 2 Nov 2014 12:25:15 +0000 (14:25 +0200)
committerMartin Trigaux <mat@odoo.com>
Wed, 5 Nov 2014 20:29:17 +0000 (21:29 +0100)
The labels for fields 'use_tasks', 'partner_id', 'date_start' had no valid string (autogenerated or unrelated).
Make the selections of the field privacy_visibility translatable.
Fixes #3435

addons/portal_project/project.py
addons/project/project.py
addons/project/project_view.xml

index 71eb009..9be8c8b 100644 (file)
@@ -20,7 +20,7 @@
 ##############################################################################
 
 from openerp.osv import osv
-
+from openerp.tools.translate import _
 
 class portal_project(osv.Model):
     """ Update of mail_mail class, to add the signin URL to notifications. """
@@ -30,7 +30,7 @@ class portal_project(osv.Model):
         """ Override to add portal option. """
         selection = super(portal_project, self)._get_visibility_selection(cr, uid, context=context)
         idx = [item[0] for item in selection].index('public')
-        selection.insert((idx + 1), ('portal', 'Customer related project: visible through portal'))
+        selection.insert((idx + 1), ('portal', _('Customer related project: visible through portal')))
         return selection
         # return [('public', 'All Users'),
         #         ('portal', 'Portal Users and Employees'),
index 2733549..7c25626 100644 (file)
@@ -197,9 +197,9 @@ class project(osv.osv):
 
     def _get_visibility_selection(self, cr, uid, context=None):
         """ Overriden in portal_project to offer more options """
-        return [('public', 'Public project'),
-                ('employees', 'Internal project: all employees can access'),
-                ('followers', 'Private project: followers Only')]
+        return [('public', _('Public project')),
+                ('employees', _('Internal project: all employees can access')),
+                ('followers', _('Private project: followers Only'))]
 
     def attachment_tree_view(self, cr, uid, ids, context):
         task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
index c35954d..c6e7936 100644 (file)
@@ -96,7 +96,7 @@
                         </h1>
                         <div name="options_active">
                             <field name="use_tasks" class="oe_inline"/>
-                            <label for="use_tasks"/>
+                            <label for="use_tasks" string="Use Tasks"/>
                         </div>
                     </div>
                     <div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
                                     attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"
                                     context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_manager']}"/>
                             <newline/>
-                            <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
+                            <field name="partner_id" on_change="onchange_partner_id(partner_id)" string="Customer"/>
                         </group>
                             <p attrs="{'invisible': [('analytic_account_id','=',False)]}">
                                 To invoice or setup invoicing and renewal options, go to the related contract:
                                         groups="project.group_time_work_estimation_tasks"/>
                             </group>
                             <group string="Miscellaneous" name="misc">
-                                <field name="date_start"/>
+                                <field name="date_start" string="Start Date"/>
                                 <field name="date" string="End Date"/>
                                 <field name="sequence" groups="base.group_no_one"/>
                                 <field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>