Skip to content
Snippets Groups Projects
Commit dc5dfa04 authored by Nicolas Martinelli's avatar Nicolas Martinelli Committed by Nicolas Martinelli
Browse files

[FIX] stock: S/N in mobile view

In mobile view, it is impossible to add serial numbers on pickings,
because the button is not on the kanban view.

opw-1816837
parent 43e05188
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,8 @@
<field name="state" widget="statusbar"/>
</header>
<sheet>
<field name="in_entire_package" invisible="1"/>
<field name="picking_id" invisible="1"/>
<group>
<group>
<field name="date"/>
......@@ -44,7 +46,8 @@
<field name="qty_done"/>
<field name="product_uom_id" options="{'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
</div>
<field name="lot_id" string="Lot/Serial Number" groups="stock.group_production_lot"/>
<field name="lot_id" attrs="{'readonly': [('in_entire_package', '=', True)]}" domain="[('product_id', '=', product_id)]" groups="stock.group_production_lot" context="{'default_product_id': product_id, 'active_picking_id': picking_id}"/>
<field name="lot_name" attrs="{'readonly': [('in_entire_package', '=', True)]}" groups="stock.group_production_lot"/>
<field name="package_id" string="Source Package" groups="product.group_stock_packaging"/>
<field name="result_package_id" string="Destination Package" groups="stock.group_tracking_lot"/>
<field name="owner_id" string="Owner" groups="stock.group_tracking_owner"/>
......@@ -86,6 +89,7 @@
<field name="model">stock.move.line</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="in_entire_package"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
......@@ -93,6 +97,8 @@
<field name="picking_id"/>
<div class="row">
<div class="col-xs-6">
<field name="lot_id" invisible="not context.get('show_lots_m2o')" domain="[('product_id', '=', product_id)]" groups="stock.group_production_lot" context="{'default_product_id': product_id, 'active_picking_id': picking_id}"/>
<field name="lot_name" invisible="not context.get('show_lots_text')" groups="stock.group_production_lot"/>
<field name="qty_done" string="Quantity Done"/>
<field name="product_uom_id" string="Unit of Measure" groups="product.group_uom"/>
</div>
......
......@@ -75,6 +75,7 @@
<field name="product_id"/>
<field name="priority"/>
<field name="state"/>
<field name="show_details_visible"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
......@@ -88,7 +89,11 @@
<field name="product_id"/>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_left">
<button name="action_show_details" string="Register lots, packs, location"
class="o_icon_button fa fa-list" type="object"
attrs="{'invisible': [('show_details_visible', '=', False)]}" options='{"warn": true}'/>
</div>
<div class="oe_kanban_bottom_right">
<span><field name="product_uom_qty"/></span>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment