[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"
|
||||
_description = "Leave Detail"
|
||||
_columns = {
|
||||
'holiday_id': fields.many2one("hr.holidays", "Holiday"),
|
||||
'holiday_id': fields.many2one("hr.holidays", "Leave Request"),
|
||||
}
|
||||
|
||||
resource_calendar_leaves()
|
||||
|
|
|
@ -446,7 +446,7 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="resource.resource_calendar_leave_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_to" position="after">
|
||||
<field name="name" position="after">
|
||||
<field name="holiday_id"/>
|
||||
</field>
|
||||
</field>
|
||||
|
|
|
@ -712,7 +712,7 @@ class task(base_stage, osv.osv):
|
|||
'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."),
|
||||
'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 = {
|
||||
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours'], 10),
|
||||
'project.task.work': (_get_task, ['hours'], 10),
|
||||
|
|
|
@ -359,10 +359,10 @@
|
|||
<group>
|
||||
<group>
|
||||
<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"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
|
||||
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
|
||||
groups="project.group_time_work_estimation_tasks"
|
||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||
|
@ -382,14 +382,16 @@
|
|||
<field name="hours" widget="float_time" sum="Spent Hours"/>
|
||||
</tree>
|
||||
</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"/>
|
||||
<label for="remaining_hours" string="Remaining" groups="project.group_time_work_estimation_tasks"/>
|
||||
<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"/>
|
||||
</div>
|
||||
<field name="total_hours" widget="float_time" class="oe_subtotal_footer_separator"/>
|
||||
</group>
|
||||
</group>
|
||||
<div class="oe_clear"/>
|
||||
</page>
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
<field name="version_id" widget="selection"/>
|
||||
<field name="priority"/>
|
||||
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="description" placeholder="Add a description..." />
|
||||
|
@ -112,6 +111,10 @@
|
|||
<field name="id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<separator string="State" colspan="4"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
|
|
@ -10,11 +10,15 @@
|
|||
<field name="project_id" position="attributes">
|
||||
<attribute name="on_change">on_change_project(project_id)</attribute>
|
||||
</field>
|
||||
<xpath expr="//notebook" position="before">
|
||||
<field name="analytic_account_id"
|
||||
domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]"
|
||||
on_change='on_change_account_id(analytic_account_id)'/>
|
||||
</xpath>
|
||||
<field name="active" position="after">
|
||||
<separator string="Analytic Account" colspan="4"/>
|
||||
<newline/>
|
||||
<group colspan="4" col="4">
|
||||
<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">
|
||||
<page string="Worklogs">
|
||||
<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>
|
||||
<field name="constraint_date_start"/>
|
||||
<field name="constraint_date_end"/>
|
||||
<field name="user_force_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Force Assigned Users"/>
|
||||
<field name="user_force_ids" widget="many2many_tags" />
|
||||
<separator string="Previous Phases"/>
|
||||
<field name="previous_phase_ids"/>
|
||||
<separator string="Next Phases"/>
|
||||
|
@ -326,7 +325,7 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2"/>
|
||||
<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}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -120,11 +120,11 @@
|
|||
<field name="model">resource.calendar.attendance</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Working Time">
|
||||
<tree string="Working Time" editable="top">
|
||||
<field name="name"/>
|
||||
<field name="dayofweek"/>
|
||||
<field name="hour_from" widget="float_time" />
|
||||
<field name="hour_to" widget="float_time" />
|
||||
<field name="hour_from" widget="float_time"/>
|
||||
<field name="hour_to" widget="float_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -135,11 +135,16 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Working Time" version="7.0">
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="dayofweek"/>
|
||||
<field name="hour_from" widget="float_time"/>
|
||||
<field name="hour_to" widget="float_time"/>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="dayofweek"/>
|
||||
<label for="hour_from" string="Hours"/>
|
||||
<div>
|
||||
<field name="hour_from" widget="float_time"/> -
|
||||
<field name="hour_to" widget="float_time"/>
|
||||
</div>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -179,16 +184,18 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Resource" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="active"/>
|
||||
<newline/>
|
||||
<field name="user_id" attrs="{'required':[('resource_type','=','user')], 'readonly':[('resource_type','=','material')]}"/>
|
||||
<field name="resource_type" />
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="calendar_id" string="Working Period"/>
|
||||
<field name="time_efficiency"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<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="active"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="resource_type" />
|
||||
<field name="calendar_id"/>
|
||||
<field name="time_efficiency"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -225,21 +232,22 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Leave Detail" version="7.0">
|
||||
<sheet>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="resource_id" on_change="onchange_resource(resource_id)"/>
|
||||
<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>
|
||||
<field name="date_from"/>
|
||||
<field name="calendar_id" string="Working Period"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue