~unifield-team/unifield-wm/us-826

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
    <data>
    	
    	<menuitem id="menu_warehouse_expiry"
                  name="Expiry"
                  sequence="-10"
    			  parent="stock.next_id_61" />
    	
    	<record id="expiry_quantity_report_init_view" model="ir.ui.view">
    		<field name="name">expiry.quantity.report.init.view</field>
    		<field name="model">expiry.quantity.report</field>
    		<field name="type">form</field>
    		<field name="priority" eval="16" />
    		<field name="arch" type="xml">
    			<form string="Expiry Quantities">
    				<separator colspan="4" string="Location" />
    				<field name="location_id" />
				<field name="input_output_ok" />
    				<separator colspan="4" string="Period of calculation" />
    				<field name="week_nb" />
    				<separator colspan="4" string="Actions" />
    				<button special="cancel" string="Cancel" colspan="2" icon="gtk-cancel" />
    				<button name="process_lines" string="Process" type="object" colspan="2" icon="gtk-execute" />
    			</form>
    		</field>
    	</record>
    	
    	<record id="expiry_quantity_report_processed_loc_view" model="ir.ui.view">
    		<field name="name">expiry.quantity.report.processed.loc.view</field>
    		<field name="model">expiry.quantity.report</field>
    		<field name="type">form</field>
    		<field name="priority" eval="99" />
    		<field name="arch" type="xml">
    			<form string="Expired quantity">
    				<separator colspan="4" string="Location" />
    				<field name="location_id" readonly="1" />
				<field name="input_output_ok" readonly="1" />
    				<separator colspan="4" string="Period of calculation" />
    				<field name="week_nb" readonly="1" />
    				<field name="date_to" readonly="1" />
    				<separator colspan="4" string="Expired products" />
    				<field colspan="4" nolabel="1" name="line_ids" mode="tree" readonly="1">
    					<tree string="Expired products">
    						<field name="product_code" string="Ref." />
    						<field name="product_name" string="Name" />
    						<field name="location_id" string="Loc." />
    						<field name="real_stock" string="Real Stock" />
    						<field name="batch_number" string="Batch" />
    						<field name="expiry_date" widget="date" string="Exp. Date" />
    						<field name="expired_qty" string="Exp. Qty" />
    					</tree>
    				</field>
    			</form>
    		</field>
    	</record>
    	
    	<record id="action_expired_products" model="ir.actions.act_window">
    		<field name="name">Expiry quantities</field>
    		<field name="res_model">expiry.quantity.report</field>
    		<field name="view_type">form</field>
    		<field name="view_mode">form</field>
    		<field name="target">new</field>
    	</record>
    	
    	<menuitem id="menu_expired_products"
    			  action="action_expired_products"
                  sequence="-10"
    			  parent="menu_warehouse_expiry" />
    			  
    			  
    	<record id="product_likely_expire_report_form_init" model="ir.ui.view">
    		<field name="name">product.likely.expire.report.form.init</field>
    		<field name="model">product.likely.expire.report</field>
    		<field name="type">form</field>
    		<field name="priority" eval="16" />
    		<field name="arch" type="xml">
    			<form string="Products list likely to expire">
    				<separator colspan="4" string="Period of calculation" />
    				<field name="date_from" />
    				<field name="date_to" />
    				<field name="only_non_zero" />
    				<separator colspan="4" string="Consumption parameters" />
    				<field name="consumption_type" colspan="4" />
    				<field name="consumption_from" attrs="{'invisible': [('consumption_type', 'not in', ('amc','rac'))], 'required': [('consumption_type', 'in', ('amc','rac'))]}" on_change="period_change(consumption_from, consumption_to, consumption_type)" />
    				<field name="consumption_to" attrs="{'invisible': [('consumption_type', 'not in', ('amc','rac'))], 'required': [('consumption_type', 'in', ('amc','rac'))]}" on_change="period_change(consumption_from, consumption_to, consumption_type)" />
    				<separator colspan="4" string="Location" />
    				<field name="location_id" domain="[('usage', '=', 'internal')]" attrs="{'required': [('consumption_type', '=', 'rac')]}" />
				<newline />
				<field name="input_output_ok" attrs="{'invisible': [('location_id', '!=', False)]}" />
    				<separator colspan="4" string="Actions" />
    				<button special="cancel" string="Cancel" colspan="2" icon="gtk-cancel" />
    				<button name="process_lines" string="Process" type="object" colspan="2" icon="gtk-execute" />
    			</form>
    		</field>
    	</record>
    	
    	<record id="product_likely_expire_report_form_processed" model="ir.ui.view">
    		<field name="name">product.likely.expire.report.form.processed</field>
    		<field name="model">product.likely.expire.report</field>
    		<field name="type">form</field>
    		<field name="priority" eval="99" />
    		<field name="arch" type="xml">
    			<form string="Products list likely to expire">
    				<separator colspan="4" string="Location" />
				<group colspan="2" col="2">
	    				<field name="location_id" readonly="1" attrs="{'invisible': [('location_id', '=', False)]}"/>
    					<field name="msf_instance" readonly="1" attrs="{'invisible': [('location_id', '!=', False)]}"/>
				</group>
				<field name="input_output_ok" readonly="1" />
    				<separator colspan="4" string="Period of calculation" />
    				<field name="date_from" readonly="1" />
    				<field name="date_to" readonly="1" />
    				<field name="consumption_type" colspan="4" readonly="1" />
    				<separator colspan="4" string="Expired products" />
    				<field colspan="4" nolabel="1" name="line_ids" mode="tree" readonly="1">
    					<tree string="Expired products">
    						<field name="product_id" />
    						<field name="consumption" />
    						<field name="in_stock" />
    						<field name="total_expired" />
    					</tree>
    				</field>
    			</form>
    		</field>
    	</record> 
    
    	<record id="action_products_to_expire" model="ir.actions.act_window">
    		<field name="name">Products likely to expire</field>
    		<field name="res_model">product.likely.expire.report</field>
    		<field name="view_type">form</field>
    		<field name="view_mode">form</field>
    		<field name="target">new</field>
    	</record>
    	
    	<menuitem id="menu_products_to_expire"
    			  action="action_products_to_expire"
                  sequence="-1"
    			  parent="menu_warehouse_expiry" />
    			  
    	 <record id="product_likely_expire_report_item_form" model="ir.ui.view">
    	 	<field name="name">product.likely.expire.report.item.form</field>
    	 	<field name="model">product.likely.expire.report.item</field>
    	 	<field name="type">form</field>
    	 	<field name="arch" type="xml">
    	 		<form string="Batch likely to expire">
    	 			<separator string="General information" colspan="4" />
    	 			<field name="name" string="Month" readonly="1" />
				<field name="period_start" readonly="1" />
    	 			<field name="available_qty" readonly="1" />
    	 			<field name="expired_qty" readonly="1" />
    	 			<separator string="Batchs" colspan="4" />
    	 			<field name="line_ids" mode="tree" colspan="4" nolabel="1" readonly="1">
    	 				<tree string="Batch">
    	 					<field name="lot_id" />
    	 					<field name="expired_date" />
    	 					<field name="location_id" />
    	 					<field name="available_qty" />
    	 					<field name="expired_qty" />
    	 				</tree>
    	 			</field>
    	 		</form>
    	 	</field>
    	 </record>
    
    </data>
</openerp>