[FIX] stock : consignment update views
Consignment worked in backend but there was no tools in front end in order to use it. This commit update the views and add consignment in picking and stock move lines
This commit is contained in:
@@ -179,9 +179,10 @@ class StockMove(models.Model):
|
||||
if self.user_has_groups('stock.group_stock_multi_locations'):
|
||||
multi_locations_enabled = move.location_id.child_ids or move.location_dest_id.child_ids
|
||||
has_package = move.move_line_ids.mapped('package_id') | move.move_line_ids.mapped('result_package_id')
|
||||
consignment_enabled = self.user_has_groups('stock.group_tracking_owner')
|
||||
if move.picking_id.picking_type_id.show_operations is False\
|
||||
and move.state not in ['cancel', 'draft', 'confirmed']\
|
||||
and (multi_locations_enabled or move.has_tracking != 'none' or len(move.move_line_ids) > 1 or has_package):
|
||||
and (multi_locations_enabled or move.has_tracking != 'none' or len(move.move_line_ids) > 1 or has_package or consignment_enabled):
|
||||
move.show_details_visible = True
|
||||
else:
|
||||
move.show_details_visible = False
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
<field name="lot_name" invisible="not context.get('show_lots_text')" groups="stock.group_production_lot"/>
|
||||
<field name="package_id" invisible="not context.get('show_package')" groups="stock.group_tracking_lot"/>
|
||||
<field name="result_package_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
<field name="product_uom_qty" readonly="1"/>
|
||||
<field name="qty_done"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': [('product_uom_qty', '!=', 0.0)]}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
@@ -211,6 +212,7 @@
|
||||
<field name="qty_done"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': [('product_uom_qty', '!=', 0.0)]}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="result_package_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
<field name="picking_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
</tree>
|
||||
|
||||
@@ -244,11 +244,10 @@
|
||||
<group>
|
||||
<field name="min_date"/>
|
||||
<field name="origin" placeholder="e.g. PO0032" class="oe_inline"/>
|
||||
<!--<label for="owner_id" groups="stock.group_tracking_owner"/>-->
|
||||
<div groups="stock.group_tracking_owner">
|
||||
<!--<field name="owner_id"/>-->
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
<div groups="stock.group_tracking_owner" colspan="2" col="2">
|
||||
<button name="action_assign_owner" string="Assign Owner" type="object" attrs="{'invisible': ['|',('move_line_exist', '=', False),('state', 'not in', ('draft','assigned','confirmed'))]}"
|
||||
class="oe_link oe_edit_only"/>
|
||||
class="oe_link"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user