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

« back to all changes in this revision

Viewing changes to specific_rules/stock_view.xml

  • Committer: matthieu.choplin at msf
  • Date: 2012-08-30 07:48:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: matthieu.choplin@geneva.msf.org-20120830074800-l442bu42mt0yzutn
[uf-1374]- change the write and create by an _sql_constraint on the financing contract check dates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8" ?>
2
 
<openerp>
3
 
    <data>
4
 
        
5
 
        <record id="stock_initial_inventory_form_view" model="ir.ui.view">
6
 
            <field name="name">stock.initial.inventory.form.view</field>
7
 
            <field name="model">initial.stock.inventory</field>
8
 
            <field name="type">form</field>
9
 
            <field name="arch" type="xml">
10
 
                <form string="Initial stock inventory">
11
 
                    <separator colspan="4" string="General information" />
12
 
                    <field name="name" string="Reference" />
13
 
                    <field name="date" />
14
 
                    <label colspan="2" string=" " />
15
 
                    <field name="date_done" readonly="True" attrs="{'invisible': [('state', '!=', 'done')]}" />
16
 
                    <!--<separator colspan="4" string="Product filters" />
17
 
                    <field name="sublist_id" attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('nomen_manda_0', '!=', False)]}"/>
18
 
                    <group colspan="2" col="4" attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('sublist_id', '!=', False)]}">
19
 
                        <field name="nomen_manda_0"
20
 
                            domain="[('level', '=', '0'), ('type', '=', 'mandatory')]"
21
 
                            widget="selection"
22
 
                              on_change="onChangeSearchNomenclature(0, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
23
 
                        />
24
 
                        <field name="nomen_manda_1"
25
 
                            domain="[('id','=', 0)]"
26
 
                            widget="selection"
27
 
                            get_selection="get_nomen"
28
 
                            on_change="onChangeSearchNomenclature(1, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
29
 
                        />
30
 
                        <field name="nomen_manda_2"
31
 
                            domain="[('id','=', 0)]"
32
 
                            widget="selection"
33
 
                            get_selection="get_nomen"
34
 
                            on_change="onChangeSearchNomenclature(2, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
35
 
                        />
36
 
                        <field name="nomen_manda_3"
37
 
                            domain="[('id','=', 0)]"
38
 
                            widget="selection"
39
 
                            get_selection="get_nomen"
40
 
                            on_change="onChangeSearchNomenclature(3, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
41
 
                        />
42
 
                    </group>
43
 
                    <button colspan="4" icon="gtk-go-down" string="Fill lines" type="object" name="fill_lines" attrs="{'readonly': [('state', '!=', 'draft')]}" />-->
44
 
                    <notebook colspan="4">
45
 
                        <page string="Inventory lines">
46
 
                            <field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list" attrs="{'readonly': [('state', '!=', 'draft')]}">
47
 
                                <tree string="Products" editable="bottom" colors="red: err_msg!=''">
48
 
                                    <field name="product_id" 
49
 
                                           domain="[('type', 'not in', ('consu', 'service', 'service_recep'))]" 
50
 
                                           context="available_for_restriction={'location_id': location_id}, search_default_not_restricted=1, 'location': location_id"
51
 
                                           on_change="product_change(product_id, location_id, 'product_id', True,  prod_lot_id)" />
52
 
                                    <field name="average_cost" />
53
 
                                    <field name="currency_id" />
54
 
                                    <field name="location_id" domain="[('usage', '=', 'internal')]" on_change="product_change(product_id, location_id, 'location_id', prod_lot_id)" required="True" />
55
 
                                    <field name="prodlot_name"
56
 
                                        attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_batch_management_mandatory', '=', False)]}" />
57
 
                                    <field name="expiry_date"
58
 
                                        attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
59
 
                                    <field name="product_qty" required="True" on_change="onchange_uom_qty(product_uom, product_qty)"/>
60
 
                                    <field name="product_uom" required="True" on_change="onchange_uom_qty(product_uom, product_qty)" />
