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
##############################################################################
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. """
""" 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'),
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)])
</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'])]}"/>