forked from OCA/delivery-carrier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstock_view.xml
128 lines (112 loc) · 4.25 KB
/
stock_view.xml
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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- DEPOSIT SLIP -->
<!-- ACTION / MENU -->
<record id="act_delivery_deposit" model="ir.actions.act_window">
<field name="name">Deposit Slip</field>
<field name="res_model">deposit.slip</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="menu_delivery_deposit_slip"
name="Transport"
parent="stock.menu_stock_root"
sequence="2" />
<menuitem id="menu_delivery_deposit_slip_model"
action="act_delivery_deposit"
parent="menu_delivery_deposit_slip"
sequence="20" />
<!-- SEARCH -->
<record id="view_deposit_slip_search" model="ir.ui.view">
<field name="name">delivery_deposit.slip.search</field>
<field name="model">deposit.slip</field>
<field name="arch" type="xml">
<search string="Deposit">
<field name="name"/>
<field name="create_date"/>
<group string="Group By" name="groupby">
<filter name="carrier_type_groupby" string="Delivery Method Type" context="{'group_by': 'carrier_type'}"/>
</group>
</search>
</field>
</record>
<!-- TREE -->
<record id="view_deposit_slip_tree" model="ir.ui.view">
<field name="model">deposit.slip</field>
<field name="arch" type="xml">
<tree string="Deposit" colors="blue:state=='draft'">
<field name="name"/>
<field name="carrier_type"/>
<field name="create_date"/>
<field name="state"/>
</tree>
</field>
</record>
<!--FORM-->
<record id="view_deposit_slip_form" model="ir.ui.view">
<field name="model">deposit.slip</field>
<field name="arch" type="xml">
<form string="Deposit">
<header>
<button name="validate_deposit" string="Confirm" type="object"
attrs="{'invisible' : ['|', ('state','!=','draft'), ('carrier_type', '=', False)]}"
class="oe_highlight"/>
<button name="create_edi_file" string="Re-generate EDI file"
type="object"
confirm="Are you sure that you re-generate the EDI file ?"
attrs="{'invisible': True}"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,done"
statusbar_colors='{"draft": "blue", "done": "blue"}'/>
</header>
<sheet>
<group name="main" col="4">
<field name="name"/>
<field name="weight"/>
<field name="carrier_type"/>
<field name="number_of_packages"/>
</group>
<group name="pickings">
<field name="picking_ids" nolabel="1" widget="many2many"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Notification in chatter -->
<record id="deposit_slip_done" model="mail.message.subtype">
<field name="name">Deposit Slip Validated</field>
<field name="res_model">deposit.slip</field>
<field name="default" eval="False"/>
<field name="description">Deposit Slip Validated</field>
</record>
<!-- STOCK PICKING -->
<!-- FORM -->
<record id="view_picking_withcarrier_out_form" model="ir.ui.view">
<field name="model">stock.picking</field>
<field name="inherit_id" ref="delivery.view_picking_withcarrier_out_form" />
<field name="arch" type="xml">
<field name="weight_net" position="after">
<field name="deposit_slip_id"
attrs="{'readonly': True,'invisible': [('deposit_slip_id','=','')]}"/>
</field>
</field>
</record>
<!-- DELIVERY CARRIER -->
<!-- FORM -->
<record id="view_delivery_carrier_form" model="ir.ui.view">
<field name="model">delivery.carrier</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="delivery.view_delivery_carrier_form" />
<field name="arch" type="xml">
<field name="active" position="after">
<field name="deposit_slip"/>
</field>
</field>
</record>
</data>
</openerp>