1
<?xml version="1.0" encoding="utf-8" ?>
5
<!-- Add required fields on standard sale order view -->
6
<record id="sale_order_form_view_required" model="ir.ui.view">
7
<field name="name">sale.order.form.view.required</field>
8
<field name="model">sale.order</field>
9
<field name="type">form</field>
10
<field name="inherit_id" ref="sale.view_order_form" />
11
<field name="arch" type="xml">
13
<xpath expr="/form/notebook/page[@string='Sales Order']/field[@name='partner_invoice_id']" position="replace">
14
<field domain="[('partner_id','=',partner_id)]" name="partner_order_id" required="1" />
16
<xpath expr="/form/notebook/page[@string='Sales Order']/field[@name='partner_order_id']" position="replace">
17
<field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended" required="1" />
19
<xpath expr="/form/notebook/page[@string='Sales Order']/field[@name='partner_shipping_id']" position="replace">
20
<field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended" required="1" />
22
<xpath expr="/form/notebook/page[@string='Sales Order']/field[@name='pricelist_id']" position="replace">
23
<field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended" required="1" />
29
<record id="procurement_request_form_view" model="ir.ui.view">
30
<field name="name">procurement.request.form.view</field>
31
<field name="model">sale.order</field>
32
<field name="type">form</field>
33
<field name="priority" eval="250" />
34
<field name="arch" type="xml">
35
<form string="Procurement Request">
36
<group col="6" colspan="4">
38
<field name="date_order" attrs="{'readonly': [('state', '!=', 'procurement')]}" />
39
<field name="warehouse_id" widget="selection" attrs="{'readonly': [('state', '!=', 'procurement')]}" />
40
<field name="requestor" attrs="{'readonly': [('state', '!=', 'procurement')]}" />
41
<field name="origin" attrs="{'readonly': [('state', '!=', 'procurement')]}" />
43
<notebook colspan="5">
44
<page string="Products">
45
<field name="order_line" mode="tree,form" colspan="4" nolabel="1">
46
<tree editable="top" string="Products">
47
<field name="product_id" on_change="requested_product_id_change(product_id, type)" required="1" />
48
<field name="name" invisible="1" />
49
<field name="product_uom" />
50
<field name="product_uom_qty" />
51
<field name="notes" />
52
<field name="type" on_change="requested_product_id_change(product_id, type)"/>
53
<field name="latest" />
54
<field name="supplier" context="{'product_id': product_id, 'choose_supplier': True}" attrs="{'readonly': [('type', '=', 'make_to_stock')]}" domain="[('supplier', '=', True)]"/>
55
<!-- <button name="split_line" type="object" string="Split Line" icon="terp-stock_effects-object-colorize" />
56
<button name="merge_line" type="object" string="Merge Line" icon="terp-gtk-jump-to-ltr" context="{'wizard_id': active_id}" /> -->
59
<field name="product_id" colspan="4" />
60
<field name="product_uom_qty" />
61
<field name="product_uom" />
64
<field name="notes" colspan="4"/>
65
<field name="supplier" />
66
<field name="latest" />
70
<group colspan="4" col="6">
71
<field name="state" />
72
<button name="procurement_cancel" icon="gtk-cancel" string="Cancel" states="procurement,proc_progress" />
73
<button name="procurement_confirm" icon="gtk-execute" string="Confirm Request" states="procurement" />
74
<button name="order_confirm" icon="gtk-execute" string="Close Request" states="proc_progress" />
77
<page string="Sourcing Documents">
78
<field name="order_ids" nolabel="1" colspan="4">
79
<tree string="Sourcing Documents" colors="blue:state=='draft'">
81
<field name="partner_id" />
82
<field name="state" />
87
<field name="notes" nolabel="1" />
94
<record id="procurement_request_tree_view" model="ir.ui.view">
95
<field name="name">procurement.request.tree.view</field>
96
<field name="model">sale.order</field>
97
<field name="type">tree</field>
98
<field name="priority" eval="250" />
99
<field name="arch" type="xml">
100
<tree string="Procurement Requests">
101
<field name="name" />
102
<field name="date_order" />
103
<field name="origin" />
104
<field name="requestor" />
105
<field name="state" />
110
<record id="procurement_request_search_view" model="ir.ui.view">
111
<field name="name">procurement.request.search.view</field>
112
<field name="model">sale.order</field>
113
<field name="type">search</field>
114
<field name="priority" eval="250" />
115
<field name="arch" type="xml">
116
<search string="Procurment Requests">
117
<group string="Filters" expand="1">
118
<filter name="state_proc" string="Procurement" icon="terp-document-new" domain="[('state', '=', 'procurement')]" />
119
<filter name="state_proc_progress" string="In Progress" icon="terp-stage" domain="[('state', '=', 'proc_progress')]" />
120
<filter name="state_done" string="Done" icon="terp-dialog-close" domain="[('state', '=', 'proc_done')]" />
121
<separator orientation="vertical" />
122
<field name="name" />
123
<field name="origin" />
124
<field name="requestor" />
126
<group string="Group By...">
127
<filter string="State" icon="terp-gtk-select-all" domain="[]" context="{'group_by': 'state'}" />
133
<record id="action_procurement_request" model="ir.actions.act_window">
134
<field name="name">Procurement Requests</field>
135
<field name="res_model">sale.order</field>
136
<field name="view_type">form</field>
137
<field name="view_mode">tree,form</field>
138
<field name="view_search_id" ref="procurement_request_search_view" />
139
<field name="context">{'procurement_request': True}</field>
140
<field name="domain">[('procurement_request', '=', True)]</field>
143
<record id="action_procurement_request_form_view" model="ir.actions.act_window.view">
144
<field name="act_window_id" ref="action_procurement_request" />
145
<field name="sequence">2</field>
146
<field name="view_mode">form</field>
147
<field name="view_id" ref="procurement_request_form_view" />
150
<record id="action_procurement_request_tree_view" model="ir.actions.act_window.view">
151
<field name="act_window_id" ref="action_procurement_request" />
152
<field name="sequence">1</field>
153
<field name="view_mode">tree</field>
154
<field name="view_id" ref="procurement_request_tree_view" />
157
<menuitem action="action_procurement_request"
158
id="menu_procurement_request"
159
parent="base.menu_sales" />