Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.0 #14

Open
wants to merge 2 commits into
base: 8.0
Choose a base branch
from
Open

8.0 #14

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project_indicators/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
"data": ['project_view.xml',
'report.xml'],
"active": False,
"installable": False,
"installable": True,
}
200 changes: 106 additions & 94 deletions project_indicators/project_view.xml
Original file line number Diff line number Diff line change
@@ -1,108 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>

#---------------------------------------------------------------------------------------------------------
# Add a button to open the analytic account indicators on the project view
#---------------------------------------------------------------------------------------------------------
<record id="project_indicators" model="ir.ui.view">
<field name="name">project.project.form.indicators</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project" />
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Administration']/group[1]" position="inside">
<button name="open_project_indicators" string="Open Analytic Indicators" icon="gtk-go-forward" type="object" colspan="2" groups="project.group_project_manager"/>
</xpath>
</field>
</record>
#---------------------------------------------------------------------------------------------------------
# Add a button to open the analytic account indicators on the project
view
#---------------------------------------------------------------------------------------------------------
<record id="project_indicators" model="ir.ui.view">
<field name="name">project.project.form.indicators</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project" />
<field name="arch" type="xml">
<xpath
expr="/form/sheet/notebook/page[@string='Other Info']/group[@string='Administration']"
position="inside">
<button name="open_project_indicators" string="Open Analytic Indicators"
icon="gtk-go-forward" type="object" colspan="2"
groups="project.group_project_manager" />
</xpath>
</field>
</record>


#---------------------------------------------------------------------------------------------------------
# Indicators view of analytic account to be displayed from the project view
#---------------------------------------------------------------------------------------------------------
<record model="ir.ui.view" id="account_analytic_account_wizard_indicators">
<field name="name">account.analytic.account.wizard.indicators</field>
<field name="model">account.analytic.account</field>
<field name="type">form</field>
<field name="priority">200</field>
<field name="arch" type="xml">
<form string="Project Indicators">
<separator colspan="4" string="Work done stats"/>
#---------------------------------------------------------------------------------------------------------
# Indicators view of analytic account to be displayed from the project
view
#---------------------------------------------------------------------------------------------------------
<record model="ir.ui.view" id="account_analytic_account_wizard_indicators">
<field name="name">account.analytic.account.wizard.indicators</field>
<field name="model">account.analytic.account</field>
<field name="type">form</field>
<field name="priority">200</field>
<field name="arch" type="xml">
<form string="Project Indicators">
<separator colspan="4" string="Work done stats" />

<field name="total_cost"/>
<field name="remaining_ca"/>
<field name="ca_invoiced"/>
<field name="ca_theorical"/>
<newline/>
<field name="hours_quantity" widget="float_time"/>
<field name="hours_qtt_invoiced" widget="float_time"/>
<field name="remaining_hours" widget="float_time"/>
<newline/>
<separator colspan="4" string="Analysis stats"/>
<field name="total_cost" />
<field name="remaining_ca" />
<field name="ca_invoiced" />
<field name="ca_theorical" />
<newline />
<field name="hours_quantity" widget="float_time" />
<field name="hours_qtt_invoiced" widget="float_time" />
<field name="remaining_hours" widget="float_time" />
<newline />
<separator colspan="4" string="Analysis stats" />

<field name="revenue_per_hour"/>
<field name="real_margin"/>
<field name="real_margin_rate"/>
<field name="theorical_margin"/>
<separator colspan="4" string="Key dates"/>
<field name="revenue_per_hour" />
<field name="real_margin" />
<field name="real_margin_rate" />
<field name="theorical_margin" />
<separator colspan="4" string="Key dates" />

<field name="last_invoice_date"/>
<field name="last_worked_invoiced_date"/>
<field name="last_worked_date"/>
<separator colspan="4" string="To be invoiced"/>
<field name="last_invoice_date" />
<field name="last_worked_invoiced_date" />
<field name="last_worked_date" />
<separator colspan="4" string="To be invoiced" />

<field name="hours_qtt_non_invoiced" widget="float_time"/>
<field name="ca_to_invoice"/>
<separator colspan="4"/>
<button colspan="4" special="cancel" string="_Ok" icon="gtk-ok" />
</form>
</field>
</record>
<field name="hours_qtt_non_invoiced" widget="float_time" />
<field name="ca_to_invoice" />
<separator colspan="4" />
<button colspan="4" special="cancel" string="_Ok" icon="gtk-ok" />
</form>
</field>
</record>


#---------------------------------------------------------------------------------------------------------
# Add useful fields on task view tree
#---------------------------------------------------------------------------------------------------------
<record id="view_task_tree2_time_fields" model="ir.ui.view">
<field name="name">project.task.tree.time.fields</field>
<field name="model">project.task</field>
<field name="type">tree</field>
<field name="inherit_id" ref="project.view_task_tree2" />
<field name="arch" type="xml">
<data>
<field name="planned_hours" position="replace">
<field name="planned_hours" widget="float_time" sum="Planned Hours" />
</field>
<field name="total_hours" position="replace">
<field name="total_hours" widget="float_time" sum="Total Hours" />
</field>
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1" position="replace">
<field name="effective_hours" widget="float_time" sum="Spent Hours"/>
</field>
<field name="remaining_hours" position="after">
<field name="delay_hours" widget="float_time" sum="Delay Hours"/>
<field name="planning_error_percentage" sum="Percentage Error"/>
</field>
</data>
</field>
</record>
#---------------------------------------------------------------------------------------------------------
# Add useful fields on task view tree
#---------------------------------------------------------------------------------------------------------
<record id="view_task_tree2_time_fields" model="ir.ui.view">
<field name="name">project.task.tree.time.fields</field>
<field name="model">project.task</field>
<field name="type">tree</field>
<field name="inherit_id" ref="project.view_task_tree2" />
<field name="arch" type="xml">
<data>
<field name="planned_hours" position="replace">
<field name="planned_hours" widget="float_time" sum="Planned Hours" />
</field>
<field name="total_hours" position="replace">
<field name="total_hours" widget="float_time" sum="Total Hours" />
</field>
<field name="effective_hours" widget="float_time" sum="Spent Hours"
invisible="1" position="replace">
<field name="effective_hours" widget="float_time" sum="Spent Hours" />
</field>
<field name="remaining_hours" position="after">
<field name="delay_hours" widget="float_time" sum="Delay Hours" />
<field name="planning_error_percentage" sum="Percentage Error" />
</field>
</data>
</field>
</record>

#---------------------------------------------------------------------------------------------------------
# Add useful fields on task view form
#---------------------------------------------------------------------------------------------------------
<record id="view_task_form2_time_fields" model="ir.ui.view">
<field name="name">project.task.form.time.fields</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Information']/group[2]" position="after">
<field name="delay_hours" widget="float_time" sum="Delay Hours"/>
<field name="planning_error_percentage" sum="Percentage Error"/>
</xpath>
</field>
</record>
#---------------------------------------------------------------------------------------------------------
# Add useful fields on task view form
#---------------------------------------------------------------------------------------------------------
<record id="view_task_form2_time_fields" model="ir.ui.view">
<field name="name">project.task.form.time.fields</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page[@string='Extra Info']/group[2]"
position="after">

</data>
<group>
<field name="delay_hours" widget="float_time" sum="Delay Hours" />
<field name="planning_error_percentage" sum="Percentage Error" />

</group>
</xpath>
</field>
</record>

</data>
</openerp>