[IMP] project: improved privacy_visiliby options labels, improved form view according to new specs.
bzr revid: tde@openerp.com-20130507093636-gk9k1rc52u3ats3a
This commit is contained in:
parent
5a59c97f23
commit
a5bb69ec28
|
@ -92,7 +92,7 @@ class mail_alias(osv.Model):
|
|||
('everyone', 'Everyone'),
|
||||
('partners', 'Authenticated Partners'),
|
||||
('followers', 'Followers only'),
|
||||
], string='Contact policy', required=True,
|
||||
], string='Alias Contact Security', required=True,
|
||||
help="Policy to post a message on the document using the mailgateway.\n"
|
||||
"- everyone: everyone can post\n"
|
||||
"- partners: only authenticated partners\n"
|
||||
|
|
|
@ -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', 'Portal Users and Employees'))
|
||||
selection.insert((idx + 1), ('portal', 'Customer related project: visible through portal'))
|
||||
return selection
|
||||
# return [('public', 'All Users'),
|
||||
# ('portal', 'Portal Users and Employees'),
|
||||
|
|
|
@ -210,9 +210,9 @@ class project(osv.osv):
|
|||
|
||||
def _get_visibility_selection(self, cr, uid, context=None):
|
||||
""" Overriden in portal_project to offer more options """
|
||||
return [('public', 'All Users'),
|
||||
('employees', 'Employees Only'),
|
||||
('followers', '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)])
|
||||
|
|
|
@ -88,19 +88,6 @@
|
|||
<h1>
|
||||
<field name="name" string="Project Name"/>
|
||||
</h1>
|
||||
<div name="group_alias"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<span name="read_alias" class="oe_read_only" attrs="{'invisible': [('alias_name', '=', False)]}">
|
||||
<span class="oe_e oe_e_alias">%%</span>
|
||||
<field name="alias_id" class="oe_inline oe_read_only" required="0" nolabel="1"/>
|
||||
</span>
|
||||
<span name="edit_alias" class="oe_edit_only">
|
||||
<span class="oe_e oe_e_alias">%%</span>
|
||||
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||
</span>
|
||||
<span class="oe_e oe_e_alias">V</span>
|
||||
<field name="alias_contact" class="oe_inline"/>
|
||||
</div>
|
||||
<div name="options_active">
|
||||
<field name="use_tasks" class="oe_inline"/>
|
||||
<label for="use_tasks"/>
|
||||
|
@ -112,18 +99,23 @@
|
|||
<button name="attachment_tree_view" string="Documents" type="object"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="privacy_visibility" widget="radio"/>
|
||||
<field name="user_id" string="Project Manager"
|
||||
<group colspan="2"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<field name="privacy_visibility" widget="radio"/>
|
||||
<field name="alias_id" class="oe_read_only" string="Email Alias"/>
|
||||
<label for="alias_name" string="Email Alias" class="oe_edit_only"/>
|
||||
<div class="oe_edit_only">
|
||||
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||
</div>
|
||||
<field name="alias_contact" class="oe_inline"/>
|
||||
</group>
|
||||
<field name="user_id" string="Project Manager"
|
||||
attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"
|
||||
context="{'default_groups_ref': ['base.group_user', 'project.group_project_manager']}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<p colspan="2" attrs="{'invisible': [('analytic_account_id','=',False)]}">
|
||||
To invoice or setup invoicing and renewal options, go to the related contract: <field name="analytic_account_id" readonly="1" required="0" class="oe_inline"/>.
|
||||
</p>
|
||||
</group>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<p colspan="2" attrs="{'invisible': [('analytic_account_id','=',False)]}">
|
||||
To invoice or setup invoicing and renewal options, go to the related contract: <field name="analytic_account_id" readonly="1" required="0" class="oe_inline"/>.
|
||||
</p>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Team" name="team">
|
||||
|
|
Loading…
Reference in New Issue