65 lines
4.5 KiB
XML
65 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_stock_move_operations_restrict" model="ir.ui.view">
|
|
<field name="name">stock.move.operations.form.restrict</field>
|
|
<field name="model">stock.move</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='move_line_ids']" position="before">
|
|
<field name="allowed_source_location_ids" invisible="1"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_mrp_stock_move_operations_restrict" model="ir.ui.view">
|
|
<field name="name">stock.move.mrp.operations.form.restrict</field>
|
|
<field name="model">stock.move</field>
|
|
<field name="inherit_id" ref="mrp.view_mrp_stock_move_operations"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='allowed_source_location_ids']" position="replace"/>
|
|
<xpath expr="//field[@name='move_line_ids']" position="before">
|
|
<field name="allowed_source_location_ids" invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='move_line_ids']" position="attributes">
|
|
<attribute name="context">{'list_view_ref': 'stock.view_stock_move_line_operation_tree', 'form_view_ref': 'stock.view_move_line_mobile_form', '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, 'active_picking_id': picking_id, 'active_mo_id': context.get('active_mo_id'), 'default_picking_type_id': picking_type_id}</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_stock_move_line_detailed_operation_tree_restrict" model="ir.ui.view">
|
|
<field name="name">stock.move.line.detailed.operation.tree.restrict</field>
|
|
<field name="model">stock.move.line</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='picking_id']" position="after">
|
|
<field name="allowed_source_location_ids" invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='quant_id']" position="attributes">
|
|
<attribute name="domain">[('product_id', '=', product_id), ('location_id', 'in', allowed_source_location_ids)]</attribute>
|
|
<attribute name="context">{'default_location_id': location_id, 'default_product_id': product_id, 'search_view_ref': 'stock.quant_search_view', 'list_view_ref': 'stock.view_stock_quant_tree', 'form_view_ref': 'stock.view_stock_quant_form', 'readonly_form': True, 'show_src_package': 1, 'active_mo_id': context.get('active_mo_id'), 'default_picking_type_id': context.get('default_picking_type_id')}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='location_id']" position="attributes">
|
|
<attribute name="domain">[('id', 'in', allowed_source_location_ids)]</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_stock_move_line_operation_tree_restrict" model="ir.ui.view">
|
|
<field name="name">stock.move.line.operation.tree.restrict</field>
|
|
<field name="model">stock.move.line</field>
|
|
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='move_id']" position="after">
|
|
<field name="allowed_source_location_ids" invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='quant_id']" position="attributes">
|
|
<attribute name="domain">[('product_id', '=', product_id), ('location_id', 'in', allowed_source_location_ids)]</attribute>
|
|
<attribute name="context">{'default_location_id': location_id, 'default_product_id': product_id, 'search_view_ref': 'stock.quant_search_view', 'list_view_ref': 'stock.view_stock_quant_tree', 'form_view_ref': 'stock.view_stock_quant_form', 'readonly_form': True, 'show_src_package': 1, 'active_mo_id': context.get('active_mo_id'), 'default_picking_type_id': context.get('default_picking_type_id')}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='location_id']" position="attributes">
|
|
<attribute name="domain">[('id', 'in', allowed_source_location_ids)]</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|