[IMP] project.*: usability, review of form views
bzr revid: qdp-launchpad@openerp.com-20120712144600-irb7zscuotkz4jsg
This commit is contained in:
parent
269af2189d
commit
0c4b5b5cf2
|
@ -264,8 +264,8 @@
|
|||
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
|
||||
<label for="unit_amount"/>
|
||||
<div>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
|
||||
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
|
||||
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
</td><td>
|
||||
<field name="charge_expenses"/>
|
||||
</td><td>
|
||||
<field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
<field class="oe_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
</td><td>
|
||||
<field class="oe_form_inline" name="expense_invoiced" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
<field class="oe_inline" name="expense_invoiced" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
</td><td>
|
||||
<field class="oe_form_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
<field class="oe_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
</td><td>
|
||||
<field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
<field class="oe_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
</td><td>
|
||||
<button name="open_hr_expense" string="All Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
<button name="hr_to_invoice_expense" string="Expenses to Invoice" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<label for="date_start" string="Duration"/>
|
||||
<div name="duration">
|
||||
<field name="date_start" class="oe_inline"/>
|
||||
<span attrs="{'invisible':[('date','=',False)]}" class="oe_inline"> - </span>
|
||||
<field name="date" class="oe_inline"/>
|
||||
<label attrs="{'invisible':[('date','=',False)]}" class="oe_inline" string=" - "/>
|
||||
<field name="date" class="oe_inline"/>
|
||||
</div>
|
||||
<label for="quantity_max"/>
|
||||
<div>
|
||||
|
@ -105,12 +105,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.edit_project"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="Tasks"]' position='after'>
|
||||
<label for="use_timesheets"/>
|
||||
<div>
|
||||
<field name="use_timesheets"/>
|
||||
<button icon="terp-gtk-go-back-rtl" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/>
|
||||
</div>
|
||||
<xpath expr='//tr[@name="use_tasks_row"]' position='after'>
|
||||
<tr>
|
||||
<td><group><field name="use_timesheets"/></group></td>
|
||||
<td><button icon="terp-gtk-go-back-rtl" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
|
||||
</tr>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -714,7 +714,7 @@ class task(base_stage, osv.osv):
|
|||
'parent_ids': fields.many2many('project.task', 'project_task_parent_rel', 'task_id', 'parent_id', 'Parent Tasks'),
|
||||
'child_ids': fields.many2many('project.task', 'project_task_parent_rel', 'parent_id', 'task_id', 'Delegated Tasks'),
|
||||
'notes': fields.text('Notes'),
|
||||
'planned_hours': fields.float('Planned Hours', help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'),
|
||||
'planned_hours': fields.float('Initially Planned Hours', help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'),
|
||||
'effective_hours': fields.function(_hours_get, string='Hours Spent', multi='hours', help="Computed using the sum of the task work done.",
|
||||
store = {
|
||||
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours'], 10),
|
||||
|
@ -1222,7 +1222,7 @@ class account_analytic_account(osv.osv):
|
|||
_inherit = 'account.analytic.account'
|
||||
_description = 'Analytic Account'
|
||||
_columns = {
|
||||
'use_tasks': fields.boolean('Tasks Management',help="If check,this contract will be available in the project menu and you will be able to manage tasks or track issues"),
|
||||
'use_tasks': fields.boolean('Tasks Mgmt.',help="If check,this contract will be available in the project menu and you will be able to manage tasks or track issues"),
|
||||
'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),
|
||||
}
|
||||
|
||||
|
|
|
@ -82,28 +82,24 @@
|
|||
<h1>
|
||||
<field name="name" string="Project Name"/>
|
||||
</h1>
|
||||
<label for="parent_id" class="oe_edit_only" string="Parent Project"/>
|
||||
<h2>
|
||||
<field name="parent_id" domain="[('id','!=',analytic_account_id)]" context="{'current_model': 'project.project'}"/>
|
||||
</h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="user_id" string="Project Manager" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
|
||||
<field name="analytic_account_id" invisible="1" required="0"/>
|
||||
<field name="parent_id" invisible="1" string="Parent" domain="[('id','!=',analytic_account_id)]" context="{'current_model': 'project.project'}"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="privacy_visibility"/>
|
||||
<field name="analytic_account_id" invisible="1" required="0"/>
|
||||
</group>
|
||||
<group>
|
||||
<label for="use_tasks"/>
|
||||
<div name="Tasks">
|
||||
<field name="use_tasks"/>
|
||||
<button icon="terp-gtk-go-back-rtl" name="%(act_project_project_2_project_task_all)d" string="Tasks" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/>
|
||||
</div>
|
||||
<label string=""/>
|
||||
<div style="margin-left: 15px;">
|
||||
<button icon="terp-gtk-go-back-rtl" class="oe_btn_width" name="%(base.action_attachment)d" string="Documents" type="action" />
|
||||
</div>
|
||||
<table>
|
||||
<tr name="use_tasks_row">
|
||||
<td><group><field name="use_tasks"/></group></td>
|
||||
<td><button icon="terp-gtk-go-back-rtl" name="%(act_project_project_2_project_task_all)d" string="Tasks" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/></td>
|
||||
</tr>
|
||||
<tr name="use_attachment_row">
|
||||
<td/>
|
||||
<td><button icon="terp-gtk-go-back-rtl" class="oe_btn_width" name="%(base.action_attachment)d" string="Documents" type="action" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
@ -138,6 +134,7 @@
|
|||
<field name="priority"/>
|
||||
<field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>
|
||||
<field name="currency_id" groups="base.group_multi_company" required="1"/>
|
||||
<field name="parent_id" domain="[('id','!=',analytic_account_id)]" context="{'current_model': 'project.project'}"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
@ -403,11 +400,9 @@
|
|||
states="cancel,done"/>
|
||||
-->
|
||||
<button name="%(action_project_task_reevaluate)d" string="Reactivate" type="action"
|
||||
states="done" context="{'button_reactivate':True}" class="oe_highlight"/>
|
||||
<button name="%(action_project_task_reevaluate)d" string="Reactivate" type="action"
|
||||
states="cancelled" context="{'button_reactivate':True}"/>
|
||||
states="cancelled,done" context="{'button_reactivate':True}"/>
|
||||
<button name="action_close" string="Done" type="object"
|
||||
states="draft,open,pending"/>
|
||||
states="draft,open,pending" class="oe_highlight"/>
|
||||
<button name="do_pending" string="Pending" type="object"
|
||||
states="open"/>
|
||||
<button name="%(action_project_task_delegate)d" string="Delegate" type="action"
|
||||
|
@ -416,7 +411,7 @@
|
|||
states="draft,open,pending"/>
|
||||
<button name="stage_previous" string="Previous Stage" type="object"
|
||||
states="open,pending" icon="gtk-go-back" attrs="{'invisible': [('stage_id','=', False)]}"/>
|
||||
<button name="stage_next" string="Next Stage" type="object"
|
||||
<button name="stage_next" string="Next Stage" type="object" class="oe_highlight"
|
||||
states="open,pending" icon="gtk-go-forward" attrs="{'invisible': [('stage_id','=', False)]}"/>
|
||||
</span>
|
||||
<field name="stage_id" widget="statusbar"/>
|
||||
|
@ -426,23 +421,16 @@
|
|||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<label for="project_id" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="project_id" on_change="onchange_project(project_id)"/>
|
||||
</h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="project_id" on_change="onchange_project(project_id)"/>
|
||||
<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="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
|
||||
groups="project.group_time_work_estimation_tasks"
|
||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
|
||||
<field name="progress" widget="progressbar"
|
||||
groups="project.group_time_work_estimation_tasks"
|
||||
invisible="1"/>
|
||||
groups="project.group_time_work_estimation_tasks"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
@ -457,12 +445,11 @@
|
|||
</tree>
|
||||
</field>
|
||||
<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>
|
||||
<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','in',('done','cancelled'))]}" groups="project.group_time_work_estimation_tasks"/>
|
||||
</div>
|
||||
<field name="total_hours" widget="float_time" class="oe_subtotal_footer_separator"/>
|
||||
</group>
|
||||
|
@ -491,6 +478,9 @@
|
|||
<field name="priority" groups="base.group_user"/>
|
||||
<field name="sequence"/>
|
||||
<field name="partner_id"/>
|
||||
<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)"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</page>
|
||||
|
|
|
@ -119,25 +119,35 @@
|
|||
<sheet string="Issue">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="project_id" class="oe_edit_only"/>
|
||||
<h2><field name="project_id" required="True" on_change="on_change_project(project_id)"/></h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
|
||||
<field name="email_from"/>
|
||||
</group><group>
|
||||
<field name="task_id" on_change="onchange_task_id(task_id)"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="version_id" widget="selection"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="priority"/>
|
||||
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
|
||||
<field name="project_id" required="True" on_change="on_change_project(project_id)"/>
|
||||
<label for="task_id"/>
|
||||
<div>
|
||||
<field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline"/>
|
||||
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<field name="description" placeholder="Add a description..."/>
|
||||
|
||||
<notebook groups="base.group_no_one">
|
||||
<page string="Extra Info">
|
||||
<notebook>
|
||||
<page string="Description">
|
||||
<group>
|
||||
<group>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="version_id" widget="selection"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="description" placeholder="Add a description..."/>
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_no_one">
|
||||
<group col="4" colspan="4">
|
||||
<separator string="Statistics" colspan="4" col="4"/>
|
||||
<field name="day_open"/>
|
||||
|
@ -387,12 +397,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.edit_project"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="Tasks"]' position='after'>
|
||||
<label for="use_issues"/>
|
||||
<div>
|
||||
<field name="use_issues"/>
|
||||
<button icon="terp-gtk-go-back-rtl" name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/>
|
||||
</div>
|
||||
<xpath expr='//tr[@name="use_tasks_row"]' position='after'>
|
||||
<tr>
|
||||
<td><group><field name="use_issues"/></group></td>
|
||||
<td><button icon="terp-gtk-go-back-rtl" name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/></td>
|
||||
</tr>
|
||||
</xpath>
|
||||
<field name="priority" position="before">
|
||||
<field name="project_escalation_id"/>
|
||||
|
|
|
@ -111,12 +111,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.edit_project"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="Tasks"]' position='after'>
|
||||
<label for="use_phases"/>
|
||||
<div>
|
||||
<field name="use_phases"/>
|
||||
<button icon="terp-gtk-go-back-rtl" name="%(act_project_phases)d" string="Phases" type="action" attrs="{'invisible':[('use_phases','=', 0)]}"/>
|
||||
</div>
|
||||
<xpath expr='//tr[@name="use_tasks_row"]' position='after'>
|
||||
<tr>
|
||||
<td><group><field name="use_phases"/></group></td>
|
||||
<td><button icon="terp-gtk-go-back-rtl" name="%(act_project_phases)d" string="Phases" type="action" attrs="{'invisible':[('use_phases','=', 0)]}"/></td>
|
||||
</tr>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -156,20 +155,21 @@
|
|||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="project_id" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="project_id" on_change="onchange_project(project_id)" colspan="3"/>
|
||||
</h2>
|
||||
</div>
|
||||
<group>
|
||||
<label for="date_start" string="Duration"/>
|
||||
<div>
|
||||
<div>
|
||||
<field name="duration" class="oe_inline"/>
|
||||
<field name="product_uom" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="date_start" class="oe_inline"/><label string=" - " class="oe_inline"/><field name="date_end" class="oe_inline"/>
|
||||
</div>
|
||||
<group>
|
||||
<label for="date_start" string="Duration"/>
|
||||
<div>
|
||||
<div>
|
||||
<field name="duration" class="oe_inline"/>
|
||||
<field name="product_uom" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="date_start" class="oe_inline"/><label string=" - " class="oe_inline"/><field name="date_end" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="project_id" on_change="onchange_project(project_id)"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Planning of Users">
|
||||
|
@ -209,10 +209,10 @@
|
|||
<group>
|
||||
<field name="constraint_date_start"/>
|
||||
<field name="constraint_date_end"/>
|
||||
<field name="user_force_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sequence"/>
|
||||
<field name="user_force_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Previous Phases"/>
|
||||
|
|
|
@ -262,8 +262,8 @@ class resource_calendar_attendance(osv.osv):
|
|||
'name' : fields.char("Name", size=64, required=True),
|
||||
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of Week', required=True, select=True),
|
||||
'date_from' : fields.date('Starting Date'),
|
||||
'hour_from' : fields.float('Work from', size=8, required=True, help="Start and End time of working.", select=True),
|
||||
'hour_to' : fields.float("Work to", size=8, required=True),
|
||||
'hour_from' : fields.float('Work from', required=True, help="Start and End time of working.", select=True),
|
||||
'hour_to' : fields.float("Work to", required=True),
|
||||
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True),
|
||||
}
|
||||
|
||||
|
|
|
@ -233,27 +233,25 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Leave Detail" version="7.0">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="resource_id" on_change="onchange_resource(resource_id)"/>
|
||||
<field name="name" string="Reason"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="calendar_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<field name="resource_id" on_change="onchange_resource(resource_id)"/>
|
||||
<field name="name" string="Reason"/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<label for="date_from" string="Duration"/>
|
||||
<div>
|
||||
<field name="date_from" class="oe_inline"/>-
|
||||
<field name="date_to" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<field name="calendar_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<label for="date_from" string="Duration"/>
|
||||
<div>
|
||||
<field name="date_from" class="oe_inline"/> -
|
||||
<field name="date_to" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue