You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
6.0 KiB
79 lines
6.0 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Inherited the stock.move form view to make changes in attributes-->
|
|
<record id="view_stock_move_operations" model="ir.ui.view">
|
|
<field name="name">view.stock.move.operations.form.inherit.auto.generate.lot.number</field>
|
|
<field name="model">stock.move</field>
|
|
<field name="priority">1000</field>
|
|
<field name="mode">primary</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='picking_id']" position="after">
|
|
<field name="move_line_ids"
|
|
readonly="state == 'cancel' or (state == 'done' and is_locked) or not product_id"
|
|
context="{'tree_view_ref': 'stock.view_stock_move_line_operation_tree_custom',
|
|
'default_picking_id': picking_id, 'default_move_id': id,
|
|
'default_product_id': product_id,
|
|
'default_location_id': location_id, '
|
|
default_location_dest_id': location_dest_id,
|
|
'default_company_id': company_id}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<!-- Inherited the stock.move.line tree view-->
|
|
<record id="view_stock_move_line_operation_tree_custom" model="ir.ui.view">
|
|
<field name="name">stock.move.line.operations.tree</field>
|
|
<field name="model">stock.move.line</field>
|
|
<field name="priority">1000</field>
|
|
<field name="arch" type="xml">
|
|
<tree editable="bottom" decoration-muted="state == 'done' and is_locked == True" default_order="result_package_id desc, location_id asc, location_dest_id asc, picking_id asc, id">
|
|
<field name="company_id" column_invisible="True" force_save="1"/>
|
|
<field name="picking_id" column_invisible="True" force_save="1"/>
|
|
<field name="move_id" column_invisible="True" force_save="1" />
|
|
<field name="product_uom_category_id" column_invisible="True"/>
|
|
<field name="product_id" column_invisible="True"/>
|
|
<field name="package_level_id" column_invisible="True"/>
|
|
<field name="location_id" column_invisible="True"/>
|
|
<field name="location_dest_id" column_invisible="True"/>
|
|
<field name="package_id" column_invisible="True"/>
|
|
<field name="result_package_id" column_invisible="True"/>
|
|
<field name="tracking" column_invisible="True"/>
|
|
<field name="picking_type_id" column_invisible="True"/>
|
|
<field name="product_uom_id" column_invisible="True" groups="!uom.group_uom"/>
|
|
<field name="quant_id"
|
|
domain="[('product_id', '=', product_id), ('location_id', 'child_of', parent.location_id)]"
|
|
context="{'default_location_id': location_id, 'default_product_id': product_id, 'search_view_ref': 'stock.quant_search_view', 'tree_view_ref': 'stock.view_stock_quant_tree', 'form_view_ref': 'stock.view_stock_quant_form', 'readonly_form': True}"
|
|
widget="pick_from"
|
|
column_invisible="not parent.show_quant"
|
|
options="{'no_create': True, 'no_open': True}"/>
|
|
<field name="lot_id" groups="stock.group_production_lot"
|
|
column_invisible="parent.has_tracking == 'none' or not parent.show_lots_m2o"
|
|
readonly="package_level_id and parent.picking_type_entire_packs"
|
|
domain="[('product_id', '=', parent.product_id), ('company_id', '=', company_id)]"
|
|
context="{
|
|
'active_picking_id': picking_id,
|
|
'default_company_id': parent.company_id,
|
|
'default_product_id': parent.product_id,
|
|
}"/>
|
|
<field name="lot_name" string="Lot/Serial Number" groups="stock.group_production_lot"
|
|
placeholder="e.g. SN000001"
|
|
column_invisible="parent.has_tracking == 'none' or not parent.show_lots_text"
|
|
readonly="package_level_id and parent.picking_type_entire_packs"/>
|
|
<field name="location_dest_id" string="Store To"
|
|
column_invisible="parent.show_quant and parent.picking_code != 'internal'"
|
|
readonly="package_level_id and parent.picking_type_entire_packs"
|
|
domain="[('id', 'child_of', parent.location_dest_id), '|', ('company_id', '=', False), ('company_id', '=', company_id), ('usage', '!=', 'view')]"
|
|
groups="stock.group_stock_multi_locations"/>
|
|
<field name="package_id" column_invisible="not parent.show_quant" readonly="package_level_id and parent.picking_type_entire_packs" groups="stock.group_tracking_lot"/>
|
|
<field name="result_package_id" readonly="package_level_id and parent.picking_type_entire_packs" groups="stock.group_tracking_lot" context="{'picking_id': picking_id}"/>
|
|
<field name="owner_id" column_invisible="parent.show_quant" readonly="package_level_id and parent.picking_type_entire_packs" groups="stock.group_tracking_owner"/>
|
|
<field name="state" column_invisible="True"/>
|
|
<field name="is_locked" column_invisible="True"/>
|
|
<field name="picking_code" column_invisible="True"/>
|
|
<field name="quantity" string="Quantity" readonly="(state == 'done' and is_locked) or (package_level_id and parent.picking_type_entire_packs)" sum="Quantity"/>
|
|
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"
|
|
readonly="(package_level_id and parent.picking_type_entire_packs) or (state == 'done' and id)"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|