- add contract_type field on account.analytic.account and real_quantity on account.analytic.invoice.line - refactor contract form and list views for better clarity (hide unnecessary fields depending on the type of contract) - divide account_analityc_account class according to contract type for future work - divide contract template menu in 3 menus depending on contract_type - add on_change_uom behaviour on account recurring lines - rewrite tests in python - add new report (pivot & graph) - end date of contract is now computed from the template recurring rules - small fixes & usability improvements
73 lines
4.0 KiB
XML
73 lines
4.0 KiB
XML
<?xml version="1.0" ?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<!-- analytic_user_funct_grid views -->
|
|
<record model="ir.ui.view" id="analytic_user_funct_grid_tree">
|
|
<field name="name">analytic_user_funct_grid.tree</field>
|
|
<field name="model">analytic.user.funct.grid</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Invoicing Data" editable="bottom">
|
|
<field name="user_id" on_change="onchange_user_product_id(user_id, product_id)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman']}"/>
|
|
<field name="product_id" on_change="onchange_user_product_id(user_id, product_id)" domain="[('type','=','service')]"/>
|
|
<field name="price"/>
|
|
<field name="uom_id" groups="product.group_uom"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="analytic_user_funct_grid_form">
|
|
<field name="name">analytic_user_funct_grid.form</field>
|
|
<field name="model">analytic.user.funct.grid</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Invoicing Data">
|
|
<group>
|
|
<field name="user_id" on_change="onchange_user_product_id(user_id, product_id)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman']}"/>
|
|
<field name="product_id" domain="[('type','=','service')]" on_change="onchange_user_product_id(user_id, product_id)"/>
|
|
<field name="price"/>
|
|
<field name="uom_id" groups="product.group_uom"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- account.analytic.account inherited view -->
|
|
<record model="ir.ui.view" id="view_account_analytic_account_form_inherit">
|
|
<field name="name">account.analytic.account.form</field>
|
|
<field name="model">account.analytic.account</field>
|
|
<field eval="60" name="priority"/>
|
|
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
|
<field name="arch" type="xml">
|
|
<separator name="description" position="before">
|
|
<div name="user_function_price" attrs="{'invisible': ['|',('invoice_on_timesheets','=',False),('contract_type','!=','regular')]}">
|
|
<separator string="Invoice Price Rate per User"/>
|
|
<p class="oe_grey oe_edit_only">
|
|
Define a specific service (e.g. Senior Consultant)
|
|
and price for some users to use these data instead
|
|
of the default values when invoicing the customer.
|
|
</p>
|
|
<p class="oe_grey oe_edit_only">
|
|
Odoo will recursively search on parent accounts
|
|
to check if specific conditions are defined for a
|
|
specific user. This allows to set invoicing
|
|
conditions for a group of contracts.
|
|
</p>
|
|
<field name="user_product_ids"/>
|
|
</div>
|
|
</separator>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="hr_timesheet_line_tree_inherit">
|
|
<field name="name">account.analytic.line.tree</field>
|
|
<field name="model">account.analytic.line</field>
|
|
<field name="inherit_id" ref="hr_timesheet_invoice.hr_timesheet_line_tree"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="/tree/field[@name='user_id']" position="replace">
|
|
<field name="user_id" required="1" on_change="on_change_user_id(user_id, unit_amount, account_id, is_timesheet, context)" context="{'default_groups_ref': ['base.group_user']}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</openerp>
|