[FIX/REF] Project_issue and Project_long_term

bzr revid: jvo@tinyerp.com-20100527100031-efjpuaas23niu1kd
This commit is contained in:
Jay (Open ERP) 2010-05-27 15:30:31 +05:30
parent 7267797d80
commit bd3885749a
5 changed files with 14 additions and 19 deletions

View File

@ -34,6 +34,7 @@
'crm',
'project',
'hr_timesheet_sheet',
'project_long_term',
],
'init_xml': [
'project_issue_data.xml'

View File

@ -113,7 +113,6 @@ class project_issue(osv.osv, crm.crm_case):
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID'),
'name': fields.char('Name', size=128, required=True),
'active': fields.boolean('Active', required=False),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Update Date' , readonly=True),
'date_deadline': fields.date('Deadline'),
@ -173,7 +172,6 @@ class project_issue(osv.osv, crm.crm_case):
return False
_defaults = {
'active': lambda *a: 1,
'user_id': crm.crm_case._get_default_user,
'partner_id': crm.crm_case._get_default_partner,
'partner_address_id': crm.crm_case._get_default_partner_address,

View File

@ -82,11 +82,8 @@
<separator string="Statistics" colspan="2" col="2"/>
<field name="day_open"/>
<field name="day_close"/>
</group>
<group col="2" colspan="2">
<separator string="References" colspan="2"/>
<field name="id"/>
<field name="active"/>
</group>
<field name="log_ids" nolabel="1" colspan="4">
<tree string="Logs">
@ -143,6 +140,7 @@
<field name="arch" type="xml">
<tree string="Issue Tracker Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="create_date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="priority" string="Severity"/>
@ -155,6 +153,7 @@
states="open,draft,pending,done,cancel" />
<field name="type_id" string="Version"/>
<field name="user_id"/>
<field name="assigned_to"/>
<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"/>
@ -172,21 +171,18 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Issue Tracker Search">
<group>
<group colspan="4" col="20">
<filter icon="gtk-home" string=" Today "
separator="1"
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"
help="Todays's bugs"
help="Today's bugs"
/>
<filter icon="gtk-media-rewind"
string=" 7 Days " separator="1"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Bugs during last 7 days"
/>
</group>
<separator orientation="vertical"/>
<group>
<separator orientation="vertical"/>
<field name="name" select='1' string="Subject"/>
<field name="user_id" select="1" widget="selection"/>
<field name="state" select="1">
@ -196,7 +192,7 @@
<field name="project_id" select="1" widget="selection" string="Project"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="16" groups="base.group_extended">
<group expand="1" string="Group By..." colspan="4" col="20" groups="base.group_extended">
<filter string="Stage" icon="terp-crm" domain="[]"
context="{'group_by':'stage_id'}" />
<filter string="Priority" icon="terp-crm" domain="[]"
@ -271,7 +267,7 @@
<filter icon="gtk-home" string=" Today "
separator="1"
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"
help="Todays's features"
help="Today's features"
/>
<filter icon="gtk-media-rewind"
string=" 7 Days " separator="1"

View File

@ -27,13 +27,13 @@
"depends" : ["project", "resource"],
"description": """
Long Term Project management module that track planning, scheduling, resources allocation.
Long Term Project management module that tracks planning, scheduling, resources allocation.
Mainly used with Big project management.
- Project Phases will be maintained by Manager of the project
- Compute Phase Scheduling: Compute start date and end date of the phases which are in draft,open and pending state of the project given.
If no project given then all the draft,open and pending states phases will be taken
- Compute Task Scheduling: This works same as the scheduler button on project.phase. It takes the project as arguement and computes all the open,draft and pending tasks
- Schedule Tasks: All the tasks which are in draft,pending and open states are scheduled with taking the phase's start date
If no project given then all the draft,open and pending state phases will be taken
- Compute Task Scheduling: This works same as the scheduler button on project.phase. It takes the project as argument and computes all the open,draft and pending tasks
- Schedule Tasks: All the tasks which are in draft,pending and open state are scheduled with taking the phase's start date
""",
"init_xml" : [],

View File

@ -33,7 +33,7 @@ class project_phase(osv.osv):
data_phase = self.browse(cr, uid, ids[0], context=context)
prev_ids = data_phase.previous_phase_ids
next_ids = data_phase.next_phase_ids
# it should nither be in prev_ids nor in next_ids
# it should neither be in prev_ids nor in next_ids
if (data_phase in prev_ids) or (data_phase in next_ids):
return False
ids = [id for id in prev_ids if id in next_ids]
@ -234,7 +234,7 @@ class project_resource_allocation(osv.osv):
_columns = {
'resource_id': fields.many2one('resource.resource', 'Resource', required=True),
'phase_id': fields.many2one('project.phase', 'Project Phase', required=True),
'useability': fields.float('Useability', help="Useability of this ressource for this project phase in percentage (=50%)"),
'useability': fields.float('Usability', help="Usability of this resource for this project phase in percentage (=50%)"),
}
_defaults = {
'useability': 100,