Files
odoo-usability/mrp_average_cost/mrp_view.xml
Alexis de Lattre 81d97b2981 Add possibility to make a manual update of standard_price from BOM
Add script to automate the update of standard_price for phantom BOM
Add user_id on price.history
2016-04-13 22:41:08 +02:00

131 lines
5.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="mrp_bom_form_view" model="ir.ui.view">
<field name="name">mrp_average_cost.mrp.bom.form</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@groups='mrp.group_mrp_routings']" position="after">
<field name="total_components_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"/>
<field name="total_labour_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"/>
<field name="extra_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"/>
<label for="total_cost"/>
<div>
<field name="total_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"
class="oe_inline"/>
<button type="object" name="manual_update_product_standard_price"
string="Update Cost Price of Product" class="oe_link"/>
</div>
<field name="company_currency_id" invisible="1"/>
</xpath>
<page string="Components" position="after">
<page string="Labour" name="labour_lines">
<group name="labour_lines_grp">
<field name="labour_line_ids" nolabel="1"/>
</group>
</page>
</page>
<xpath expr="//field[@name='bom_lines']/tree/field[@name='product_uom']" position="after">
<field name="standard_price"/>
</xpath>
</field>
</record>
<record id="mrp_bom_labour_line_tree" model="ir.ui.view">
<field name="name">mrp_bom_labour_line.tree</field>
<field name="model">mrp.bom.labour.line</field>
<field name="arch" type="xml">
<tree string="Labour Lines" editable="bottom">
<field name="bom_id" invisible="not context.get('mrp_bom_labour_line_main_view')"/>
<field name="labour_time" string="Labour Time (hours)"/>
<field name="labour_cost_profile_id"/>
<field name="note"/>
</tree>
</field>
</record>
<record id="mrp_bom_labour_line_form" model="ir.ui.view">
<field name="name">mrp_bom_labour_line.form</field>
<field name="model">mrp.bom.labour.line</field>
<field name="arch" type="xml">
<form string="Labour Line" version="7.0">
<group name="main">
<field name="bom_id" invisible="not context.get('mrp_bom_labour_line_main_view')"/>
<label for="labour_time"/>
<div name="labour_time">
<field name="labour_time" class="oe_inline"/>
<label string="hours"/>
</div>
<field name="labour_cost_profile_id"/>
<field name="note"/>
</group>
</form>
</field>
</record>
<record id="labour_cost_profile_form" model="ir.ui.view">
<field name="name">labour_cost_profile_form</field>
<field name="model">labour.cost.profile</field>
<field name="arch" type="xml">
<form string="Labour Cost Profile" version="7.0">
<group name="main">
<field name="name"/>
<field name="hour_cost" widget="monetary" options="{'currency_field': 'company_currency_id'}"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_currency_id" invisible="1"/>
</group>
</form>
</field>
</record>
<record id="labour_cost_profile_tree" model="ir.ui.view">
<field name="name">labour_cost_profile_tree</field>
<field name="model">labour.cost.profile</field>
<field name="arch" type="xml">
<tree string="Labour Cost Profiles">
<field name="name"/>
<field name="hour_cost"/>
<field name="company_currency_id"/>
</tree>
</field>
</record>
<record id="labour_cost_profile_action" model="ir.actions.act_window">
<field name="name">Labour Cost Profile</field>
<field name="res_model">labour.cost.profile</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="labour_cost_profile_menu" action="labour_cost_profile_action"
parent="mrp.menu_mrp_configuration"/>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">mrp_average_cost.mrp_production_form</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="model">mrp.production</field>
<field name="arch" type="xml">
<field name="date_finished" position="after">
<field name="unit_cost" widget="monetary" options="{'currency_field': 'company_currency_id'}" attrs="{'invisible': [('state', '!=', 'done')]}"/>
<field name="company_currency_id" invisible="1"/>
</field>
</field>
</record>
</data>
</openerp>