[IMP] Project: Improve view of Delegrate wizard ,

Done wizard:Imroive the view and update the description

bzr revid: sbh@tinyerp.com-20100826070703-4sz1lk8lmjlp5e97
This commit is contained in:
sbh (Open ERP)
2010-08-26 12:37:03 +05:30
parent 354265b46f
commit 6bd70936d1
4 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -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'}"/>
+7 -1
View File
@@ -75,8 +75,14 @@ class project_close_task(osv.osv_memory):
}
def close(self, cr, uid, ids, context=None):
data=self.read(cr,uid,ids)[0]
description=""
user_name= self.pool.get('res.users').browse(cr, uid, uid).name
description=user_name +" At " + time.strftime('%Y-%m-%d %H:%M:%S')
description+"\n"+"======================="
description=description+ "\n "+"Closed task:\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})
self.pool.get('project.task').write(cr, uid, [context['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"/>
</group>
</form>
</field>
@@ -15,7 +15,8 @@
<newline/>
<field name="name"/>
<newline/>
<field name="new_task_description"/>
<separator string="New Task Description" colspan="4"/>
<field name="new_task_description" colspan="4" nolabel="1"/>
<newline/>
<separator string="Validation Task" colspan="4"/>
<field name="planned_hours_me" widget="float_time"/>
@@ -25,7 +26,7 @@
<field name="state" />
<newline/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Close"/>
<button icon="gtk-ok" name="validate" string="Approve" type="object"/>
</group>
</form>