1
<?xml version="1.0" encoding="utf-8" ?>
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)" />
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">
30
<button special="cancel" string="Cancel" icon="gtk-cancel" />
31
<button name="show_card" icon="gtk-execute" type="object" string="Show card" />
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" />
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" />
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" />
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>
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" />
103
<menuitem id="menu_stock_card"
104
action="action_stock_card"
106
parent="stock.menu_traceability" />
109
<!-- Menu entry at right hand side of product form -->
111
id="act_product_stock_card"
113
src_model="product.product"
114
res_model="stock.card.wizard"
118
context="{'product_id': active_id}"