1
<?xml version="1.0" encoding="utf-8"?>
5
<record id="view_substitute_form" model="ir.ui.view">
6
<field name="name">substitute.form</field>
7
<field name="model">substitute</field>
8
<field name="type">form</field>
9
<field name="arch" type="xml">
10
<form string="Substitute Items">
11
<group col="4" colspan="4">
12
<field name="wizard_id" invisible="True" />
13
<field name="kit_id" />
14
<field name="lot_id_substitute" invisible="True" />
15
<field name="product_id_substitute" />
16
<field name="source_location_id" attrs="{'required': [('step_substitute', '=', 'de_kitting')]}"
17
context="{'product_id':product_id_substitute, 'prodlot_id':lot_id_substitute, 'specific_rules_tree_view':True, 'compute_child':False}" />
18
<field name="destination_location_id"
19
context="{'product_id':product_id_substitute, 'prodlot_id':lot_id_substitute, 'specific_rules_tree_view':True, 'compute_child':False}" />
20
<field name="step_substitute" invisible="True" />
22
<group col="4" colspan="4">
23
<field name="composition_item_ids" nolabel="True" mode="tree,form,graph" domain="[('wizard_id', '=', wizard_id), ('kit_id_mirror', '=', kit_id)]">
24
<tree hide_new_button="True" hide_delete_button="True" string="Products to remove from the Kit" editable="top" colors="red:integrity_status_func_substitute_item!='empty'">
25
<field name="module_substitute_item" readonly="True" />
26
<field name="product_id_substitute_item" readonly="True" />
27
<field name="qty_substitute_item" readonly="True" />
28
<field name="uom_id_substitute_item" readonly="True" />
29
<field name="asset_id_substitute_item"
30
domain="[('product_id', '=', product_id_substitute_item)]"
31
attrs="{'readonly': [('hidden_asset_mandatory', '=', False)]}" />
32
<field name="lot_mirror"
33
on_change="change_lot(location_id_substitute_item,product_id_substitute_item,lot_mirror,uom_id_substitute_item,context)"
34
attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_batch_management_mandatory', '=', False)]}" />
35
<field name="exp_substitute_item"
36
on_change="change_expiry(exp_substitute_item,product_id_substitute_item,type_check,location_id_substitute_item,lot_mirror,uom_id_substitute_item,context)"
37
attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
38
<field name="type_check" invisible="True" />
39
<field name="hidden_asset_mandatory" invisible="True" />
40
<field name="hidden_batch_management_mandatory" string="Lot" />
41
<field name="hidden_perishable_mandatory" string="Exp" />
42
<field name="integrity_status_func_substitute_item" />
46
<group col="4" colspan="4">
47
<field name="replacement_item_ids" nolabel="True">
48
<tree string="Products from the stock to the Kit" editable="top" colors="red:integrity_status_func_substitute_item != 'empty' or availability_status_hidden_func_substitute_item != 'available'">
49
<field name="product_id_substitute_item"
50
on_change="on_change_product_id(location_id_substitute_item,product_id_substitute_item,lot_id_substitute_item,uom_id_substitute_item, context)"
51
context="location=location_id_substitute_item, uom=uom_id_substitute_item" />
52
<field name="location_id_substitute_item"
53
on_change="on_change_location_id(location_id_substitute_item,product_id_substitute_item,lot_id_substitute_item,uom_id_substitute_item,context)"
54
context="{'product_id':product_id_substitute_item, 'prodlot_id':lot_id_substitute_item, 'specific_rules_tree_view':True, 'compute_child':False}" />
55
<field name="lot_id_substitute_item"
56
on_change="change_lot(location_id_substitute_item,product_id_substitute_item,lot_id_substitute_item,uom_id_substitute_item,context)"
57
context="{'location_id':location_id_substitute_item, 'product_id':product_id_substitute_item, 'expiry_date_check':hidden_perishable_mandatory, 'batch_number_check':hidden_batch_management_mandatory, 'search_default_real': True}"
58
domain="[('check_type','=', True), ('product_id', '=?', product_id_substitute_item)]"
59
attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
60
<field name="exp_substitute_item"
61
on_change="change_expiry(exp_substitute_item,product_id_substitute_item,type_check,location_id_substitute_item,lot_id_substitute_item,uom_id_substitute_item,context)"
62
attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': ['|', ('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', True)]}" />
63
<field name="qty_substitute_item" />
64
<field name="uom_id_substitute_item" />
65
<field name="asset_id_substitute_item"
66
domain="[('product_id', '=', product_id_substitute_item)]"
67
attrs="{'readonly': [('hidden_asset_mandatory', '=', False)]}" />
68
<field name="type_check" invisible="True" />
69
<field name="hidden_asset_mandatory" invisible="True" />
70
<field name="hidden_batch_management_mandatory" string="Lot" />
71
<field name="hidden_perishable_mandatory" string="Exp" />
72
<field name="module_substitute_item" />
73
<field name="integrity_status_func_substitute_item" />
74
<field name="availability_status_func_substitute_item" />
75
<field name="availability_status_hidden_func_substitute_item" invisible="True" />
79
<group col="4" colspan="4">
80
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
81
<button name="check_integrity" string="Check Integrity" type="object" icon="gtk-paste-v" />
82
<button name="check_availability" string="Check Availability" type="object" icon="gtk-find" />
83
<button name="do_substitute" string="Process Substitute" type="object" icon="gtk-go-forward" />
84
<button name="do_de_kitting" string="Process De-Kitting" type="object" icon="gtk-go-forward" />
90
<record id="view_substitute_item_mirror_tree" model="ir.ui.view">
91
<field name="name">substitute.item.mirror.tree</field>
92
<field name="model">substitute.item.mirror</field>
93
<field name="type">tree</field>
94
<field name="arch" type="xml">
95
<tree string="Kit Item" hide_new_button="True">
96
<field name="module_substitute_item" readonly="True" />
97
<field name="product_id_substitute_item" readonly="True" />
98
<field name="qty_substitute_item" readonly="True" />
99
<field name="uom_id_substitute_item" readonly="True" />
100
<field name="asset_id_substitute_item" />
101
<field name="lot_mirror" />
102
<field name="exp_substitute_item" />
103
<field name="hidden_asset_mandatory" invisible="True" />
104
<field name="hidden_batch_management_mandatory" />
105
<field name="hidden_perishable_mandatory" />
110
<record id="view_substitute_item_mirror_filter" model="ir.ui.view">
111
<field name="name">substitute.item.mirror.filter</field>
112
<field name="model">substitute.item.mirror</field>
113
<field name="type">search</field>
114
<field name="arch" type="xml">
115
<search string="Search Real Kit Composition Item">
116
<field name="module_substitute_item" select="1" />
117
<field name="product_id_substitute_item" select="1" />
118
<field name="lot_mirror" select="1" />
119
<field name="exp_substitute_item" select="1" />