[MERGE]: Merged lp:~openerp-dev/openobject-addons/trunk-project-view-improvement-bde
bzr revid: atp@tinyerp.com-20120626062015-3ouunhuvfncggyvv
This commit is contained in:
commit
edc26e341a
|
@ -422,7 +422,7 @@ class resource_calendar_leaves(osv.osv):
|
||||||
_inherit = "resource.calendar.leaves"
|
_inherit = "resource.calendar.leaves"
|
||||||
_description = "Leave Detail"
|
_description = "Leave Detail"
|
||||||
_columns = {
|
_columns = {
|
||||||
'holiday_id': fields.many2one("hr.holidays", "Holiday"),
|
'holiday_id': fields.many2one("hr.holidays", "Leave Request"),
|
||||||
}
|
}
|
||||||
|
|
||||||
resource_calendar_leaves()
|
resource_calendar_leaves()
|
||||||
|
|
|
@ -446,7 +446,7 @@
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="inherit_id" ref="resource.resource_calendar_leave_form"/>
|
<field name="inherit_id" ref="resource.resource_calendar_leave_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="date_to" position="after">
|
<field name="name" position="after">
|
||||||
<field name="holiday_id"/>
|
<field name="holiday_id"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -712,7 +712,7 @@ class task(base_stage, osv.osv):
|
||||||
'project.task.work': (_get_task, ['hours'], 10),
|
'project.task.work': (_get_task, ['hours'], 10),
|
||||||
}),
|
}),
|
||||||
'remaining_hours': fields.float('Remaining Hours', digits=(16,2), help="Total remaining time, can be re-estimated periodically by the assignee of the task."),
|
'remaining_hours': fields.float('Remaining Hours', digits=(16,2), help="Total remaining time, can be re-estimated periodically by the assignee of the task."),
|
||||||
'total_hours': fields.function(_hours_get, string='Total Hours', multi='hours', help="Computed as: Time Spent + Remaining Time.",
|
'total_hours': fields.function(_hours_get, string='Total', multi='hours', help="Computed as: Time Spent + Remaining Time.",
|
||||||
store = {
|
store = {
|
||||||
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours'], 10),
|
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours'], 10),
|
||||||
'project.task.work': (_get_task, ['hours'], 10),
|
'project.task.work': (_get_task, ['hours'], 10),
|
||||||
|
|
|
@ -359,10 +359,10 @@
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="user_id" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
|
<field name="user_id" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
|
||||||
|
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
|
||||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
|
|
||||||
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
|
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
|
||||||
groups="project.group_time_work_estimation_tasks"
|
groups="project.group_time_work_estimation_tasks"
|
||||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||||
|
@ -382,14 +382,16 @@
|
||||||
<field name="hours" widget="float_time" sum="Spent Hours"/>
|
<field name="hours" widget="float_time" sum="Spent Hours"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
<group class="oe_subtotal_footer oe_right" name="project_hours" groups="project.group_time_work_estimation_tasks">
|
<group>
|
||||||
|
<button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" target="new" states="open,pending" icon="gtk-edit"/>
|
||||||
|
<group class="oe_subtotal_footer oe_right" name="project_hours" groups="project.group_time_work_estimation_tasks">
|
||||||
<field name="effective_hours" widget="float_time"/>
|
<field name="effective_hours" widget="float_time"/>
|
||||||
<label for="remaining_hours" string="Remaining" groups="project.group_time_work_estimation_tasks"/>
|
<label for="remaining_hours" string="Remaining" groups="project.group_time_work_estimation_tasks"/>
|
||||||
<div>
|
<div>
|
||||||
<button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" target="new" states="open,pending" icon="gtk-edit"/>
|
|
||||||
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" groups="project.group_time_work_estimation_tasks"/>
|
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" groups="project.group_time_work_estimation_tasks"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="total_hours" widget="float_time" class="oe_subtotal_footer_separator"/>
|
<field name="total_hours" widget="float_time" class="oe_subtotal_footer_separator"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<div class="oe_clear"/>
|
<div class="oe_clear"/>
|
||||||
</page>
|
</page>
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
<field name="version_id" widget="selection"/>
|
<field name="version_id" widget="selection"/>
|
||||||
<field name="priority"/>
|
<field name="priority"/>
|
||||||
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
|
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
|
||||||
<field name="state" groups="base.group_no_one"/>
|
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<field name="description" placeholder="Add a description..." />
|
<field name="description" placeholder="Add a description..." />
|
||||||
|
@ -112,6 +111,10 @@
|
||||||
<field name="id"/>
|
<field name="id"/>
|
||||||
<field name="active"/>
|
<field name="active"/>
|
||||||
</group>
|
</group>
|
||||||
|
<group colspan="4" col="4">
|
||||||
|
<separator string="State" colspan="4"/>
|
||||||
|
<field name="state" groups="base.group_no_one"/>
|
||||||
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
|
|
|
@ -10,11 +10,15 @@
|
||||||
<field name="project_id" position="attributes">
|
<field name="project_id" position="attributes">
|
||||||
<attribute name="on_change">on_change_project(project_id)</attribute>
|
<attribute name="on_change">on_change_project(project_id)</attribute>
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//notebook" position="before">
|
<field name="active" position="after">
|
||||||
<field name="analytic_account_id"
|
<separator string="Analytic Account" colspan="4"/>
|
||||||
domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]"
|
<newline/>
|
||||||
on_change='on_change_account_id(analytic_account_id)'/>
|
<group colspan="4" col="4">
|
||||||
</xpath>
|
<field name="analytic_account_id"
|
||||||
|
domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]"
|
||||||
|
on_change='on_change_account_id(analytic_account_id)'/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
<xpath expr="//notebook/page[@string='Extra Info']" position="before">
|
<xpath expr="//notebook/page[@string='Extra Info']" position="before">
|
||||||
<page string="Worklogs">
|
<page string="Worklogs">
|
||||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||||
|
|
|
@ -207,13 +207,12 @@
|
||||||
<group>
|
<group>
|
||||||
<field name="constraint_date_start"/>
|
<field name="constraint_date_start"/>
|
||||||
<field name="constraint_date_end"/>
|
<field name="constraint_date_end"/>
|
||||||
|
<field name="user_force_ids" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="sequence"/>
|
<field name="sequence"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<separator string="Force Assigned Users"/>
|
|
||||||
<field name="user_force_ids" widget="many2many_tags" />
|
|
||||||
<separator string="Previous Phases"/>
|
<separator string="Previous Phases"/>
|
||||||
<field name="previous_phase_ids"/>
|
<field name="previous_phase_ids"/>
|
||||||
<separator string="Next Phases"/>
|
<separator string="Next Phases"/>
|
||||||
|
@ -326,7 +325,7 @@
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="inherit_id" ref="project.view_task_form2"/>
|
<field name="inherit_id" ref="project.view_task_form2"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='effective_hours']" position="after">
|
<xpath expr="//field[@name='user_id']" position="after">
|
||||||
<field name="phase_id" context="{'default_project_id' : project_id}"/>
|
<field name="phase_id" context="{'default_project_id' : project_id}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -120,11 +120,11 @@
|
||||||
<field name="model">resource.calendar.attendance</field>
|
<field name="model">resource.calendar.attendance</field>
|
||||||
<field name="type">tree</field>
|
<field name="type">tree</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Working Time">
|
<tree string="Working Time" editable="top">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="dayofweek"/>
|
<field name="dayofweek"/>
|
||||||
<field name="hour_from" widget="float_time" />
|
<field name="hour_from" widget="float_time"/>
|
||||||
<field name="hour_to" widget="float_time" />
|
<field name="hour_to" widget="float_time"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -135,11 +135,16 @@
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Working Time" version="7.0">
|
<form string="Working Time" version="7.0">
|
||||||
<field colspan="4" name="name"/>
|
<group>
|
||||||
<field name="date_from"/>
|
<field name="name"/>
|
||||||
<field name="dayofweek"/>
|
<field name="date_from"/>
|
||||||
<field name="hour_from" widget="float_time"/>
|
<field name="dayofweek"/>
|
||||||
<field name="hour_to" widget="float_time"/>
|
<label for="hour_from" string="Hours"/>
|
||||||
|
<div>
|
||||||
|
<field name="hour_from" widget="float_time"/> -
|
||||||
|
<field name="hour_to" widget="float_time"/>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -179,16 +184,18 @@
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Resource" version="7.0">
|
<form string="Resource" version="7.0">
|
||||||
<group col="4">
|
<group>
|
||||||
<field name="name" colspan="4"/>
|
<group>
|
||||||
<field name="active"/>
|
<field name="name"/>
|
||||||
<newline/>
|
<field name="user_id" attrs="{'required':[('resource_type','=','user')], 'readonly':[('resource_type','=','material')]}"/>
|
||||||
<field name="user_id" attrs="{'required':[('resource_type','=','user')], 'readonly':[('resource_type','=','material')]}"/>
|
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||||
<field name="resource_type" />
|
<field name="active"/>
|
||||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
</group>
|
||||||
<newline/>
|
<group>
|
||||||
<field name="calendar_id" string="Working Period"/>
|
<field name="resource_type" />
|
||||||
<field name="time_efficiency"/>
|
<field name="calendar_id"/>
|
||||||
|
<field name="time_efficiency"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
@ -225,21 +232,22 @@
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Leave Detail" version="7.0">
|
<form string="Leave Detail" version="7.0">
|
||||||
<sheet>
|
<sheet>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="resource_id" on_change="onchange_resource(resource_id)"/>
|
<field name="resource_id" on_change="onchange_resource(resource_id)"/>
|
||||||
<field name="name" string="Reason"/>
|
<field name="name" string="Reason"/>
|
||||||
|
<label for="date_from" string="Duration"/>
|
||||||
|
<div>
|
||||||
|
<field name="date_from" nolabel="1"/> -
|
||||||
|
<field name="date_to" nolabel="1"/>
|
||||||
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="date_from"/>
|
|
||||||
<field name="calendar_id" string="Working Period"/>
|
<field name="calendar_id" string="Working Period"/>
|
||||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
</group>
|
||||||
<field name="date_to"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|
Loading…
Reference in New Issue