before_purchase_view.xml
9.5 KB
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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data >
<!-- Demand Purchase Form View -->
<record model="ir.ui.view" id="before_purchase_form">
<field name="name">Before Purchase</field>
<field name="model">before.purchase</field>
<field name="arch" type="xml">
<form string="Before Purchase" version="12.0" create="0">
<header>
<button name="draft_button" states="draft" string="确认生成" type="object" groups="purchase.group_purchase_user"/>
<button name="draft_cancel" states="draft" string="拒绝" type="object" groups="purchase.group_purchase_user"/>
<button name="merge_before_line" states="draft" string="合并重复产品" type="object" groups="purchase.group_purchase_user"/>
<button name="%(add_partner_wizard)d" states="draft" type="action" string="批量添加供应商" class="oe_highlight" groups="purchase.group_purchase_user"/>
<button name="%(recreate_before_purchase_wizard)d" states="done" type="action" string="重新生成" class="oe_highlight" groups="purchase.group_purchase_user"/>
<!-- <button name='attachment_tree_view' type='object' string='附件'/> -->
<field name="state" widget="statusbar" statusbar_visible="draft,done" statusbar_colors='{"draft":"red"}'/>
</header>
<sheet>
<div class="oe_title">
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<group>
<field name="sale_order_id" readonly="1"/>
<field name="demand_purchase_id" readonly="1"/>
<field name="is_excipients" readonly="1"/>
<!-- <field name="po_number" /> -->
<field name="purchase_order_ids" widget="many2many_tags" options="{'color_field': 'color','no_create_edit': True}"/>
<field name="delivery_address"/>
</group>
<group>
<field name="gen_datetime" readonly="1"/>
<field name="charge_person"/>
<field name="purchase_company"/>
</group>
</group>
<notebook colspan="4">
<page string="待确认明细行">
<field name="order_line">
<tree string="待确认明细行" editable="bottom">
<field name="product_id" options="{'no_create': True, 'no_open': True}" readonly="1"/>
<field name="product_model" readonly="1"/>
<field name="brand" readonly="1"/>
<field name="acc_code" readonly="1"/>
<field name="partner_code" readonly="1"/>
<field name="partner_id"/>
<field name="acc_purchase_price"/>
<field name="qty" readonly="1"/>
</tree>
</field>
</page>
<page string="重新生成明细行">
<field name="recreate_line">
<tree string="重新生成明细行" editable="bottom">
<field name="product_id" options="{'no_create': True, 'no_open': True}" readonly="1"/>
<field name="product_model" readonly="1"/>
<field name="brand" readonly="1"/>
<field name="acc_code" readonly="1"/>
<field name="partner_code" readonly="1"/>
<field name="partner_id" readonly="1"/>
<!-- <field name="partner_id" readonly="1"/> -->
<!-- <field name="acc_purchase_price" readonly="1"/> -->
<field name="qty" readonly="1"/>
</tree>
</field>
</page>
</notebook>
<!-- <notebook colspan="4">
<page string="重新生成明细行">
<field name="recreate_line">
<tree string="重新生成明细行" editable="bottom">
<field name="product_id" options="{'no_create': True, 'no_open': True}" readonly="1"/>
<field name="product_model" readonly="1"/>
<field name="brand" readonly="1"/>
<field name="acc_code" readonly="1"/>
<field name="partner_code" readonly="1"/>
<field name="partner_id" readonly="1"/>
<field name="acc_purchase_price" readonly="1"/>
<field name="qty" readonly="1"/>
</tree>
</field>
</page>
</notebook> -->
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record model="ir.ui.view" id="before_purchase_tree">
<field name="name">Before Purchase</field>
<field name="model">before.purchase</field>
<field name="arch" type="xml">
<!-- <tree colors="grey:state == 'done'" string="Demand Purchase"> -->
<tree decoration-danger="state=='draft'" decoration-success="state=='done'" string="Before Purchase" create="0">
<field name="name"/>
<field name="sale_order_id"/>
<field name="demand_purchase_id"/>
<field name="charge_person"/>
<field name="gen_datetime"/>
<field name="is_excipients"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- <record id="demand_purchase_search" model="ir.ui.view">
<field name="name">Demand Purchase Search</field>
<field name="model">demand.purchase</field>
<field name="arch" type="xml">
<search string="Demand Purchase">
<field name="name" string="编号"/>
<group expand="0" string="Group By..." colspan="16">
<filter string="供应商" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="单号" domain="[]" context="{'group_by':'name'}"/>
<filter string="申请日期" domain="[]" context="{'group_by':'apply_date'}"/>
<filter string="申请人" domain="[]" context="{'group_by':'create_user'}"/>
<filter string="需求日期" domain="[]" context="{'group_by':'need_date'}"/>
<filter string="备注" domain="[]" context="{'group_by':'note'}"/>
</group>
</search>
</field>
</record> -->
<record id="before_purchase_search" model="ir.ui.view">
<field name="name">Before Purchase Search</field>
<field name="model">before.purchase</field>
<field name="arch" type="xml">
<search string="Search before purchase">
<filter string="待确认" name="wait_confirm" domain="[('state','=','draft')]"/>
<field name="order_line" string="产品编码" filter_domain="[('order_line.product_id.acc_code', 'ilike', self)]"/>
<field name="name" string="单号"/>
<field name="sale_order_id"/>
<field name="demand_purchase_id"/>
<field name="charge_person"/>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_before_purchase">
<field name="name">待确认询价单</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">before.purchase</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="before_purchase_search"/>
<field name="context">{'search_default_wait_confirm': 1}</field>
</record>
<menuitem id="menu_acct_before_purchase" name="待确认生成询价单" parent="menu_demand_purchase_management" action="action_before_purchase" groups="purchase.group_purchase_user" sequence="1"/>
</data>
</openerp>