mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
90 lines
5.1 KiB
XML
90 lines
5.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<record model="ir.ui.view" id="app_view_pack_current_tree">
|
|
<field name="name">app.stock.pack.current.tree</field>
|
|
<field name="model">stock.pack.current</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="weight"/>
|
|
<field name="picking_id"/>
|
|
<field name="product_id"/>
|
|
<field name="product_uom_id" groups="product.group_uom" invisible="1"/>
|
|
<field name="product_qty" sum="total"/>
|
|
<field name="qty_done" sum="total"/>
|
|
<field name="weight_done_subtotal" sum="total"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="app_view_pack_current_kanban">
|
|
<field name="name">app.stock.pack.current.kanban</field>
|
|
<field name="model">stock.pack.current</field>
|
|
<field name="arch" type="xml">
|
|
<!--default_group_by="default_pack_rule"-->
|
|
<kanban
|
|
quick_create="false" group_create="false" group_delete="false" group_edit="false">
|
|
<field name="product_id"/>
|
|
<field name="product_uom_id"/>
|
|
<field name="weight"/>
|
|
<field name="package_id"/>
|
|
<field name="result_package_id"/>
|
|
<field name="product_qty"/>
|
|
<field name="qty_done"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<t t-if="record.qty_done.value >= 1">
|
|
<t t-if="record.product_id.value">
|
|
<t t-if="record.result_package_id.value==false">
|
|
<div t-attf-class="oe_kanban_card oe_kanban_global_click" style="box-shadow:0px 2px 2px 1px #ccc">
|
|
<t t-esc="record.product_id.value"/>
|
|
<t t-if="record.product_qty.value==0">
|
|
<span class="pull-right badge oe_kanban_color_9">
|
|
<t t-esc="record.qty_done.value" class="ml4 mr4"/>
|
|
/
|
|
<t t-esc="record.product_qty.value" class="ml4"/>
|
|
<t t-esc="record.product_uom_id.value" class="ml4"/>
|
|
</span>
|
|
</t>
|
|
<t t-elif="record.qty_done.value > record.product_qty.value">
|
|
<span class="pull-right badge oe_kanban_color_7">
|
|
<t t-esc="record.qty_done.value" class="ml4 mr4"/>
|
|
/
|
|
<t t-esc="record.product_qty.value" class="ml4"/>
|
|
<t t-esc="record.product_uom_id.value" class="ml4"/>
|
|
</span>
|
|
</t>
|
|
<t t-elif="record.qty_done.value < record.product_qty.value">
|
|
<span class="pull-right badge oe_kanban_color_6">
|
|
<t t-esc="record.qty_done.value" class="ml4 mr4"/>
|
|
/
|
|
<t t-esc="record.product_qty.value" class="ml4"/>
|
|
<t t-esc="record.product_uom_id.value" class="ml4"/>
|
|
</span>
|
|
</t>
|
|
<t t-else="">
|
|
<span class="pull-right badge oe_kanban_color_5">
|
|
<t t-esc="record.qty_done.value" class="ml4 mr4"/>
|
|
/
|
|
<t t-esc="record.product_qty.value" class="ml4"/>
|
|
<t t-esc="record.product_uom_id.value" class="ml4"/>
|
|
</span>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="picking_2_current_action" model="ir.actions.act_window">
|
|
<field name="name">Packing Package</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">stock.pack.current</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="domain">[('picking_id', '=', active_id), ('qty_done, '>', 1)]</field>
|
|
<field name="context">{"search_default_groupby_result_package_id":True,}</field>
|
|
</record>
|
|
</odoo> |