61
 
                                    <field name="hidden_batch_management_mandatory" readonly="True" string="B.Num" />
62
 
                                    <field name="hidden_perishable_mandatory" readonly="True" string="Exp" />
63
 
                                    <button name="btn_dl" type="object" string="Line is duplicated" icon="gtk-dialog-warning" attrs="{'invisible': [('duplicate_line', '=', False)]}" />
64
 
                                    <field name="duplicate_line" invisible="True" />  
65
 
                                    <field name="err_msg" readonly="True" invisible="True" />
66
 
                                </tree>
67
 
                            </field>
68
 
                        </page>
69
 
                    </notebook>
70
 
                    <group colspan="4" col="6">
71
 
                        <field name="state" />
72
 
                        <button name="action_cancel_inventary" states="draft,confirm" string="Cancel Inventory" type="object" icon="gtk-cancel" />
73
 
                        <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply" />
74
 
                        <button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to" />
75
 
                        <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert" />
76
 
                    </group>
77
 
                </form>
78
 
            </field>
79
 
        </record>
80
 
        
81
 
        <record id="stock_initial_inventory_tree_view" model="ir.ui.view">
82
 
            <field name="name">stock.initial.inventory.tree.view</field>
83
 
            <field name="model">initial.stock.inventory</field>
84
 
            <field name="type">tree</field>
85
 
            <field name="arch" type="xml">
86
 
                <tree string="Initial stock inventories">
87
 
                    <field name="name" string="Reference" />
88
 
                    <field name="date" />
89
 
                    <field name="state" />
90
 
                    <field name="date_done" readonly="True" />
91
 
                </tree>
92
 
            </field>
93
 
        </record>
94
 
        
95
 
        <record id="stock_initial_inventory_search_view" model="ir.ui.view">
96
 
            <field name="name">stock.initial.inventory.search.view</field>
97
 
            <field name="model">initial.stock.inventory</field>
98
 
            <field name="type">search</field>
99
 
            <field name="arch" type="xml">
100
 
                <search string="Initial stock inventories">
101
 
                    <field name="name" string="Reference" />
102
 
                    <field name="state" />
103
 
                </search>
104
 
            </field>
105
 
        </record>
106
 
 
107
 
        
108
 
        <record id="action_initial_inventory" model="ir.actions.act_window">
109
 
            <field name="name">Initial stock inventory</field>
110
 
            <field name="res_model">initial.stock.inventory</field>
111
 
            <field name="view_type">form</field>
112
 
            <field name="view_mode">tree,form</field>
113
 
            <field name="search_view_id" ref="stock_initial_inventory_search_view" />
114
 
        </record>
115
 
        
116
 
        <menuitem action="action_initial_inventory"
117
 
                  id="menu_initial_inventory"
118
 
                  parent="stock.menu_stock_inventory_control"
119
 
                  sequence="99" />
120
 
                  
121
 
        <!-- Cost reevaluation document -->
122
 
        <record id="cost_reevaluation_form_view" model="ir.ui.view">
123
 
            <field name="name">cost.reevaluation.form.view</field>
124
 
            <field name="model">stock.cost.reevaluation</field>
125
 
            <field name="type">form</field>
126
 
            <field name="arch" type="xml">
127
 
                <form string="Product cost revaluation">
128
 
                    <field name="name" />
129
 
                    <field name="date" />
130
 
                    <separator colspan="4" string="Product filters" />
131
 
                    <field name="sublist_id" attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('nomen_manda_0', '!=', False)]}"/>
132
 
                    <group colspan="2" col="4" attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('sublist_id', '!=', False)]}">
133
 
                        <field name="nomen_manda_0"
134
 
                            domain="[('level', '=', '0'), ('type', '=', 'mandatory')]"
135
 
                            widget="selection"
136
 
                            on_change="onChangeSearchNomenclature(0, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
137
 
                        />
138
 
                        <field name="nomen_manda_1"
139
 
                            domain="[('id','=', 0)]"
