|
- <?xml version="1.0" encoding="utf-8"?>
- <odoo>
- <data>
- <record id='wh_inventory_batch_list' model='ir.ui.view'>
- <field name='name'>wh.inventory.batch.list</field>
- <field name='model'>wh.inventory.batch</field>
- <field name='arch' type='xml'>
- <list string='盘点单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
- <field name='name' />
- <field name='date' />
- <field name='warehouse_id' groups='warehouse.multi_warehouse_groups' />
- <field name='state' />
- <field name="note"/>
- </list>
- </field>
- </record>
-
- <record id='wh_inventory_batch_form' model='ir.ui.view'>
- <field name='name'>wh.inventory.batch.form</field>
- <field name='model'>wh.inventory.batch</field>
- <field name='arch' type='xml'>
- <form string='盘点单'>
- <header>
- <button name='query_inventory' string='查询' type='object' class='oe_highlight' invisible="state != 'draft'" />
- <button name='query_inventory' string='查询' type='object' invisible="state != 'query'" />
- <button name='generate_inventory' string='生成盘点数据' type='object' class='oe_highlight' invisible="state != 'query'" />
-
- <button name='open_out' string='查看盘亏单据' type='object' class='oe_highlight' invisible="state in ['draft', 'query'] or out_id=False" />
- <button name='open_in' string='查看盘盈单据' type='object' class='oe_highlight' invisible="state in ['draft','query'] or in_id=False" />
-
- <button name='requery_inventory' string='重新盘点' type='object' invisible="state != 'confirmed'" />
-
- <field name='state' widget='statusbar' readonly='1' />
- </header>
- <sheet>
- <div>
- <p>在盘点完成前,请不要做出入库单据,盘点库存与查询时的系统库存比较计算盈亏,如果库存在查询后又发生了变化,需要重新查询一次获取最新的库存信息</p>
- <!--
- <label string="扫描条码"/>
- <input type='text' class="ge_scan_barcode" autofocus="true"/>
- -->
- </div>
-
- <group >
- <group>
- <field name='warehouse_id' readonly="state!='draft'"/>
- <field name='goods' widget="many2many_tags" readonly="state != 'draft' />
- <field name='out_id' invisible='1' />
- <field name='in_id' invisible='1' />
- </group>
- <group>
- <field name='date' required='1' readonly="state!='draft'" />
- </group>
- </group>
-
- <group string='盘点明细'>
- <field name='line_ids' nolabel='1' colspan="2" context="{'lot': True}" readonly="state not in ['draft', 'query']" >
- <list string='盘点明细' create='0' delete='0' editable='bottom' default_order="goods_id, lot asc">
- <field name='goods_id' readonly='1 ' optional="show"/>
- <field name='attribute_id' readonly='1' groups='goods.multi_attrs_groups' optional="show"/>
- <field name='lot' readonly='1' groups='goods.batch_groups' optional="show"/>
- <field name='real_uos_qty' readonly='1' sum='1' groups='goods.auxiliary_unit_groups' optional="show"/>
- <field name='real_qty' readonly='1' sum='1' optional="show"/>
- <field name='inventory_uos_qty' sum='1' groups='goods.auxiliary_unit_groups' optional="show"/>
- <field name='uos_id' readonly='1' groups='goods.auxiliary_unit_groups' optional="show"/>
- <field name='inventory_qty' sum='1' optional="show"/>
- <field name='uom_id' readonly='1' optional="show"/>
- <!--readonly 应该为invisible ?-->
- <field name='new_lot'
- readonly="lot_type!='in'"
- required="lot_type=='in'"
- groups='goods.batch_groups' optional="show"/>
-
- <!--批号已有,所以不需要盘亏批号,去掉盘亏批号-->
- <!-- <field name='new_lot_id'
- attrs="{'readonly': [('lot_type', '!=', 'out')], 'required': [('lot_type', '=', 'out')]}"
- domain="[('goods_id', '=', goods_id), ('state', '=', 'done'), ('lot', '!=', False), ('qty_remaining', '>', 0), ('lot', '=', lot)]"
- context="{'lot': True}"
- options="{'no_open': True, 'no_create': True}"
- groups='goods.batch_groups'
- invisible='1' optional="show"/> -->
- <field name='difference_uos_qty' readonly='1' sum='1' groups='goods.auxiliary_unit_groups' optional="show"/>
- <field name='difference_qty' readonly='1' sum='1' optional="show"/>
- <field name='lot_type' invisible='1' optional="show"/>
- </list>
- </field>
- </group>
-
- <group>
- <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
- </group>
-
- <group >
- <group >
- <field name='create_uid' string='制单人' readonly='1' />
- <field name='create_date' string='录单时间' readonly='1' />
- </group>
- <group >
- <field name='write_uid' string='最后修改人' readonly='1' />
- <field name='write_date' string='最后修改时间' readonly='1' />
- </group>
- </group>
- </sheet>
- <chatter/>
- </form>
- </field>
- </record>
-
- <record id='wh_inventory_batch_search' model='ir.ui.view'>
- <field name='name'>wh.inventory.batch.search</field>
- <field name='model'>wh.inventory.batch</field>
- <field name='arch' type='xml'>
- <search string='盘点表' >
- <field name='name'/>
- <field name='warehouse_id'/>
- <field name='goods'/>
- <filter string="未完成" domain="[('state','!=','done')]" name="not_done_inventory_filter"/>
- <group expand="0" string="分组">
- <filter name="by_wh" string="仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
- <filter name="by_goods" string="商品" domain="[]" context="{'group_by':'goods'}"/>
- <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
- </group>
- </search>
- </field>
- </record>
-
- </data>
- </odoo>
|