You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
8.1 KiB
172 lines
8.1 KiB
<?xml version="1.0" ?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<!--
|
|
Hours block search form
|
|
-->
|
|
<record id="view_account_invoice_filter" model="ir.ui.view">
|
|
<field name="name">account.hours.block.select</field>
|
|
<field name="model">account.hours.block</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Invoice">
|
|
<group col="7" colspan="4">
|
|
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Hours Blocks"/>
|
|
<filter name="running" icon="terp-dolar" string="Running" domain="[('close_date','=',False),('state','<>','draft')]" help="All Running Hours Block"/>
|
|
<separator orientation="vertical"/>
|
|
<filter name="overdue" icon="terp-dolar_ok!" string="Overdue" domain="[('amount_hours_block_delta','<','0.0')]" help="Overdue Hours Block"/>
|
|
<separator orientation="vertical"/>
|
|
<field name="number"/>
|
|
<field name="partner_id"/>
|
|
<field name="department_id" string="Department"/>
|
|
<field name="user_id" select="1" widget="selection" string="Salesman">
|
|
<filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" separator="1"/>
|
|
</field>
|
|
|
|
<field name="company_id" widget="selection"/>
|
|
</group>
|
|
<newline/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
|
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
|
<filter string="Department" icon="terp-personal" domain="[]" context="{'group_by':'department_id'}"/>
|
|
<filter string="Invoice State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!--
|
|
Hours Block View
|
|
-->
|
|
<record id="hours_block_invoice_form" model="ir.ui.view">
|
|
<field name="name">account.hours.block.form</field>
|
|
<field name="model">account.hours.block</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Hours Blocks" version="7.0">
|
|
<header>
|
|
<button name="action_send_block" type="object" string="Send by Email" class="oe_highlight"/>
|
|
</header>
|
|
<sheet>
|
|
<h1>
|
|
<field name="invoice_id" placeholder="Choose an invoice..."/>
|
|
<label for="type" string="Based on:" class="oe_inline"/>
|
|
<field name="type" class="oe_inline"/>
|
|
</h1>
|
|
|
|
<group>
|
|
<field name="last_action_date" />
|
|
<field name="close_date" />
|
|
</group>
|
|
|
|
<group>
|
|
<separator colspan="4" string="Hours Quantity / Amount"/>
|
|
<field name="amount_hours_block" string="Bought"/>
|
|
<field name="amount_hours_block_done" string="Used"/>
|
|
<field name="amount_hours_block_delta" string="Difference"/>
|
|
</group>
|
|
|
|
<group>
|
|
<separator colspan="4" string="Invoice's related information"/>
|
|
<field name="date_invoice"/>
|
|
<field name="name"/>
|
|
<field name="number"/>
|
|
<field name="partner_id" groups="base.group_user"/>
|
|
<field name="user_id"/>
|
|
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
|
<field name="department_id" widget="selection"/>
|
|
|
|
<field name="journal_id" invisible="1"/>
|
|
<field name="period_id" invisible="1" groups="account.group_account_user"/>
|
|
|
|
<field name="currency_id"/>
|
|
<newline/>
|
|
<field name="residual" sum="Residual Amount"/>
|
|
<field name="amount_total" sum="Total Amount"/>
|
|
<field name="state"/>
|
|
</group>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="invoice_tree_hour_block">
|
|
<field name="name">account.hours.block.tree</field>
|
|
<field name="model">account.hours.block</field>
|
|
<field name="arch" type="xml">
|
|
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
|
|
<field name="date_invoice"/>
|
|
<field name="partner_id" groups="base.group_user"/>
|
|
<field name="name"/>
|
|
|
|
<field name="amount_hours_block" sum="Quantity of hours bought"/>
|
|
<field name="amount_hours_block_done" sum="Quantity of hours used" />
|
|
<field name="amount_hours_block_delta" sum="Quantity of hours difference"/>
|
|
<field name="last_action_date" />
|
|
<field name="close_date" />
|
|
|
|
<field name="journal_id" invisible="1"/>
|
|
<field name="period_id" invisible="1" groups="account.group_account_user"/>
|
|
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
|
<field name="department_id" widget="selection"/>
|
|
<field name="user_id"/>
|
|
<field name="currency_id"/>
|
|
<field name="residual" sum="Residual Amount"/>
|
|
<field name="amount_total" sum="Total Amount"/>
|
|
<field name="state"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<!--
|
|
Add related act_window from partner and Hours Block
|
|
-->
|
|
<act_window name="All blocks hours"
|
|
domain="[('partner_id', '=', active_id)]"
|
|
res_model="account.hours.block"
|
|
src_model="res.partner"
|
|
id="act_block_hour_from_partner"/>
|
|
|
|
<!--
|
|
Link to invoice on hours block view
|
|
-->
|
|
<act_window
|
|
domain="[('account_hours_block_ids', '=', active_id)]"
|
|
id="act_invoice_from_hours_block"
|
|
name="Invoice"
|
|
res_model="account.invoice"
|
|
src_model="account.hours.block"
|
|
view_mode="tree,form"
|
|
view_type="form"/>
|
|
|
|
<!--
|
|
Link to analytic lines on hours block view
|
|
-->
|
|
<act_window
|
|
domain="[('invoice_id.account_hours_block_ids', '=', active_id)]"
|
|
id="act_analytic_lines_from_hours_block"
|
|
name="Analytic Lines"
|
|
res_model="account.analytic.line"
|
|
src_model="account.hours.block"
|
|
view_mode="tree,form"
|
|
view_type="form"/>
|
|
|
|
<!--
|
|
Link to hours block on invoice view
|
|
-->
|
|
<act_window
|
|
domain="[('invoice_id', '=', active_id)]"
|
|
id="act_hours_block_from_invoice"
|
|
name="Hours Block"
|
|
res_model="account.hours.block"
|
|
src_model="account.invoice"
|
|
view_mode="tree,form,calendar,graph"
|
|
view_type="form"/>
|
|
|
|
</data>
|
|
</openerp>
|