~unifield-team/unifield-wm/us-671-homere

367.10.1 by Quentin THEURET
UF-514 [ADD] Added the POC of the consumption history report
1
<?xml version="1.0" encoding="utf-8" ?>
2
<openerp>
3
    <data>
4
5
        <record id="product_history_consumption_form" model="ir.ui.view">
6
	    <field name="name">product.history.consumption.form</field>
7
	    <field name="model">product.history.consumption</field>
8
	    <field name="type">form</field>
9
	    <field name="arch" type="xml">
10
		<form string="Product historical consumption">
367.10.2 by Quentin THEURET
UF-514 [IMP] Added the possibility to choose a consumption type
11
		    <group colspan="2" col="2">
12
			<separator colspan="2" string="Period parameters" />
13
		    	<field name="date_from" on_change="date_change(date_from, date_to)" />
14
   		    	<field name="date_to" on_change="date_change(date_from, date_to)" />
15
		    	<field name="month_ids" nolabel="1" colspan="2">
16
			    <tree string="Months" hide_new_button="1" noteditable="True" editable="top">
17
			        <field name="name" />
18
			    </tree>
19
		        </field>
20
		    </group>
21
22
		    <group colspan="2" col="2">
23
			<separator colspan="2" string="Consumption parameters" />
24
		    	<field name="consumption_type" />
25
		    	<field name="location_id" attrs="{'invisible': [('consumption_type', '!=', 'rac')], 'required': [('consumption_type', '=', 'rac')]}" />
26
			<separator colspan="2" string="Product parameters" />
27
			<field name="nomen_id" />
28
			<field name="sublist_id" />
367.10.13 by Quentin THEURET
UF-514 [IMP] Reworking the history consumption report
29
			<separator colspan="2" string="Actions" />
30
			<button name="create_lines" type="object" string="View historical data" icon="gtk-execute" colspan="2" />
367.10.2 by Quentin THEURET
UF-514 [IMP] Added the possibility to choose a consumption type
31
		    </group>
32
367.10.1 by Quentin THEURET
UF-514 [ADD] Added the POC of the consumption history report
33
		</form>
34
	    </field>
35
	</record>
36
37
	<menuitem id="menu_product_history_consumption"
38
		  name="Historical consumption"
367.10.12 by Quentin THEURET
UF-514 [FIX] Included child locations on historical consumption report
39
		  parent="warehouse_consumption_menu" />
367.10.1 by Quentin THEURET
UF-514 [ADD] Added the POC of the consumption history report
40
41
	<record id="action_open_history_consumption_view" model="ir.actions.server">
42
            <field name="name">History consumption</field>
43
            <field name="model_id" ref="model_product_history_consumption"/>
44
            <field name="state">code</field>
45
            <field name="code">action = obj.open_history_consumption(context=context)</field>
46
        </record>
47
48
        <record id="ir_open_history consumption_view" model="ir.values">
49
            <field name="key2">tree_but_open</field>
50
            <field name="model">ir.ui.menu</field>
51
            <field name="name">Historical consumptions</field>
52
	    <field name="res_id" ref="menu_product_history_consumption" />
53
            <field eval="'ir.actions.server,%d'%action_open_history_consumption_view" name="value"/>
54
            <field eval="True" name="object"/>
55
        </record>
56
57
    </data>	
58
</openerp>