[FIX] typos and small useability improvements

bzr revid: fp@tinyerp.com-20100518131832-23y2vjpvj6lrgr6w
This commit is contained in:
Fabien Pinckaers
2010-05-18 15:18:32 +02:00
parent c132caa77e
commit b42f9b8bbd
4 changed files with 75 additions and 81 deletions
+6 -7
View File
@@ -478,23 +478,22 @@
<act_window domain="[('journal_id','=',active_id),('state','!=','draft'),('reconciled','=',False)]" id="act_account_journal_2_account_invoice_opened" name="Unpaid invoices" res_model="account.invoice" src_model="account.journal"/>
<act_window domain="[('account_analytic_id', '=', active_id)]" id="act_account_analytic_account_2_account_invoice_line" name="Invoice lines" res_model="account.invoice.line" src_model="account.analytic.account"/>
<!-- Partners inherited form -->
<!-- Partners inherited form -->
<record id="view_invoice_partner_info_form" model="ir.ui.view">
<record id="view_invoice_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.invoice.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Account Info">
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
</page>
<page string="Account Info">
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
</page>
</notebook>
</field>
</record>
</data>
</openerp>
+1 -1
View File
@@ -550,7 +550,7 @@ class config_compute_remaining(osv.osv_memory):
return False
_columns = {
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Re-estimated Time to change the remaining hours of the task"),
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Re-estimated time that will change the remaining hours of the task"),
}
_defaults = {
+46 -54
View File
@@ -40,9 +40,8 @@
<field name="sprint_id"/>
<field name="user_id"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
<field name="expected_hours" sum="Expected hours" widget="float_time"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="gtk-execute"/>
@@ -66,54 +65,47 @@
<field domain="[('project_id','=',project_id)]" name="sprint_id" select="1"/>
<field name="user_id" select="1"/>
<field name="sequence" groups="base.group_extended"/>
<field name="date"/>
<field name="date"/>
<field name="progress" widget="progressbar"/>
<!-- <group colspan="6" col="8">
<field name="effective_hours" widget="float_time"/>
<field name="planned_hours" widget="float_time"/>
<field name="expected_hours" widget="float_time"/>
<field name="progress" widget="progressbar"/>
</group>-->
</group>
<notebook colspan="4">
<page string="Information">
<group colspan="6" col="8">
<field name="effective_hours" widget="float_time"/>
<field name="planned_hours" widget="float_time"/>
<field name="expected_hours" widget="float_time"/>
</group>
<separator string="Feature Description" colspan="4"/>
<group colspan="6" col="8">
<field name="expected_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
</group>
<separator string="Feature Description" colspan="4"/>
<field colspan="4" name="note" nolabel="1"/>
</page>
<page string="Tasks">
<field colspan="4" name="tasks_id" nolabel="1" widget="one2many_list" context="{'default_project_id':project_id, 'default_sprint_id':sprint_id, 'default_product_backlog_id':active_id}">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="sequence" invisible="0"/>
<field name="name"/>
<field name="user_id"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="planned_hours" widget="float_time" />
<field name="total_hours" widget="float_time"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" invisible="context.get('set_visible',False)"/>
<field name="date_deadline" invisible="context.get('set_visible',False)"/>
<field name="type" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
<field name="date_start" invisible="1"/>
<field name="date_end" invisible="1"/>
<button name="next_type" invisible="context.get('set_visible',False)"
states="draft,open,pending"
string="Change Stage"
type="object"
icon="gtk-go-forward"
groups="base.group_extended"
help="Change Type"/>
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
<field name="state" invisible="context.get('set_visible',False)"/>
<button name="do_open" states="pending,draft,done,cancel" string="Start Task" type="object" icon="gtk-execute" help="For changing to open state" invisible="context.get('set_visible',False)"/>
<button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-execute" help="For changing to delegate state"/>
<button name="do_close" states="draft,pending,open" string="Done" type="object" icon="gtk-jump-to" help="For changing to done state"/>
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
</tree>
</field>
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="sequence" invisible="0"/>
<field name="name"/>
<field name="user_id"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="planned_hours" widget="float_time" sum="Planned Hours"/>
<field name="total_hours" widget="float_time"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" invisible="context.get('set_visible',False)"/>
<field name="date_deadline" invisible="context.get('set_visible',False)"/>
<field name="type" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
<field name="date_start" invisible="1"/>
<field name="date_end" invisible="1"/>
<button name="next_type" invisible="context.get('set_visible',False)"
states="draft,open,pending"
string="Change Stage"
type="object"
icon="gtk-go-forward"
groups="base.group_extended"
help="Change Type"/>
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
<field name="state" invisible="context.get('set_visible',False)"/>
<button name="do_open" states="pending,draft,done,cancel" string="Start Task" type="object" icon="gtk-execute" help="For changing to open state" invisible="context.get('set_visible',False)"/>
<button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-execute" help="For changing to delegate state"/>
<button name="do_close" states="draft,pending,open" string="Done" type="object" icon="gtk-jump-to" help="For changing to done state"/>
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
</tree>
</field>
</page>
</notebook>
<group col="8" colspan="4">
@@ -148,14 +140,14 @@
<field name="name"/>
<field name="project_id" widget="selection"/>
<field name="sprint_id" widget="selection">
<filter icon="terp-project"
string="Sprints"
domain="[('sprint_id.state','=','open')]"
help="Backlogs Assigned To Current Sprints"/>
<filter icon="terp-project"
string="Sprints"
domain="[('sprint_id','=',False)]"
help="Backlogs Not Assigned To Sprints."/>
<filter icon="terp-project"
string="Sprints"
domain="[('sprint_id.state','=','open')]"
help="Backlogs Assigned To Current Sprints"/>
<filter icon="terp-project"
string="Sprints"
domain="[('sprint_id','=',False)]"
help="Backlogs Not Assigned To Sprints."/>
</field>
<field name="user_id" widget="selection">
<filter default="1"
@@ -222,10 +214,10 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scrum Sprint">
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="project_id" on_change="onchange_project_id(project_id)"/>
<field name="active"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="project_id" on_change="onchange_project_id(project_id)"/>
<field name="active"/>
</group>
<notebook colspan="4">
<page string="Sprint Info">
+22 -19
View File
@@ -25,7 +25,7 @@ class scrum_backlog_merge(osv.osv_memory):
_name = 'scrum.backlog.merge'
_description = 'Merge Product Backlogs'
_columns = {
'project_id': fields.many2one('project.project', 'Project', help="Select project for new product backlog"),
'project_id': fields.many2one('project.project', 'Project', help="Select project for the new product backlog"),
}
def check_backlogs(self, cr, uid, ids, context=None):
@@ -36,12 +36,11 @@ class scrum_backlog_merge(osv.osv_memory):
context = {}
#If only one product backlog selected for merging then show an exception
if len(context['active_ids']) < 2:
raise osv.except_osv(_('Warning'),_('Please select at least two Product Backlogs'))
raise osv.except_osv(_('Warning'),_('Please select at least two product Backlogs'))
#If any of the backlog state is done then it will show an exception
for backlogs in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
if backlogs.state == "done":
raise osv.except_osv(_('Warning'),_('Merging is not allowed for Product Backlogs with Done state'))
p_list.append(backlogs.project_id.id)
#For checking whether project id's are different or same.
if len(set(p_list)) != 1:
context.update({'scrum_projects': True})
@@ -63,9 +62,6 @@ class scrum_backlog_merge(osv.osv_memory):
task_obj = self.pool.get('project.task')
task_lines = []
new_exp_hour = []
new_note = 'Merged Features :'
new_description = 'Merged Descriptions :'
count = 0
if context is None:
context = {}
#This will check product backlog's project id if different then will accept a new id provided by the user.
@@ -78,24 +74,31 @@ class scrum_backlog_merge(osv.osv_memory):
p_id = backlog_obj.read(cr, uid, context['active_id'], ['project_id'])
new_project_id = p_id['project_id'][0]
#To merge note and description of backlogs
new_note = ''
new_description = ''
for backlogs in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
count += 1
new_note += '\n' + str(count)+') ' + backlogs.name
new_description += '\n' + str(count)+') ' + (backlogs.note or backlogs.name or '')
if new_note:
new_note += ' + '
new_description += '\n\n'+('-'*50)+'\n'
new_note += backlogs.name
new_description += (backlogs.name or '') + '\n' + (backlogs.note or '')
new_exp_hour.append(backlogs.expected_hours)
for line in backlogs.tasks_id:
task_lines.append(line.id)
id_b = backlog_obj.create(cr, uid, {'name': 'Merged Product Backlogs', 'note': new_note + '\n\n' + new_description, 'project_id': new_project_id,
'expected_hours': round(max(new_exp_hour))
}, context=context)
id_b = backlog_obj.create(cr, uid, {
'name': new_note,
'note': new_description,
'project_id': new_project_id,
'expected_hours': round(max(new_exp_hour))
}, context=context)
#To assing a new product backlog to merged tasks
for tasks in task_obj.browse(cr, uid, task_lines, context=context):
task_obj.copy(cr, uid, tasks.id, {'product_backlog_id': id_b})
# This is to change the status of the old product backlogs to done state
for backlogs in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
backlog_obj.write(cr, uid, context['active_ids'], {'state':'done'}, context=context)
task_obj.write(cr, uid, task_lines, {'product_backlog_id': id_b})
backlog_obj.write(cr, uid, context['active_ids'], {'state':'done'}, context=context)
return {}
scrum_backlog_merge()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: