69 lines
3.2 KiB
XML
69 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
<!-- The COPYRIGHT file at the top level of
|
|
this repository contains the full copyright notices and license terms. -->
|
|
<tryton>
|
|
<data>
|
|
<!-- inherit standard views -->
|
|
<record model="ir.ui.view" id="location_view_tree">
|
|
<field name="model">stock.location</field>
|
|
<field name="name">location_tree</field>
|
|
<field name="inherit" ref="stock.location_view_tree"/>
|
|
</record>
|
|
<record model="ir.ui.view" id="location_view_form">
|
|
<field name="model">stock.location</field>
|
|
<field name="name">location_form</field>
|
|
<field name="inherit" ref="stock.location_view_form"/>
|
|
</record>
|
|
|
|
<!-- Location state -->
|
|
<record model="ir.ui.view" id="location_state_view_tree">
|
|
<field name="model">stock.location.state</field>
|
|
<field name="type">tree</field>
|
|
<field name="name">location_state_tree</field>
|
|
</record>
|
|
<record model="ir.model.access" id="access_location_state">
|
|
<field name="model" search="[('model', '=', 'stock.location.state')]"/>
|
|
<field name="perm_read" eval="False"/>
|
|
<field name="perm_write" eval="False"/>
|
|
<field name="perm_create" eval="False"/>
|
|
<field name="perm_delete" eval="False"/>
|
|
</record>
|
|
<record model="ir.model.access" id="access_location_state_stock">
|
|
<field name="model" search="[('model', '=', 'stock.location.state')]"/>
|
|
<field name="group" ref="stock.group_stock_admin"/>
|
|
<field name="perm_read" eval="True"/>
|
|
<field name="perm_write" eval="True"/>
|
|
<field name="perm_create" eval="True"/>
|
|
<field name="perm_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- Form relate -->
|
|
<record model="ir.action.act_window" id="act_location_state">
|
|
<field name="name">Histoy State</field>
|
|
<field name="res_model">stock.location.state</field>
|
|
<field name="domain" eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('location', '=', Eval('active_id')), ('location', 'in', Eval('active_ids')))]" pyson="1"/>
|
|
</record>
|
|
<record model="ir.action.act_window.view" id="act_location_state_view1">
|
|
<field name="sequence" eval="10"/>
|
|
<field name="view" ref="location_state_view_tree"/>
|
|
<field name="act_window" ref="act_location_state"/>
|
|
</record>
|
|
<record model="ir.action.keyword" id="act_open_location_states_keyword1">
|
|
<field name="keyword">form_relate</field>
|
|
<field name="model">stock.location,-1</field>
|
|
<field name="action" ref="act_location_state"/>
|
|
</record>
|
|
|
|
<!-- Buttons -->
|
|
<record model="ir.model.button" id="location_on_button">
|
|
<field name="name">on</field>
|
|
<field name="string">Start</field>
|
|
<field name="model" search="[('model', '=', 'stock.location')]"/>
|
|
</record>
|
|
<record model="ir.model.button" id="location_off_button">
|
|
<field name="name">off</field>
|
|
<field name="string">Stop</field>
|
|
<field name="model" search="[('model', '=', 'stock.location')]"/>
|
|
</record>
|
|
</data>
|
|
</tryton> |