140
 
                            widget="selection"
141
 
                            get_selection="get_nomen"
142
 
                            on_change="onChangeSearchNomenclature(1, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
143
 
                        />
144
 
                        <field name="nomen_manda_2"
145
 
                            domain="[('id','=', 0)]"
146
 
                            widget="selection"
147
 
                            get_selection="get_nomen"
148
 
                            on_change="onChangeSearchNomenclature(2, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
149
 
                        />
150
 
                        <field name="nomen_manda_3"
151
 
                            domain="[('id','=', 0)]"
152
 
                            widget="selection"
153
 
                            get_selection="get_nomen"
154
 
                            on_change="onChangeSearchNomenclature(3, 'mandatory', nomen_manda_0, nomen_manda_1, nomen_manda_2, nomen_manda_3, False)"
155
 
                        />
156
 
                    </group>
157
 
                    <button colspan="4" icon="gtk-go-down" string="Fill lines" type="object" name="fill_lines" attrs="{'readonly': [('state', '!=', 'draft')]}" />
158
 
                    <notebook colspan="4">
159
 
                        <page string="Products">
160
 
                            <field name="reevaluation_line_ids" colspan="4" mode="tree" nolabel="1">
161
 
                                <tree string="Products" editable="top">
162
 
                                    <field name="product_id" on_change="product_id_change(product_id)"/>
163
 
                                    <field name="average_cost" />
164
 
                                    <field name="currency_id" />
165
 
                                </tree>
166
 
                            </field>
167
 
                        </page>
168
 
                    </notebook>
169
 
                    <group colspan="4" col="6">
170
 
                        <field name="state" />
171
 
                        <button name="action_cancel" type="object" string="Cancel" icon="gtk-cancel" states="draft,confirm" />
172
 
                        <button name="action_confirm" type="object" string="Confirm" icon="gtk-apply" states="draft" />
173
 
                        <button name="action_done" type="object" string="Validate" icon="gtk-jump-to" states="confirm" />
174
 
                        <button name="action_cancel_draft" type="object" string="Set to Draft" icon="gtk-convert" states="cancel" />
175
 
                    </group>
176
 
                </form>
177
 
            </field>
178
 
        </record>
179
 
        
180
 
        <record id="cost_reevaluation_tree_view" model="ir.ui.view">
181
 
            <field name="name">cost.reevaluation.tree.view</field>
182
 
            <field name="model">stock.cost.reevaluation</field>
183
 
            <field name="type">tree</field>
184
 
            <field name="arch" type="xml">
185
 
                <tree string="Product cost revaluation">
186
 
                    <field name="name" />
187
 
                    <field name="date" />
188
 
                    <field name="state" />
189
 
                </tree>
190
 
            </field>
191
 
        </record>
192
 
        
193
 
        <record id="cost_reevaluation_search_view" model="ir.ui.view">
194
 
            <field name="name">cost.reevaluation.search.view</field>
195
 
            <field name="model">stock.cost.reevaluation</field>
196
 
            <field name="type">search</field>
197
 
            <field name="arch" type="xml">
198
 
                <search string="Product cost revaluation">
199
 
                    <field name="name" />
200
 
                    <field name="state" />
201
 
                </search>
202
 
            </field>
203
 
        </record>
204
 
        
205
 
        <record id="action_cost_reevaluation" model="ir.actions.act_window">
206
 
            <field name="name">Product cost revaluation</field>
207
 
            <field name="res_model">stock.cost.reevaluation</field>
208
 
            <field name="view_type">form</field>
209
 
            <field name="view_mode">tree,form</field>
210
 
            <field name="search_view_id" ref="cost_reevaluation_search_view" />
211
 
        </record>
212
 
        
213
 
        <menuitem action="action_cost_reevaluation"
214
 
                  id="menu_cost_reevaluation"
215
 
                  parent="stock.menu_stock_inventory_control"
216
 
                  sequence="99" />
217
 
    </data>
218
 
</openerp>