@@ -200,7 +200,7 @@
|
||||
<field name="remaining_hours" widget="float_time"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-apply" name="compute_hours" string="Update" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -421,7 +421,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Project" name="group_project_id" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="Stages" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
|
||||
|
||||
@@ -71,12 +71,23 @@ class project_close_task(osv.osv_memory):
|
||||
_defaults = {
|
||||
'manager_email': _get_manager_email,
|
||||
'partner_email': _get_partner_email,
|
||||
'description': _get_desc,
|
||||
}
|
||||
|
||||
def close(self, cr, uid, ids, context=None):
|
||||
data = self.read(cr,uid,ids)[0]
|
||||
task_pool = self.pool.get('project.task')
|
||||
user_name = self.pool.get('res.users').browse(cr, uid, uid).name
|
||||
description = _("Closed By ") + user_name + _(" At ") + time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
description += "\n" + "=======================" + "\n" + data['description']
|
||||
if 'task_id' in context:
|
||||
self.pool.get('project.task').write(cr, uid, [context['task_id']], {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0})
|
||||
task = task_pool.browse(cr, uid, context['task_id'])
|
||||
description = task.description + "\n\n" + description
|
||||
task_pool.write(cr, uid, [task.id], {
|
||||
'description': description,
|
||||
'state': 'done',
|
||||
'date_end':time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'remaining_hours': 0.0
|
||||
})
|
||||
return {}
|
||||
|
||||
def confirm(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Project Close Task" >
|
||||
<label string="Send mail to the specified email address"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<separator string="Send mail to the specified email address" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<newline/>
|
||||
<field name="manager_email" invisible="not context.get('send_manager',False)"/>
|
||||
<newline/>
|
||||
<field name="partner_email" invisible="not context.get('send_partner',False)"/>
|
||||
<newline/>
|
||||
<field name="description" />
|
||||
<separator string="Remark" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="description" nolabel="1" colspan="4"/>
|
||||
</group>
|
||||
<separator string="" colspan="6"/>
|
||||
<group colspan="6" col="6">
|
||||
<button icon="gtk-ok" name="confirm" string="Send and Close" type="object"/>
|
||||
<button icon="gtk-ok" string="Close" name="close" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-close" name="confirm" string="Close" type="object"/>
|
||||
<button icon="gtk-jump-to" string="Done" name="close" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -8,24 +8,21 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Project Task Delegate">
|
||||
<separator string="Delegated Task" colspan="4"/>
|
||||
<field name="user_id"/>
|
||||
<newline/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<newline/>
|
||||
<field name="name"/>
|
||||
<newline/>
|
||||
<field name="new_task_description"/>
|
||||
<newline/>
|
||||
<separator string="Validation Task" colspan="4"/>
|
||||
<field name="planned_hours_me" widget="float_time"/>
|
||||
<newline/>
|
||||
<field name="prefix" />
|
||||
<newline/>
|
||||
<field name="state" />
|
||||
<newline/>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Delegated Task" colspan="4"/>
|
||||
<field name="user_id" colspan="4"/>
|
||||
<field name="planned_hours" widget="float_time" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="new_task_description" colspan="4" />
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Validation Task" colspan="4"/>
|
||||
<field name="planned_hours_me" widget="float_time" colspan="4"/>
|
||||
<field name="prefix" colspan="4"/>
|
||||
<field name="state" colspan="4"/>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" name="validate" string="Approve" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user