125 lines
7.3 KiB
XML
125 lines
7.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<odoo>
|
||
<data>
|
||
<record id="sf_stock_move_line_tree" model="ir.ui.view">
|
||
<field name="name">sf.stock.move.line.tree</field>
|
||
<field name="model">stock.move.line</field>
|
||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//field[@name='location_id'][2]" position="after">
|
||
<field name="current_location_id" force_save="1"/>
|
||
</xpath>
|
||
<xpath expr="//field[@name='location_dest_id'][2]" position="after">
|
||
<field name="destination_location_id" domain="[
|
||
('location_type', '=', '货位'),
|
||
('location_id', '=', location_dest_id_value),
|
||
('location_status', '=', '空闲')
|
||
]"/>
|
||
<!-- <field name="location_dest_id_product_type"/> -->
|
||
<!-- <field name="location_dest_id"/> -->
|
||
<field name="location_dest_id_value" invisible="1"/>
|
||
<!-- <button name="button_test" string="测试" type="object" class="oe_highlight"/> -->
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
|
||
<record id="sf_view_move_line_tree" model="ir.ui.view">
|
||
<field name="name">sf.stock.move.line.tree</field>
|
||
<field name="model">stock.move.line</field>
|
||
<field name="inherit_id" ref="stock.view_move_line_tree"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//field[@name='location_id']" position="after">
|
||
<field name="current_location_id" force_save="1"/>
|
||
</xpath>
|
||
<xpath expr="//field[@name='location_dest_id']" position="after">
|
||
<field name="destination_location_id" />
|
||
<!-- <field name="location_dest_id_product_type"/> -->
|
||
<!-- <field name="location_dest_id"/> -->
|
||
<field name="location_dest_id_value" invisible="1"/>
|
||
<!-- <button name="button_test" string="测试" type="object" class="oe_highlight"/> -->
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
|
||
<record id="sf_stock_move_line_form" model="ir.ui.view">
|
||
<field name="name">sf.stock.move.line.form</field>
|
||
<field name="model">stock.move.line</field>
|
||
<field name="inherit_id" ref="stock.view_move_line_form"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//form//sheet//group//group//field[@name='location_id']" position="after">
|
||
<field name="current_location_id" options="{'no_create': False}" force_save="1"/>
|
||
</xpath>
|
||
<xpath expr="//form//sheet//group//group//field[@name='location_dest_id']" position="after">
|
||
<field name="destination_location_id" options="{'no_create': False}"/>
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
|
||
<!-- 原生的按钮对base.user可见,这里修改为对库存用户可见 -->
|
||
<record id="sf_view_picking_form" model="ir.ui.view">
|
||
<field name="name">sf.view.picking.form</field>
|
||
<field name="model">stock.picking</field>
|
||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//form//header//button[@name='action_cancel']" position="replace">
|
||
<button name="action_cancel"
|
||
attrs="{'invisible': [('state', 'not in', ('assigned', 'confirmed', 'draft', 'waiting'))]}"
|
||
string="取消" groups="sf_warehouse.group_sf_stock_user" type="object" data-hotkey="z"/>
|
||
</xpath>
|
||
<xpath expr="//form//header//button[@name='do_unreserve']" position="replace">
|
||
<button name="do_unreserve" string="取消保留" groups="sf_warehouse.group_sf_stock_user"
|
||
type="object"
|
||
attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('immediate_transfer', '=', True), '&', ('state', '!=', 'assigned'), ('move_type', '!=', 'one'), '&', ('state', 'not in', ('assigned', 'confirmed')), ('move_type', '=', 'one')]}"
|
||
data-hotkey="w"/>
|
||
</xpath>
|
||
<xpath expr="//form//header//button[@name='button_scrap']" position="replace">
|
||
<button name="button_scrap" groups="sf_warehouse.group_sf_stock_user" type="object" string="报废"
|
||
attrs="{'invisible': ['|', '&', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}"
|
||
data-hotkey="y"/>
|
||
</xpath>
|
||
<xpath expr="//form//header//button[@name='action_assign']" position="replace">
|
||
<button name="action_assign" attrs="{'invisible': [('show_check_availability', '=', False)]}"
|
||
string="检查可用量" type="object" class="oe_highlight"
|
||
groups="sf_warehouse.group_sf_stock_user" data-hotkey="q"/>
|
||
</xpath>
|
||
<xpath expr="//form//header//button[@name='%(stock.act_stock_return_picking)d']" position="replace">
|
||
<button name="%(stock.act_stock_return_picking)d" string="退回"
|
||
attrs="{'invisible': [('state', '!=', 'done')]}" type="action"
|
||
groups="sf_warehouse.group_sf_stock_user" data-hotkey="k"/>
|
||
</xpath>
|
||
|
||
</field>
|
||
</record>
|
||
|
||
<record id="sf_stock_scrap_form_view" model="ir.ui.view">
|
||
<field name="name">sf.stock.scrap.form.view</field>
|
||
<field name="model">stock.scrap</field>
|
||
<field name="inherit_id" ref="stock.stock_scrap_form_view"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//header//button[@name='action_validate']" position="replace">
|
||
<button name="action_validate" states="draft" string="Validate" type="object" class="oe_highlight"
|
||
context="{'not_unlink_on_discard': True}" data-hotkey="v"
|
||
groups="sf_warehouse.group_sf_stock_user"/>
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
|
||
<record id="sf_vpicktree" model="ir.ui.view">
|
||
<field name="name">sf.vpicktree</field>
|
||
<field name="model">stock.picking</field>
|
||
<field name="inherit_id" ref="stock.vpicktree"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//header//button[@name='do_unreserve']" position="replace">
|
||
<button name="do_unreserve" type="object" string="取消保留"
|
||
groups="sf_warehouse.group_sf_stock_user"/>
|
||
</xpath>
|
||
<xpath expr="//header//button[@name='action_assign']" position="replace">
|
||
<button name="action_assign" type="object" string="检查可用量"
|
||
groups="sf_warehouse.group_sf_stock_user"/>
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
|
||
</data>
|
||
</odoo>
|