~acysos-team/acysos/openerp-addons-6.0

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
168
169
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        
        <!--
            Operator Registry
            -->
        <record id="view_operator_registry_tree" model="ir.ui.view">
            <field name="name">view.operator.registry.tree</field>
            <field name="model">mrp.operator.registry</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Operator Registry">
                    <field name="name"/>
                    <field name="date"/>
                    <field name="operator_id"/>
                </tree>
            </field>
        </record>
        
        <record id="view_operator_registry_form" model="ir.ui.view">
            <field name="name">view.operator.registry.form</field>
            <field name="model">mrp.operator.registry</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Operator Registry">
                    <field name="id" invisible="1"/>
                    <field name="name"/>
                    <field name="date"/>
                    <field name="operator_id"/>
                    <field name="workcenter_lines" colspan="4" nolabel="1" />
                    <group col="8" colspan="4">
                    <field name="state"/>
                        <button name="action_confirm" type="object" states="draft" string="Confirm" icon="gtk-execute"/>
                        <!--<button name="action_cancel" type="object" states="confirmed" string="Cancel" icon="gtk-stop"/>-->
                        <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
                    </group>
                </form>
            </field>
        </record>
        
        <record id="mrp_operator_registry_action" model="ir.actions.act_window">
            <field name="name">Manufacturing Operator Registry</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.operator.registry</field>
            <field name="view_type">form</field>
        </record>
        <menuitem action="mrp_operator_registry_action" id="menu_mrp_operator_registry_action" parent="mrp.menu_mrp_manufacturing" sequence="2"/>
        
        <!-- Workcenter line -->
        
        <record id="view_mrp_production_workcenter_line_tree" model="ir.ui.view">
            <field name="name">view.mrp.production.workcenter.line.tree</field>
            <field name="model">mrp.production.workcenter.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Production Work Centers">
                    <field name="sequence"/>
                    <field name="number" select="1"/>
                    <field name="name"/>
                    <field name="workcenter_id" widget="selection"/>
                    <field name="cycle"/>
                    <field name="hour"/>
                </tree>
            </field>
        </record>
        
        <!-- Workcenter registry -->
        <record id="view_workcenter_registry_tree" model="ir.ui.view">
            <field name="name">view.workcenter.registry.tree</field>
            <field name="model">mrp.workcenter.registry</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Workcenter Registry" editable="top">
                    <field name="key" widget="selection"/>
                    <field name="workcenter_line_id" on_change="workcenter_line_change(workcenter_line_id)" />
                    <field name="product_id" />
                    <field name="workcenter_id" />
                    <field name="name"/>
                    <field name="go_product_qty"/>
                    <field name="de_product_qty"/>
                    <field name="date_start"/>
                    <field name="time_start"/>
                    <field name="date_stop"/>
                    <field name="time_stop"/>
                    <field name="production_id" invisible="1"/>
                    <field name="operator_id" invisible="1"/>
                </tree>
            </field>
        </record>
        
        <record id="view_workcenter_registry_form" model="ir.ui.view">
            <field name="name">view.workcenter.registry.form</field>
            <field name="model">mrp.workcenter.registry</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Workcenter Registry">
                    <field name="key" widget="selection"/>
                    <field name="workcenter_line_id" on_change="workcenter_line_change(workcenter_line_id)" />
                    <field name="product_id" />
                    <field name="workcenter_id" />
                    <field name="name"/>
                    <field name="de_product_qty"/>
                    <field name="go_product_qty"/>
                    <field name="date_start"/>
                    <field name="time_start"/>
                    <field name="date_stop"/>
                    <field name="time_stop"/>
                    <field name="note" colspan="4" />
                    <field name="production_id"/>
                    <field name="operator_id"/>
                </form>
            </field>
        </record>
        <record id="view_workcenter_registry_search" model="ir.ui.view">
            <field name="name">view.workcenter.registry.search</field>
            <field name="model">mrp.workcenter.registry</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search for mrp workcenter registry">
                    <group col='15' colspan='4'>
                        <filter string="Production" name="production" icon="terp-accessories-archiver" domain="[('product_id','!=',False)]" help="Registry with production"/>
                        <filter string="No Production" name="no-production" icon="terp-accessories-archiver" domain="[('product_id','=',False)]" help="Registry without production"/>
                        <separator orientation="vertical"/>
                        <field name="key"/>
                        <field name="product_id"/>
                        <field name="workcenter_line_id"/>
                        <field name="workcenter_id"/>
                        <field name="operator_id"/>
                        <newline/>
                        <field name="date_start"/>
                        <field name="date_stop"/>
                    </group>
                    <newline/>
                    <group expand="1" string="Group By..." colspan="4" col="20" >
                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
                        <separator orientation="vertical" />
                        <filter string="Workcenter" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'workcenter_line_id'}" />
                        <filter string="Resource" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'workcenter_id'}" />
                        <separator orientation="vertical" />
                        <filter string="Date start" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
                        <filter string="Date stop" icon="terp-go-month" domain="[]" context="{'group_by':'date_stop'}"/>
                    </group>
                </search>
            </field>
        </record>
        
        
        <record id="mrp_worcenter_registry_action" model="ir.actions.act_window">
            <field name="name">Worcenter Analysis</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.workcenter.registry</field>
            <field name="context">{"search_default_production":1}</field>
            <field name="view_type">form</field>
        </record>
        <menuitem action="mrp_worcenter_registry_action" id="menu_mrp_worcenter_registry_action_action" parent="mrp.next_id_77" sequence="10"/>
        
        <!-- Workcenter Registry Key -->
        <record id="mrp_operator_registry_key_action" model="ir.actions.act_window">
            <field name="name">Manufacturing Operator Registry Key</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.workcenter.registry.key</field>
            <field name="view_type">form</field>
        </record>
        <menuitem action="mrp_operator_registry_key_action" id="menu_mrp_operator_registry_key_action" parent="mrp.menu_mrp_configuration" sequence="2"/>
        
        
    </data>
</openerp>