170 lines
8.7 KiB
XML
170 lines
8.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
<record id="project_invoice_form" model="ir.ui.view">
|
|
<field name="name">Inherit project form : Invoicing Data</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="//field[@name='task']" position='after'>
|
|
<field name="timesheets"/>
|
|
</xpath>
|
|
|
|
<field name="warn_customer" position="after">
|
|
<group colspan="4" col="4">
|
|
<separator colspan="4" string="Invoicing Data"/>
|
|
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection"/>
|
|
<field name="to_invoice" widget="selection" string="Invoice Task Work"/>
|
|
<field name="amount_max" groups="base.group_extended"/>
|
|
<field name="amount_invoiced" groups="base.group_extended"/>
|
|
</group>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_project_kanban_inherited" model="ir.ui.view">
|
|
<field name="name">project.project.kanban.inherited</field>
|
|
<field name="model">project.project</field>
|
|
<field name="type">kanban</field>
|
|
<field name="inherit_id" ref="project.view_project_kanban"/>
|
|
<field name="arch" type="xml">
|
|
<field name="task" position="after">
|
|
<field name="timesheets"/>
|
|
<field name="total_hours"/>
|
|
<field name="effective_hours"/>
|
|
</field>
|
|
<xpath expr="//t[@t-name='tasks']" position="after">
|
|
<t t-name="timesheets">
|
|
<ul class="oe_kanban_tooltip">
|
|
<li><b>Timesheets</b></li>
|
|
</ul>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//td[@class='buttons']" position="inside">
|
|
<t t-if="record.timesheets.raw_value">
|
|
<button name="open_timesheets" class="oe_project_buttons" type="object" tooltip="timesheets"><img src="/project_timesheet/static/src/img/timesheet_icon.png" class="project_icon"/></button>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//td[@class='td_image']" position="inside">
|
|
<div class="sequence">
|
|
<kbd class="user">Remaining Hours</kbd>
|
|
<div class="manager"><b><t t-esc="Math.round(record.total_hours.raw_value-record.effective_hours.raw_value)"/> h</b></div>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//td[@class='td_deadline']" position="inside">
|
|
<div class="sequence">
|
|
<kbd class="user">To invoice</kbd>
|
|
<div class="manager"><b><field name="amount_invoiced"/> <field name="currency_id"/></b></div>
|
|
</div>
|
|
<div class="sequence">
|
|
<button name="open_timesheets" class="oe_to_invoice_buttons" type="object" context="{'invoice':1}">Invoice</button>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="project_invoice_form_cutomer" model="ir.ui.view">
|
|
<field name="name">Inherit project form : Customer</field>
|
|
<field name="model">project.project</field>
|
|
<field name="type">form</field>
|
|
<field name="inherit_id" ref="project_invoice_form"/>
|
|
<field name="arch" type="xml">
|
|
<field name="partner_id" position="replace">
|
|
<field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer" attrs="{'required':[('to_invoice','!=',False)]}"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="project_invoice_search" model="ir.ui.view">
|
|
<field name="name">Inherit project search view : Invoicing Data</field>
|
|
<field name="model">project.project</field>
|
|
<field name="type">search</field>
|
|
<field name="inherit_id" ref="project.view_project_project_filter"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr='//filter[@string="Member"]' position='after'>
|
|
<separator orientation="vertical"/>
|
|
<filter icon="terp-camera_test" string="Billable" domain="[('to_invoice','!=', False)]" help="Billable Project"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_analytic_line_search_account_inherit" model="ir.ui.view">
|
|
<field name="name">account.analytic.line.search.account_id</field>
|
|
<field name="model">account.analytic.line</field>
|
|
<field name="type">search</field>
|
|
<field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
|
|
<field name="arch" type="xml">
|
|
<field name="account_id" position="replace">
|
|
<field name="account_id" string="Analytic account/project" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_analytic_line_form_inherit_account_id" model="ir.ui.view">
|
|
<field name="name">account.analytic.line.form.account_id</field>
|
|
<field name="model">account.analytic.line</field>
|
|
<field name="type">form</field>
|
|
<field name="inherit_id" ref="account.view_account_analytic_line_form"/>
|
|
<field name="arch" type="xml">
|
|
<field name="account_id" position="replace">
|
|
<field name="account_id" string="Analytic account/project" on_change="on_change_account_id(account_id)"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_analytic_line_tree_inherit_account_id" model="ir.ui.view">
|
|
<field name="name">account.analytic.line.tree.account_id</field>
|
|
<field name="model">account.analytic.line</field>
|
|
<field name="type">tree</field>
|
|
<field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
|
|
<field name="arch" type="xml">
|
|
<field name="account_id" position="replace">
|
|
<field name="account_id" string="Analytic account/project"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Menus -->
|
|
<record id="action_project_timesheet_bill_task" model="ir.actions.act_window">
|
|
<field name="name">Bill Tasks Works</field>
|
|
<field name="res_model">account.analytic.line</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[]</field>
|
|
<field name="context">{}</field>
|
|
<field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
|
|
<field name="help">You will find here all works made on tasks that you can invoice.
|
|
In order to invoice the time spent on a project, you must define the
|
|
pricelist and the field 'Invoice Task Work' on the tab 'Billing' of
|
|
the project form.</field>
|
|
</record>
|
|
<menuitem action="hr_timesheet.action_hr_timesheet_sign_in"
|
|
id="menu_hr_timesheet_sign_in"
|
|
groups="base.group_extended"
|
|
parent="hr_attendance.menu_hr_attendance"
|
|
sequence="5" />
|
|
|
|
<menuitem id="menu_project_billing" name="Invoicing"
|
|
parent="base.menu_main_pm" sequence="5"/>
|
|
<menuitem id="menu_project_billing_line" name="Invoice Tasks Work"
|
|
parent="menu_project_billing" action="action_project_timesheet_bill_task"/>
|
|
|
|
<!--
|
|
Time Tracking menu in project Management
|
|
-->
|
|
<!-- <menuitem id="menu_project_working_hours" parent="base.menu_project_management_time_tracking" action="hr_timesheet.act_hr_timesheet_line_evry1_all_form"/> -->
|
|
|
|
<record id="action_account_analytic_overdue" model="ir.actions.act_window">
|
|
<field name="name">Customer Projects</field>
|
|
<field name="res_model">account.analytic.account</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form,graph</field>
|
|
<field name="context">{}</field>
|
|
<field name="domain">[('type','=','normal')]</field>
|
|
<field name="search_view_id" ref="account_analytic_analysis.view_account_analytic_account_overdue_search"/>
|
|
<field name="help">You will find here the contracts related to your customer projects in order to track the invoicing progress.</field>
|
|
</record>
|
|
<menuitem id="menu_invoicing_contracts" parent="menu_project_billing" sequence="4"
|
|
action="account_analytic_analysis.action_account_analytic_overdue"/>
|
|
|
|
</data>
|
|
</openerp>
|