库存货架货位修改基本完成,推送测试
This commit is contained in:
41
sf_warehouse/views/change_stock_move_views.xml
Normal file
41
sf_warehouse/views/change_stock_move_views.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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"/>
|
||||
</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_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}"/>
|
||||
</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>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -28,15 +28,18 @@
|
||||
<field name="name" string="名称"/>
|
||||
<field name="barcode" string="编码"/>
|
||||
<field name="location_type"/>
|
||||
<field name="location_id"/>
|
||||
<field name="shelf_location_id" attrs="{'invisible': [('location_type', '=', '货位')]}"/>
|
||||
<field name="location_id" attrs="{'readonly': [('location_type', '=', '货位')], 'invisible': [('location_type', '=', '货架')]}"/>
|
||||
<field name="channel" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||
<field name="direction" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||
<field name="product_sn_id" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '空闲')]}"/>
|
||||
<field name="product_sn_id" attrs="{'invisible': [('hide_location', '=', False)]}"/>
|
||||
<!-- <field name="product_type" widget="many2many_tags"/> -->
|
||||
<field name="shelf_height" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||
<field name="shelf_layer" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||
<field name="layer_capacity" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||
<field name="product_id" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}"/>
|
||||
<!-- <field name="product_id" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}"/> -->
|
||||
<field name="product_id" attrs="{'invisible': [('hide_location', '=', False)]}"/>
|
||||
<!-- <field name="product_type" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}" widget="many2many_tags"/> -->
|
||||
<field name="location_status" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False)]}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
@@ -44,108 +47,49 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- 自己生成 -->
|
||||
<!-- <record id="view_shelf_location_search" model="ir.ui.view"> -->
|
||||
<!-- <field name="name">Shelf Location</field> -->
|
||||
<!-- <field name="model">sf.shelf.location</field> -->
|
||||
<!-- <field name="arch" type="xml"> -->
|
||||
<!-- <search string="Shelf Location"> -->
|
||||
<!-- <field name="name" string="名称"/> -->
|
||||
<!-- <field name="barcode" string="编码"/> -->
|
||||
<!-- <field name="location_type"/> -->
|
||||
<!-- <field name="channel"/> -->
|
||||
<!-- <field name="direction"/> -->
|
||||
<!-- <field name="shelf_height"/> -->
|
||||
<!-- <field name="shelf_layer"/> -->
|
||||
<!-- <field name="layer_capacity"/> -->
|
||||
<!-- </search> -->
|
||||
<!-- </field> -->
|
||||
<!-- </record> -->
|
||||
<!-- -->
|
||||
<!-- <record id="view_shelf_location_kanban" model="ir.ui.view"> -->
|
||||
<!-- <field name="name">Shelf Location</field> -->
|
||||
<!-- <field name="model">sf.shelf.location</field> -->
|
||||
<!-- <field name="arch" type="xml"> -->
|
||||
<!-- <kanban class="o_kanban_mobile" js_class="custom_kanban"> -->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- <field name="barcode"/> -->
|
||||
<!-- <field name="location_type"/> -->
|
||||
<!-- <field name="channel"/> -->
|
||||
<!-- <field name="direction"/> -->
|
||||
<!-- <field name="shelf_height"/> -->
|
||||
<!-- <field name="shelf_layer"/> -->
|
||||
<!-- <field name="layer_capacity"/> -->
|
||||
<!-- </kanban> -->
|
||||
<!-- </field> -->
|
||||
<!-- </record> -->
|
||||
<!-- -->
|
||||
<!-- <record id="action_shelf_location" model="ir.actions.act_window"> -->
|
||||
<!-- <field name="name">Shelf Location</field> -->
|
||||
<!-- <field name="res_model">sf.shelf.location</field> -->
|
||||
<!-- <field name="view_mode">tree,form,kanban</field> -->
|
||||
<!-- <field name="search_view_id" ref="view_shelf_location_search"/> -->
|
||||
<!-- </record> -->
|
||||
<!-- -->
|
||||
<!-- <menuitem id="menu_shelf_location" name="Shelf Location" parent="sf_stock.menu_stock" sequence="1"/> -->
|
||||
<!-- <menuitem id="menu_shelf_location_tree" name="Shelf Location" parent="menu_shelf_location" action="action_shelf_location" sequence="1"/> -->
|
||||
|
||||
|
||||
<!-- <record id="view_location_search_sf_inherit" model="ir.ui.view"> -->
|
||||
<!-- <field name="name">stock.location.search.sf.inherit</field> -->
|
||||
<!-- <field name="model">stock.location</field> -->
|
||||
<!-- <field name="inherit_id" ref="stock.view_location_search"/> -->
|
||||
<!-- <field name="arch" type="xml"> -->
|
||||
<!-- <xpath expr="//search[1]" position="inside"> -->
|
||||
<!-- <searchpanel class="account_root"> -->
|
||||
<!-- <field name="location_type" icon="fa-filter"/> -->
|
||||
<!-- <field name="location_id" select="multi" domain="[('location_type', '=', '货架')]"/> -->
|
||||
<!-- </searchpanel> -->
|
||||
<!-- </xpath> -->
|
||||
<!-- </field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <record id="example_kanban_view" model="ir.ui.view"> -->
|
||||
<!-- <field name="name">example.kanban</field> -->
|
||||
<!-- <field name="model">stock.location</field> -->
|
||||
<!-- <field name="arch" type="xml"> -->
|
||||
<!-- <kanban class="o_kanban_mobile" js_class="custom_kanban"> -->
|
||||
<!-- <templates> -->
|
||||
<!-- <t t-name="kanban-box"> -->
|
||||
<!-- <div t-attf-class="oe_kanban_card oe_kanban_global_click -->
|
||||
<!-- #{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''} -->
|
||||
<!-- #{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''} -->
|
||||
<!-- #{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}"> -->
|
||||
<!-- --><!-- 标题 -->
|
||||
<!-- <div class="o_kanban_card_header"> -->
|
||||
<!-- <div class="o_kanban_card_header_title"> -->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- --><!-- 内容 -->
|
||||
<!-- <div class="o_kanban_record_bottom"> -->
|
||||
<!-- <field name="location_status"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div class="o_kanban_record_bottom"> -->
|
||||
<!-- <field name="product_sn_id"/> -->
|
||||
<!-- <span> | </span> -->
|
||||
<!-- <field name="product_id"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </t> -->
|
||||
<record id="shelf_location_kanban_view" model="ir.ui.view">
|
||||
<field name="name">shelf.location.kanban</field>
|
||||
<field name="model">sf.shelf.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" js_class="custom_kanban">
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click
|
||||
#{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''}
|
||||
#{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''}
|
||||
#{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}">
|
||||
<!-- 标题 -->
|
||||
<div class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<field name="name"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 内容 -->
|
||||
<div class="o_kanban_record_bottom">
|
||||
<field name="location_status"/>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<field name="product_sn_id"/>
|
||||
<span> | </span>
|
||||
<field name="product_id"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<!-- <t t-name="kanban-box"> -->
|
||||
<!-- <div t-attf-class="oe_kanban_card oe_kanban_global_click -->
|
||||
<!-- #{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''} -->
|
||||
<!-- #{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''} -->
|
||||
<!-- #{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}"> -->
|
||||
<!-- --><!-- --><!-- 看板内容 -->
|
||||
<!-- --><!-- 看板内容 -->
|
||||
<!-- </div> -->
|
||||
<!-- <div t-attf-class="oe_kanban_card"> -->
|
||||
<!-- --><!-- --><!-- 标题 -->
|
||||
<!-- --><!-- 标题 -->
|
||||
<!-- <div class="o_kanban_card_header"> -->
|
||||
<!-- <div class="o_kanban_card_header_title"> -->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- --><!-- --><!-- 内容 -->
|
||||
<!-- --><!-- 内容 -->
|
||||
<!-- <div class="o_kanban_record_bottom"> -->
|
||||
<!-- <field name="location_status"/> -->
|
||||
<!-- </div> -->
|
||||
@@ -156,17 +100,50 @@
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </t> -->
|
||||
<!-- </templates> -->
|
||||
<!-- </kanban> -->
|
||||
<!-- </field> -->
|
||||
<!-- </record> -->
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="kanban_action_id" model="ir.actions.act_window"> -->
|
||||
<!-- <field name="name">货位状态</field> -->
|
||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||
<!-- <field name="res_model">stock.location</field> -->
|
||||
<!-- <field name="view_mode">kanban,form</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- 搜索视图 -->
|
||||
<record id="shelf_location_search_view" model="ir.ui.view">
|
||||
<field name="name">shelf.location.search</field>
|
||||
<field name="model">sf.shelf.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="货架货位">
|
||||
<searchpanel class="account_root">
|
||||
<!-- <field name="location_type" icon="fa-filter"/> -->
|
||||
<field name="location_id" select="multi" icon="fa-filter"/>
|
||||
<!-- <field name="location_status" icon="fa-filter"/> -->
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="shelf_location_kanban_action_id" model="ir.actions.act_window">
|
||||
<field name="name">货架货位</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.shelf.location</field>
|
||||
<field name="view_mode">kanban,form</field>
|
||||
<field name="domain">[('location_type', '=', '货位')]</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="example_action" model="ir.actions.act_window"> -->
|
||||
<!-- <field name="name">Example</field> -->
|
||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||
<!-- <field name="res_model">stock.location</field> -->
|
||||
<!-- <field name="view_mode">kanban</field> -->
|
||||
<!-- <field name="searchpanel">true</field> -->
|
||||
<!-- <field name="searchpanel_field_label">货架</field> -->
|
||||
<!-- <field name="searchpanel_field_name">parent_id</field> -->
|
||||
<!-- <field name="searchpanel_field_group_by">['parent_id']</field> -->
|
||||
<!-- <field name="domain">[('location_type', '=', '货位')]</field> -->
|
||||
<!-- </record> -->
|
||||
|
||||
|
||||
<menuitem id="shelf_location_kanban_menu" name="货位看板" parent="stock.menu_stock_root"
|
||||
sequence="51"
|
||||
action="shelf_location_kanban_action_id"/>
|
||||
|
||||
<record id="action_sf_shelf_location" model="ir.actions.act_window">
|
||||
<field name="name">货架货位</field>
|
||||
|
||||
@@ -158,9 +158,9 @@
|
||||
<!-- </record> -->
|
||||
|
||||
|
||||
<menuitem id="menu_stock_location" name="货位状态" parent="stock.menu_stock_root"
|
||||
sequence="50"
|
||||
action="kanban_action_id"/>
|
||||
<!-- <menuitem id="menu_stock_location" name="货位状态" parent="stock.menu_stock_root" -->
|
||||
<!-- sequence="50" -->
|
||||
<!-- action="kanban_action_id"/> -->
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user