[IMP] project useability
bzr revid: fp@openerp.com-20120929195825-5prbl0e9liixztdi
This commit is contained in:
parent
d952128b8a
commit
917ec39f14
|
@ -509,6 +509,8 @@ def Project():
|
|||
model_name=vals.get('alias_model', 'project.task'),
|
||||
context=context)
|
||||
vals['alias_id'] = alias_id
|
||||
if vals.get('partner_id', False):
|
||||
vals['type'] = 'contract'
|
||||
project_id = super(project, self).create(cr, uid, vals, context)
|
||||
mail_alias.write(cr, uid, [vals['alias_id']], {'alias_defaults': {'project_id': project_id} }, context)
|
||||
self.create_send_note(cr, uid, [project_id], context=context)
|
||||
|
@ -767,7 +769,7 @@ class task(base_stage, osv.osv):
|
|||
}),
|
||||
'user_id': fields.many2one('res.users', 'Assigned to'),
|
||||
'delegated_user_id': fields.related('child_ids', 'user_id', type='many2one', relation='res.users', string='Delegated To'),
|
||||
'partner_id': fields.many2one('res.partner', 'Contact'),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer'),
|
||||
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
|
||||
'manager_id': fields.related('project_id', 'analytic_account_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
|
|
|
@ -92,12 +92,12 @@
|
|||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="privacy_visibility"/>
|
||||
<field name="user_id" string="Project Manager" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
|
||||
<field name="partner_id" string="Contact" on_change="onchange_partner_id(partner_id)"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="privacy_visibility"/>
|
||||
<field name="analytic_account_id" readonly="1" required="0"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="analytic_account_id" readonly="1" required="0" attrs="{'invisible': [('analytic_account_id','=',False)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
@ -121,14 +121,14 @@
|
|||
</field>
|
||||
</page>
|
||||
<page string="Other Info">
|
||||
<group string="Email Interface" colspan="2">
|
||||
<div attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<field name="alias_id" invisible="1" required="0"/>
|
||||
<label for="alias_name" class="oe_edit_only "/>
|
||||
<field name="alias_name" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Email Interface" attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<div>
|
||||
<field name="alias_id" invisible="1" required="0"/>
|
||||
<label for="alias_name" class="oe_edit_only "/>
|
||||
<field name="alias_name" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Administration" groups="project.group_time_work_estimation_tasks">
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
|
@ -136,7 +136,7 @@
|
|||
</group>
|
||||
<group string="Miscellaneous" name="misc">
|
||||
<field name="date"/>
|
||||
<field name="priority"/>
|
||||
<field name="priority" groups="base.group_no_one"/>
|
||||
<field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>
|
||||
|
||||
<field name="currency_id" groups="base.group_multi_currency" required="1"/>
|
||||
|
@ -240,7 +240,7 @@
|
|||
<a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action"> <field name="task_count"/> Tasks</a>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<span>
|
||||
<span groups="project.group_time_work_estimation_tasks">
|
||||
<span class="oe_e">R</span>
|
||||
<t t-esc="Math.round(record.effective_hours.raw_value)"/>/<t t-esc="Math.round(record.planned_hours.raw_value)"/> <field name="company_uom_id"/>
|
||||
</span>
|
||||
|
@ -520,7 +520,7 @@
|
|||
<div class="oe_kanban_content">
|
||||
<div><b><field name="name"/></b></div>
|
||||
<div>
|
||||
<field name="project_id"/>
|
||||
<field name="project_id"/><br/>
|
||||
<t t-esc="kanban_text_ellipsis(record.description.value, 160)"/><br/>
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
||||
<span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>
|
||||
|
@ -714,7 +714,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ir_project_task_open" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<field eval="'project.project'" name="model"/>
|
||||
<field name="name">View project's tasks</field>
|
||||
<field eval="'ir.actions.act_window,'+str(dblc_proj)" name="value"/>
|
||||
|
@ -758,7 +758,7 @@
|
|||
<field name="model">project.task.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Task Stage">
|
||||
<field name="sequence"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
|
|
Loading…
Reference in New Issue