Files
jikimo_sf/sf_warehouse/views/change_stock_move_views.xml
jinling.yang 7885794322 1.优化制造订单的检测结果:新增处理结果字段
2.优化制造订单的返工向导:加工面字段类型改为多对多,且该字段需根据处理结果为待处理的检测结果的加工面进行过滤
3.优化工单工件下产线接口:工单状态为待检测
4,.优化工单状态方法(_compute_state)
2024-07-12 17:32:53 +08:00

189 lines
11 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="stock_lot_name" invisible="1"/>
<field name="current_location_id" force_save="1"
options="{'no_create': True,'no_create_edit':True}"/>
</xpath>
<xpath expr="//field[@name='location_dest_id'][2]" position="after">
<field name="current_product_id" invisible="1"/>
<field name="there_is_no_sn" invisible="1"/>
<!-- <field name="destination_location_id" domain="[('location_id', '=', location_dest_id_value), -->
<!-- '|', -->
<!-- ('location_status', '=', '空闲'), -->
<!-- ('location_status', '=', '占用'), ('product_id', '=', current_product_id) -->
<!-- ]"/> -->
<field name="destination_location_id" domain="[('location_id', '=', location_dest_id_value), '|',
('location_status', '=', '空闲'), ('product_id', '=', current_product_id), ('product_sn_id',
'=', there_is_no_sn)]" options="{'no_create': True,'no_create_edit':True}"/>
<field name="rfid_barcode" string="Rfid"/>
<!-- <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="stock_lot_name" invisible="1"/>
<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>
<xpath expr="//form//sheet//group//group//field[@name='create_uid']" position="after">
<field name="lot_qr_code" widget="image"/>
</xpath>
</field>
</record>
<record id="sf_view_stock_move_line_operation_tree" model="ir.ui.view">
<field name="name">sf.stock.move.line.operation.tree</field>
<field name="model">stock.move.line</field>
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='lot_name']" position="after">
<field name="rfid"/>
</xpath>
<xpath expr="//field[@name='product_uom_id']" position="after">
<field name="lot_qr_code" widget="image"/>
<button name="print_single_method" string="打印编码" type="object" class="oe_highlight"/>
</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_base.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_base.group_sf_stock_user"
type="object"
attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('immediate_transfer', '=', True), '&amp;', ('state', '!=', 'assigned'), ('move_type', '!=', 'one'), '&amp;', ('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_base.group_sf_stock_user" type="object" string="报废"-->
<!-- attrs="{'invisible': ['|', '&amp;', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&amp;', ('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_base.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_base.group_sf_stock_user" data-hotkey="k"/>
</xpath>
<!-- <xpath expr="//form//sheet//notebook//page//field[@name='move_ids_without_package']" position="before"> -->
<!-- <field name="check_in" invisible="True"/> -->
<!-- <button name="print_all_barcode" string="打印所有编码" type="object" attrs="{'invisible': [('check_in', '!=', 'IN')]}"/> -->
<!-- </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="确认" type="object" class="oe_highlight"
context="{'not_unlink_on_discard': True}" data-hotkey="v"
groups="sf_base.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_base.group_sf_stock_user"/>
</xpath>
<xpath expr="//header//button[@name='action_assign']" position="replace">
<button name="action_assign" type="object" string="检查可用量"
groups="sf_base.group_sf_stock_user"/>
</xpath>
<xpath expr="//header" position="inside">
<button name="batch_stock_move" type='object' string="批量调拨"/>
</xpath>
</field>
</record>
<record id="sf_view_stock_move_operations" model="ir.ui.view">
<field name="name">sf.stock.move.operations.form</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
<field name="arch" type="xml">
<!-- <xpath expr="//form//field[@name='move_line_ids']" position="before"> -->
<!-- <button name="print_all_barcode" type="object" string="打印所有编码"/> -->
<!-- </xpath> -->
<xpath expr="//form//field[@name='product_id']" position="before">
<button name="print_all_barcode" type="object" string="打印所有编码" class="oe_highlight"/>
-->
</xpath>
</field>
</record>
<record id="mrp_subcontracting_view_stock_move_barcode_scanned" model="ir.ui.view">
<field name="name">mrp.subcontracting.stock.move.barcode.scanned.form</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_stock_move_nosuggest_operations"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_line_nosuggest_ids']" position="before">
<field name="_barcode_scanned" widget="barcode_handler"/>
</xpath>
</field>
</record>
</data>
</odoo>