commit
22e09cc3f5
|
@ -78,10 +78,6 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('type','=','Project')]</field>
|
||||
</record>
|
||||
|
||||
<!--Actions for deshboard -->
|
||||
|
||||
|
||||
<record id="board_project_form" model="ir.ui.view">
|
||||
<field name="name">board.project.form</field>
|
||||
<field name="model">board.board</field>
|
||||
|
|
|
@ -25,6 +25,7 @@ from datetime import datetime, date
|
|||
|
||||
from tools.translate import _
|
||||
from osv import fields, osv
|
||||
from tools import email_send as email
|
||||
|
||||
class project_task_type(osv.osv):
|
||||
_name = 'project.task.type'
|
||||
|
@ -701,10 +702,12 @@ class config_compute_remaining(osv.osv_memory):
|
|||
|
||||
_columns = {
|
||||
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Put here the remaining hours required to close the task."),
|
||||
'email':fields.boolean('Email', help="If True then send a email of assigned user and description"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'remaining_hours': _get_remaining
|
||||
'remaining_hours': _get_remaining,
|
||||
'email':lambda *a : True,
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
|
@ -736,13 +739,18 @@ class config_compute_remaining(osv.osv_memory):
|
|||
return res
|
||||
|
||||
def compute_hours(self, cr, uid, ids, context=None):
|
||||
data=self.read(cr,uid,ids)[0]
|
||||
if context is None:
|
||||
context = {}
|
||||
task_obj = self.pool.get('project.task')
|
||||
request = self.pool.get('res.request')
|
||||
user_obj=self.pool.get('res.users')
|
||||
if 'active_id' in context:
|
||||
user_name = self.pool.get('res.users').browse(cr, uid, uid).name
|
||||
description = _("Reopen By ") + user_name + _(" At ") + time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
description += "\n" + "=================================" + "\n"
|
||||
remaining_hrs = self.browse(cr,uid,ids)[0].remaining_hours
|
||||
task_obj.write(cr,uid,context['active_id'],{'remaining_hours':remaining_hrs})
|
||||
task_obj.write(cr,uid,context['active_id'],{'remaining_hours':remaining_hrs,'description':description})
|
||||
if context.get('button_reactivate', False):
|
||||
tasks = task_obj.browse(cr, uid, [context['active_id']], context=context)
|
||||
for task in tasks:
|
||||
|
@ -758,12 +766,31 @@ class config_compute_remaining(osv.osv_memory):
|
|||
'ref_doc2': 'project.project,%d' % project.id,
|
||||
})
|
||||
task_obj.write(cr, uid, [task.id], {'state': 'open'})
|
||||
if data['email']:
|
||||
if not task.user_id.user_email:
|
||||
raise osv.except_osv(_('Error'), _("Couldn't send mail because email address is not configured!"))
|
||||
else:
|
||||
val = {
|
||||
'name': task.name,
|
||||
'user_id': task.user_id.name,
|
||||
'task_id': "%d/%d" % (project.id, task.id),
|
||||
'state': task.state
|
||||
}
|
||||
subject = "Reopen Task '%s' " % task.name
|
||||
user_email= user_obj.browse(cr, uid, uid).address_id.email
|
||||
signature=user_obj.browse(cr, uid, uid).signature
|
||||
header = (project.warn_header or '') % val
|
||||
footer = (project.warn_footer or '') % val
|
||||
body = u'%s\n%s\n%s\n\n-- \n%s' % (header, task.description, footer, signature)
|
||||
mail_id = email(user_email,[task.user_id.user_email], subject, body.encode('utf-8'), email_bcc=[user_email])
|
||||
if not mail_id:
|
||||
raise osv.except_osv(_('Error'), _("Couldn't send mail! Check the email ids and smtp configuration settings"))
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.act_window_close',
|
||||
}
|
||||
|
||||
config_compute_remaining()
|
||||
|
||||
class account_analytic_account(osv.osv):
|
||||
|
||||
_inherit = 'account.analytic.account'
|
||||
|
|
|
@ -254,7 +254,5 @@
|
|||
<field name="project_id" ref="project_project_22"/>
|
||||
<field name="name">Latest in house tests</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -198,6 +198,7 @@
|
|||
<separator colspan="4" string="Change Remaining Time"/>
|
||||
<newline/>
|
||||
<field name="remaining_hours" widget="float_time"/>
|
||||
<field name="email"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_project_project_manager","project.project manager","model_project_project","project.group_project_manager",1,0,0,0
|
||||
"access_project_project_manager","project.project manager","model_project_project","project.group_project_manager",1,1,1,1
|
||||
"access_account_analytic_account_manager","account.analytic.account","analytic.model_account_analytic_account","project.group_project_manager",1,0,0,0
|
||||
"access_project_project","project.project","model_project_project","project.group_project_user",1,1,1,1
|
||||
"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","project.group_project_user",1,1,1,1
|
||||
"access_project_task_type_user","project.task.type user","model_project_task_type","project.group_project_user",1,1,1,1
|
||||
"access_project_task_type","project.task.type","model_project_task_type","project.group_project_manager",1,1,1,1
|
||||
"access_project_task_manager","project.task manager","model_project_task","project.group_project_manager",1,0,0,0
|
||||
"access_project_task_manager","project.task manager","model_project_task","project.group_project_manager",1,1,1,1
|
||||
"access_project_task","project.task","model_project_task","project.group_project_user",1,1,1,1
|
||||
"access_project_task_work","project.task.work","model_project_task_work","project.group_project_user",1,1,1,1
|
||||
"access_project_task_work_manager","project.task.work.manager","model_project_task_work","project.group_project_manager",1,1,1,1
|
||||
|
|
|
|
@ -86,6 +86,7 @@
|
|||
<field name="view_id" ref="board_project_issue_form"/>
|
||||
</record>
|
||||
<menuitem id="menu_deshboard_project_issue" name="Project Issue Dashboard" parent="project.next_id_86"
|
||||
icon="terp-graph"
|
||||
action="open_board_project_issue"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -63,10 +63,10 @@
|
|||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" />
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
|
||||
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
|
|
|
@ -23,15 +23,16 @@
|
|||
<record id="res_users_manager0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">Manager1</field>
|
||||
<field name="name">Anthony</field>
|
||||
<field name="context_project_id" ref="project.project_project_9"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_manager')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">manager1</field>
|
||||
<field name="password">manager1</field>
|
||||
<field name="login">Anthony</field>
|
||||
<field name="password">Anthony</field>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
|
@ -53,30 +54,31 @@
|
|||
<record id="res_users_user0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user1</field>
|
||||
<field name="name">Olivier as analysit</field>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="context_project_id" ref="project.project_project_9"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user1</field>
|
||||
<field name="password">USER1</field>
|
||||
<field name="login">Olivier</field>
|
||||
<field name="password">Olivier</field>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_user1" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user2</field>
|
||||
<field name="name">Quentin as developer</field>
|
||||
<field name="context_project_id" ref="project.project_project_9"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user2</field>
|
||||
<field name="password">user2</field>
|
||||
<field name="login">Quentin</field>
|
||||
<field name="password">Quentin</field>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -314,13 +314,13 @@
|
|||
|
||||
<menuitem action="act_project_phase"
|
||||
groups="base.group_extended"
|
||||
id="menu_project_phase" parent="base.menu_project_long_term" sequence="1"/>
|
||||
id="menu_project_phase" icon="terp-project" parent="base.menu_project_long_term" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_resouce_allocation" action="act_resouce_allocation"
|
||||
name="Resource Allocations" parent="base.menu_project_long_term" sequence="2"/>
|
||||
name="Resource Allocations" icon="terp-project" parent="base.menu_project_long_term" sequence="2"/>
|
||||
|
||||
<menuitem id="menu_pm_resources_project1"
|
||||
groups="base.group_extended"
|
||||
groups="base.group_extended" icon="terp-project"
|
||||
name="Resources" parent="project.menu_definitions" sequence="3"/>
|
||||
|
||||
<menuitem id="menu_phase_schedule" name="Scheduling" parent="base.menu_project_long_term" sequence="4" groups="project.group_project_user,project.group_project_manager,base.group_system"/>
|
||||
|
|
|
@ -8,19 +8,20 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Compute Scheduling of Phases">
|
||||
<group width="380" height="180">
|
||||
<group width="410" height="180">
|
||||
<group colspan="4" col="4">
|
||||
<label colspan="4" string="This wizard will schedule phases for all or specified project" />
|
||||
<separator colspan="4" string="This wizard will schedule phases for all or specified project" />
|
||||
<newline />
|
||||
<field name="target_project" colspan="4"/>
|
||||
</group>
|
||||
<newline />
|
||||
<newline />
|
||||
<group colspan="4" col="6" attrs="{'invisible':[('target_project','=','all')]}">
|
||||
<field name="project_id"/>
|
||||
<label string="Project:" align="1.0"/>
|
||||
<field name="project_id" nolabel="1" colspan="2" widget="selection" />
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6"> <!-- Improve me -->
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" name="check_selection" string="_Compute" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
<field name="model">project.compute.tasks</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Compute Scheduling of Phases">
|
||||
<group colspan="4" height="100" width="500">
|
||||
<field name="project_id"/>
|
||||
<form string="Compute Scheduling of Task">
|
||||
<group colspan="4" height="120" width="500">
|
||||
<separator colspan="4" string="This wizard will schedule Task for all or specified project" />
|
||||
<field name="project_id" widget="selection"/>
|
||||
<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="compute_date" string="Compute" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': ['project_messages_view.xml'],
|
||||
'demo_xml': [],
|
||||
'demo_xml': ['project_message_data.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="project_message_1" model="project.message">
|
||||
<field name="project_id" ref="project.project_project_23"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="description">Follow the procedure of Configuration wizard.
|
||||
- Add all required modules
|
||||
- Add chat of accounts
|
||||
- Create Users</field>
|
||||
<field name="subject">Configuration steps</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -90,8 +90,20 @@
|
|||
<field name="search_view_id" ref="view_project_messages_search"/>
|
||||
<field name="context">{"search_default_to_id":uid}</field>
|
||||
<field name="view_id" ref="view_project_message_tree"/>
|
||||
<field name="help">An in-project messagery system permits an efficient and trackable communication between project members. The messages are kept in the system and can then be used for post-analysis.</field>
|
||||
</record>
|
||||
|
||||
|
||||
<act_window domain="[('project_id', '=', active_id)]" id="act_project_messages" name="Messages" res_model="project.messages" src_model="project.project"/>
|
||||
|
||||
<!--Actions for deshboard -->
|
||||
|
||||
<record id="action_view_project_editable_messages_tree" model="ir.actions.act_window">
|
||||
<field name="name">Messages</field>
|
||||
<field name="res_model">project.messages</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="project_messages.view_project_message_tree"/>
|
||||
</record>
|
||||
<menuitem action="messages_form" id="menu_messages_form" parent="project.menu_project_management"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<menuitem
|
||||
id="menu_deshboard_scurm"
|
||||
name="Scrum Dashboard" parent="project.next_id_86"
|
||||
icon="terp-graph"
|
||||
action="open_board_project_scrum"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button special="cancel" string="Close" icon='gtk-close'/>
|
||||
<button name="do_create" string="Create Tasks" colspan="1" type="object" icon="gtk-execute"/>
|
||||
</group>
|
||||
</form>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<separator string="Are you sure you want to merge these Backlogs?" colspan="4"/>
|
||||
<label colspan="4" string="This wizard merge backlogs and create one new backlog with draft state (Old backlogs Will be deleted). And it also merge old tasks from backlogs" />
|
||||
<separator colspan="4"/>
|
||||
<button colspan="2" special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button colspan="2" special="cancel" string="Close" icon="gtk-close"/>
|
||||
<button colspan="2" default_focus="1" name="check_backlogs" string="Merge" type="object" icon="gtk-execute"/>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button special="cancel" string="Close" icon='gtk-close'/>
|
||||
<button name="assign_sprint" string="Assign Sprint" colspan="1" type="object" icon="gtk-execute"/>
|
||||
</group>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue