[FIX] project: missing translations

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
This commit is contained in:
Miku Laitinen 2014-11-02 14:25:15 +02:00 committed by Martin Trigaux
parent 0ffa605e37
commit 87dcaa95f5
3 changed files with 8 additions and 8 deletions

View 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'),

View 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)])

View 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">
@ -114,7 +114,7 @@
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:
@ -168,7 +168,7 @@
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'])]}"/>