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

« back to all changes in this revision

Viewing changes to stock_override/wizard/stock_card_view.xml

  • Committer: jf
  • Date: 2013-08-27 09:32:03 UTC
  • mfrom: (1681.9.24 unifield-wm)
  • Revision ID: jfb@tempo-consulting.fr-20130827093203-a4dimvmomqs63tsx
UF-2071 [IMP] Provide a comprehensive stock move display for a given product on a given location (exportable & printable)
lp:~unifield-team/unifield-wm/uf-2071

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_card_wizard_form_view" model="ir.ui.view">
 
6
            <field name="name">stock.card.wizard.form.view</field>
 
7
            <field name="model">stock.card.wizard</field>
 
8
            <field name="type">form</field>
 
9
            <field name="priority" eval="99" />
 
10
            <field name="arch" type="xml">
 
11
                <form string="Stock card parameters">
 
12
                    <separator colspan="4" string="Location" />
 
13
                    <field name="location_id" domain="[('usage', '!=', 'view')]" 
 
14
                           attrs="{'readonly': [('all_inout', '=', True)], 'required': [('all_inout', '=', False)]}" />
 
15
                    <field name="all_inout" />
 
16
                    <separator colspan="4" string="Product" />
 
17
                    <field name="product_id" 
 
18
                           on_change="onchange_product_id(product_id)" />
 
19
                    <newline />
 
20
                    <field name="perishable" invisible="1" />
 
21
                    <field name="prodlot_id" 
 
22
                           domain="[('product_id', '=', product_id)]"
 
23
                           attrs="{'invisible': [('perishable', '=', False)], 'required': [('perishable', '=', True)]}" />
 
24
                    <separator colspan="4" string="Period" />
 
25
                    <field name="from_date" />
 
26
                    <field name="to_date" />
 
27
                    <separator colspan="4" string="Actions" />
 
28
                    <group colspan="4" col="3">
 
29
                        <label> </label>
 
30
                        <button special="cancel" string="Cancel" icon="gtk-cancel" />
 
31
                        <button name="show_card" icon="gtk-execute" type="object" string="Show card" />
 
32
                    </group>
 
33
                </form>
 
34
            </field>
 
35
        </record>
 
36
 
 
37
        <record id="stock_card_form_view" model="ir.ui.view">
 
38
            <field name="name">stock.card.form.view</field>
 
39
            <field name="model">stock.card.wizard</field>
 
40
            <field name="type">form</field>
 
41
            <field name="arch" type="xml">
 
42
                <form string="Stock card" hide_new_button="1" hide_delete_button="1" hide_duplicate_button="1">
 
43
                    <separator colspan="4" string="Location" />
 
44
                    <field name="location_id" readonly="1" />
 
45
                    <separator colspan="4" string="Product" />
 
46
                    <field name="product_id" readonly="1" />
 
47
                    <group colspan="2" col="3">
 
48
                        <field name="available_stock" readonly="1" />
 
49
                        <field name="uom_id" readonly="1" nolabel="1" />
 
50
                    </group>
 
51
                    <field name="perishable" invisible="1" />
 
52
                    <field name="prodlot_id" attrs="{'invisible': [('perishable', '=', False)]}" readonly="1" />
 
53
                    <separator colspan="4" string="Period" />
 
54
                    <field name="from_date" readonly="1" />
 
55
                    <field name="to_date" readonly="1" />
 
56
                    <separator colspan="4" string="Moves" />
 
57
                    <field name="card_lines" readonly="1" colspan="4" nolabel="1" mode="tree">
 
58
                        <tree string="Lines" editable="top">
 
59
                            <field name="date_done" />
 
60
                            <field name="doc_ref" />
 
61
                            <field name="origin" />
 
62
                            <field name="qty_in" />
 
63
                            <field name="qty_out" />
 
64
                            <field name="balance" />
 
65
                            <field name="src_dest" />
 
66
                            <field name="notes" />
 
67
                        </tree>
 
68
                    </field>
 
69
                </form>
 
70
            </field>
 
71
        </record>
 
72
 
 
73
        <record id="stock_card_tree_view" model="ir.ui.view">
 
74
            <field name="name">stock.card.tree.view</field>
 
75
            <field name="model">stock.card.wizard</field>
 
76
            <field name="type">tree</field>
 
77
            <field name="arch" type="xml">
 
78
                <tree string="Stock cards" hide_new_button="1" hide_delete_button="1" noteditable="1">
 
79
                    <field name="location_id" />
 
80
                    <field name="product_id" />
 
81
                    <field name="prodlot_id" />
 
82
                    <field name="from_date" />
 
83
                    <field name="to_date" />
 
84
                </tree>
 
85
            </field>
 
86
        </record>
 
87
 
 
88
        <record id="action_stock_card" model="ir.actions.act_window">
 
89
            <field name="name">Stock card</field>
 
90
            <field name="res_model">stock.card.wizard</field>
 
91
            <field name="view_type">form</field>
 
92
            <field name="view_mode">form</field>
 
93
            <field name="target">new</field>
 
94
            <field name="context">{}</field>
 
95
        </record>
 
96
 
 
97
        <record id="action_view_stock_card" model="ir.actions.act_window.view">
 
98
            <field name="view_mode">form</field>
 
99
            <field name="view_id" ref="stock_card_wizard_form_view" />
 
100
            <field name="act_window_id" ref="action_stock_card" />
 
101
        </record>
 
102
 
 
103
        <menuitem id="menu_stock_card"
 
104
                  action="action_stock_card"
 
105
                  sequence="5"
 
106
                  parent="stock.menu_traceability" />
 
107
 
 
108
 
 
109
        <!-- Menu entry at right hand side of product form -->
 
110
        <act_window 
 
111
            id="act_product_stock_card"
 
112
            name="Stock Card"
 
113
            src_model="product.product"
 
114
            res_model="stock.card.wizard"
 
115
            target="new"
 
116
            view_type="form"
 
117
            view_mode="form"
 
118
            context="{'product_id': active_id}"
 
119
            />
 
120
 
 
121
 
 
122
    </data>
 
123
</openerp>