odoo-addon-stock-request 16.0.1.0.0.3__py3-none-any.whl → 17.0.1.0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. odoo/addons/stock_request/README.rst +41 -41
  2. odoo/addons/stock_request/__manifest__.py +1 -1
  3. odoo/addons/stock_request/i18n/ca.po +13 -30
  4. odoo/addons/stock_request/i18n/de.po +72 -41
  5. odoo/addons/stock_request/i18n/el_GR.po +13 -30
  6. odoo/addons/stock_request/i18n/es.po +27 -40
  7. odoo/addons/stock_request/i18n/es_ES.po +13 -30
  8. odoo/addons/stock_request/i18n/eu.po +13 -30
  9. odoo/addons/stock_request/i18n/fi.po +13 -30
  10. odoo/addons/stock_request/i18n/fr.po +13 -30
  11. odoo/addons/stock_request/i18n/fr_CH.po +13 -30
  12. odoo/addons/stock_request/i18n/fr_FR.po +13 -30
  13. odoo/addons/stock_request/i18n/gl.po +13 -30
  14. odoo/addons/stock_request/i18n/hr.po +13 -30
  15. odoo/addons/stock_request/i18n/hr_HR.po +13 -30
  16. odoo/addons/stock_request/i18n/it.po +13 -30
  17. odoo/addons/stock_request/i18n/ja.po +13 -30
  18. odoo/addons/stock_request/i18n/ja_JP.po +13 -30
  19. odoo/addons/stock_request/i18n/nl.po +13 -30
  20. odoo/addons/stock_request/i18n/nl_NL.po +13 -30
  21. odoo/addons/stock_request/i18n/pt.po +13 -30
  22. odoo/addons/stock_request/i18n/pt_BR.po +13 -30
  23. odoo/addons/stock_request/i18n/ro.po +13 -30
  24. odoo/addons/stock_request/i18n/ru.po +13 -30
  25. odoo/addons/stock_request/i18n/sl.po +13 -30
  26. odoo/addons/stock_request/i18n/stock_request.pot +14 -31
  27. odoo/addons/stock_request/i18n/tr.po +13 -30
  28. odoo/addons/stock_request/i18n/tr_TR.po +13 -30
  29. odoo/addons/stock_request/i18n/vi_VN.po +13 -30
  30. odoo/addons/stock_request/i18n/zh_CN.po +71 -39
  31. odoo/addons/stock_request/models/stock_move.py +2 -2
  32. odoo/addons/stock_request/models/stock_move_line.py +4 -4
  33. odoo/addons/stock_request/models/stock_request.py +50 -43
  34. odoo/addons/stock_request/models/stock_request_abstract.py +2 -1
  35. odoo/addons/stock_request/models/stock_request_order.py +0 -13
  36. odoo/addons/stock_request/models/stock_rule.py +1 -1
  37. odoo/addons/stock_request/readme/CONFIGURE.md +16 -0
  38. odoo/addons/stock_request/readme/CONTRIBUTORS.md +13 -0
  39. odoo/addons/stock_request/readme/{DESCRIPTION.rst → DESCRIPTION.md} +2 -1
  40. odoo/addons/stock_request/readme/{ROADMAP.rst → ROADMAP.md} +3 -3
  41. odoo/addons/stock_request/readme/USAGE.md +16 -0
  42. odoo/addons/stock_request/security/stock_request_security.xml +5 -1
  43. odoo/addons/stock_request/static/description/index.html +17 -17
  44. odoo/addons/stock_request/tests/test_stock_request.py +171 -149
  45. odoo/addons/stock_request/views/res_config_settings_views.xml +72 -108
  46. odoo/addons/stock_request/views/stock_picking_views.xml +1 -1
  47. odoo/addons/stock_request/views/stock_request_order_views.xml +40 -36
  48. odoo/addons/stock_request/views/stock_request_views.xml +40 -39
  49. {odoo_addon_stock_request-16.0.1.0.0.3.dist-info → odoo_addon_stock_request-17.0.1.0.0.3.dist-info}/METADATA +47 -50
  50. odoo_addon_stock_request-17.0.1.0.0.3.dist-info/RECORD +71 -0
  51. {odoo_addon_stock_request-16.0.1.0.0.3.dist-info → odoo_addon_stock_request-17.0.1.0.0.3.dist-info}/WHEEL +1 -1
  52. odoo_addon_stock_request-17.0.1.0.0.3.dist-info/top_level.txt +1 -0
  53. odoo/addons/stock_request/readme/CONFIGURE.rst +0 -17
  54. odoo/addons/stock_request/readme/CONTRIBUTORS.rst +0 -15
  55. odoo/addons/stock_request/readme/USAGE.rst +0 -16
  56. odoo_addon_stock_request-16.0.1.0.0.3.dist-info/RECORD +0 -71
  57. odoo_addon_stock_request-16.0.1.0.0.3.dist-info/top_level.txt +0 -1
@@ -9,153 +9,117 @@
9
9
  <field name="model">res.config.settings</field>
10
10
  <field name="inherit_id" ref="base.res_config_settings_view_form" />
11
11
  <field name="arch" type="xml">
12
- <xpath expr="//div[hasclass('settings')]" position="inside">
13
- <div
14
- class="app_settings_block"
12
+ <xpath expr="//form" position="inside">
13
+ <app
15
14
  data-string="Stock Request"
16
15
  string="Stock Request"
17
- data-key="stock_request"
16
+ name="stock_request"
18
17
  groups="stock_request.group_stock_request_manager"
19
18
  >
20
19
  <h2>Orders &amp; Configuration</h2>
21
- <div class="row mt16 o_settings_container" id="stock_request">
22
- <div class="col-xs-12 col-md-6 o_setting_box">
23
- <div class="o_setting_left_pane">
24
- <field name="group_stock_request_order" />
25
- </div>
26
- <div class="o_setting_right_pane">
27
- <label
28
- string="Enable Orders"
29
- for="group_stock_request_order"
30
- />
20
+ <block id="stock_request">
21
+ <setting>
22
+ <field
23
+ name="group_stock_request_order"
24
+ string="Enable Orders"
25
+ />
26
+ <div class="content-group">
31
27
  <div class="text-muted">
32
28
  Activates Stock Request Orders
33
29
  </div>
34
30
  </div>
35
- </div>
36
- <div class="col-xs-12 col-md-6 o_setting_box">
37
- <div class="o_setting_left_pane">
38
- <field name="stock_request_allow_virtual_loc" />
39
- </div>
40
- <div class="o_setting_right_pane">
41
- <label
42
- string="Allow All Locations Types"
43
- for="stock_request_allow_virtual_loc"
44
- />
31
+ </setting>
32
+ <setting>
33
+ <field
34
+ name="stock_request_allow_virtual_loc"
35
+ string="Allow All Locations Types"
36
+ />
37
+ <div class="content-group">
45
38
  <div class="text-muted">
46
- By default only internal and transit locations are allowed in
47
- Stock Request and Orders.
39
+ By default only internal and transit locations are allowed in Stock Request and Orders.
48
40
  </div>
49
41
  </div>
50
- </div>
51
- <div class="col-xs-12 col-md-6 o_setting_box">
52
- <div class="o_setting_left_pane">
53
- <field name="module_stock_request_submit" />
54
- </div>
55
- <div class="o_setting_right_pane">
56
- <label
57
- string="Enable Submitted State"
58
- for="module_stock_request_purchase"
59
- />
42
+ </setting>
43
+ <setting>
44
+ <field
45
+ name="module_stock_request_submit"
46
+ string="Enable Submitted State"
47
+ />
48
+ <div class="content-group">
60
49
  <div class="text-muted">
61
- Add State to Stock Request and Stock Request Orders if
62
- activated.
50
+ Add State to Stock Request and Stock Request Orders if activated.
63
51
  </div>
64
52
  </div>
65
- </div>
66
- <div class="col-xs-12 col-md-6 o_setting_box">
67
- <div class="o_setting_left_pane">
68
- <field name="stock_request_check_available_first" />
69
- </div>
70
- <div class="o_setting_right_pane">
71
- <label
72
- string="Check available stock first"
73
- for="stock_request_check_available_first"
74
- />
53
+ </setting>
54
+ <setting>
55
+ <field
56
+ name="stock_request_check_available_first"
57
+ string="Check available stock first"
58
+ />
59
+ <div class="content-group">
75
60
  <div
76
61
  class="text-muted"
77
62
  >By default, available stock is not used</div>
78
63
  </div>
79
- </div>
80
- </div>
64
+ </setting>
65
+ </block>
81
66
  <h2>Purchases</h2>
82
- <div
83
- class="row mt16 o_settings_container"
84
- id="stock_request_purchase"
85
- >
86
- <div class="col-xs-12 col-md-6 o_setting_box">
87
- <div class="o_setting_left_pane">
88
- <field name="module_stock_request_purchase" />
89
- </div>
90
- <div class="o_setting_right_pane">
91
- <label
92
- string="Enable Stock Requests for Purchases"
93
- for="module_stock_request_purchase"
94
- />
67
+ <block id="stock_request_purchase">
68
+ <setting>
69
+ <field
70
+ name="module_stock_request_purchase"
71
+ string="Enable Stock Requests for Purchases"
72
+ />
73
+ <div class="content-group">
95
74
  <div class="text-muted">
96
75
  Use Purchases with Stock Requests
97
76
  </div>
98
77
  </div>
99
- </div>
100
- </div>
78
+ </setting>
79
+ </block>
101
80
  <h2>Manufacturing</h2>
102
- <div class="row mt16 o_settings_container" id="stock_request_mrp">
103
- <div class="col-xs-12 col-md-6 o_setting_box">
104
- <div class="o_setting_left_pane">
105
- <field name="module_stock_request_mrp" />
106
- </div>
107
- <div class="o_setting_right_pane">
108
- <label
109
- string="Enable Stock Requests for Manufacturing"
110
- for="module_stock_request_mrp"
111
- />
81
+ <block id="stock_request_mrp">
82
+ <setting>
83
+ <field
84
+ name="module_stock_request_mrp"
85
+ string="Enable Stock Requests for Manufacturing"
86
+ />
87
+ <div class="content-group">
112
88
  <div class="text-muted">
113
89
  Use Manufacturing Orders with Stock Requests
114
90
  </div>
115
91
  </div>
116
- </div>
117
- </div>
92
+ </setting>
93
+ </block>
118
94
  <h2>Kanban</h2>
119
- <div
120
- class="row mt16 o_settings_container"
121
- id="stock_request_purchase"
122
- >
123
- <div class="col-xs-12 col-md-6 o_setting_box">
124
- <div class="o_setting_left_pane">
125
- <field name="module_stock_request_kanban" />
126
- </div>
127
- <div class="o_setting_right_pane">
128
- <label
129
- string="Enable Stock Requests Kanban cards"
130
- for="module_stock_request_purchase"
131
- />
95
+ <block id="stock_request_purchase">
96
+ <setting>
97
+ <field
98
+ name="module_stock_request_kanban"
99
+ string="Enable Stock Requests Kanban cards"
100
+ />
101
+ <div class="content-group">
132
102
  <div class="text-muted">
133
103
  Use Kanban cards for consumable products
134
104
  </div>
135
105
  </div>
136
- </div>
137
- </div>
106
+ </setting>
107
+ </block>
138
108
  <h2>Analytic</h2>
139
- <div
140
- class="row mt16 o_settings_container"
141
- id="stock_request_analytic"
142
- >
143
- <div class="col-xs-12 col-md-6 o_setting_box">
144
- <div class="o_setting_left_pane">
145
- <field name="module_stock_request_analytic" />
146
- </div>
147
- <div class="o_setting_right_pane">
148
- <label
149
- string="Enable Analytic Accounting in Stock Requests"
150
- for="module_stock_request_analytic"
151
- />
109
+ <block id="stock_request_analytic">
110
+ <setting>
111
+ <field
112
+ name="module_stock_request_analytic"
113
+ string="Enable Analytic Accounting in Stock Requests"
114
+ />
115
+ <div class="content-group">
152
116
  <div class="text-muted">
153
117
  Analytic accounting in Stock Requests
154
118
  </div>
155
119
  </div>
156
- </div>
157
- </div>
158
- </div>
120
+ </setting>
121
+ </block>
122
+ </app>
159
123
  </xpath>
160
124
  </field>
161
125
  </record>
@@ -12,7 +12,7 @@
12
12
  name="action_view_stock_request"
13
13
  class="oe_stat_button"
14
14
  icon="fa-chain"
15
- attrs="{'invisible':[('stock_request_ids', '=', [])]}"
15
+ invisible="stock_request_ids == []"
16
16
  >
17
17
  <field
18
18
  name="stock_request_count"
@@ -6,7 +6,6 @@
6
6
  <field name="arch" type="xml">
7
7
  <tree>
8
8
  <field name="name" />
9
- <field name="allow_virtual_location" invisible="1" />
10
9
  <field name="warehouse_id" groups="stock.group_stock_multi_locations" />
11
10
  <field name="location_id" groups="stock.group_stock_multi_locations" />
12
11
  <field name="state" />
@@ -18,27 +17,22 @@
18
17
  <field name="model">stock.request.order</field>
19
18
  <field name="arch" type="xml">
20
19
  <form>
21
- <field name="allow_virtual_location" invisible="1" />
22
- <field name="company_id" invisible="1" />
23
- <field name="warehouse_id" invisible="1" />
24
- <field name="location_id" invisible="1" />
25
- <field name="procurement_group_id" invisible="1" />
26
20
  <header>
27
21
  <button
28
22
  name="action_confirm"
29
23
  string="Confirm"
30
24
  type="object"
31
- attrs="{'invisible': [('state', 'not in', ['draft'])]}"
25
+ invisible="state not in ['draft']"
32
26
  />
33
27
  <button
34
28
  name="action_cancel"
35
- states="draft,open"
29
+ invisible="state not in ['draft','open']"
36
30
  type="object"
37
31
  string="Cancel"
38
32
  />
39
33
  <button
40
34
  name="action_draft"
41
- states="cancel"
35
+ invisible="state not in ['cancel']"
42
36
  type="object"
43
37
  string="Set to Draft"
44
38
  />
@@ -46,22 +40,17 @@
46
40
  </header>
47
41
  <sheet>
48
42
  <div class="oe_button_box" name="button_box">
49
- <field
50
- name="picking_ids"
51
- invisible="1"
52
- groups="stock.group_stock_user"
53
- />
43
+ <field name="picking_ids" invisible="1" />
54
44
  <button
55
45
  type="object"
56
46
  name="action_view_transfer"
57
47
  class="oe_stat_button"
58
48
  icon="fa-truck"
59
- attrs="{'invisible': [('picking_count', '=', 0)]}"
49
+ invisible="picking_count == 0"
60
50
  groups="stock.group_stock_user"
61
51
  >
62
52
  <field
63
53
  name="picking_count"
64
- groups="stock.group_stock_user"
65
54
  widget="statinfo"
66
55
  string="Transfers"
67
56
  />
@@ -71,7 +60,7 @@
71
60
  name="action_view_stock_requests"
72
61
  class="oe_stat_button"
73
62
  icon="fa-chain"
74
- attrs="{'invisible': [('state', '=', 'draft')]}"
63
+ invisible="state == 'draft'"
75
64
  groups="stock.group_stock_user"
76
65
  >
77
66
  <field
@@ -89,19 +78,23 @@
89
78
  </div>
90
79
  <group>
91
80
  <group>
92
- <field name="expected_date" />
93
- <field name="picking_policy" />
81
+ <field name="expected_date" readonly="state != 'draft'" />
82
+ <field name="picking_policy" readonly="state != 'draft'" />
94
83
  </group>
95
84
  <group>
96
85
  <field
97
86
  name="warehouse_id"
98
- widget="selection"
87
+ readonly="state != 'draft'"
88
+ options="{'no_create': True, 'no_open': True}"
99
89
  groups="stock.group_stock_multi_locations"
100
90
  />
101
91
  <field
102
92
  name="location_id"
93
+ readonly="state != 'draft'"
94
+ options="{'no_create': True, 'no_open': True}"
103
95
  groups="stock.group_stock_multi_locations"
104
96
  />
97
+ <field name="allow_virtual_location" invisible="1" />
105
98
  <field
106
99
  name="procurement_group_id"
107
100
  groups="stock.group_adv_location"
@@ -110,7 +103,12 @@
110
103
  name="company_id"
111
104
  groups="base.group_multi_company"
112
105
  options="{'no_create': True}"
106
+ readonly="state != 'draft'"
113
107
  />
108
+ <field name="warehouse_id" invisible="1" />
109
+ <field name="location_id" invisible="1" />
110
+ <field name="procurement_group_id" invisible="1" />
111
+ <field name="company_id" invisible="1" />
114
112
  </group>
115
113
  </group>
116
114
  <notebook>
@@ -126,38 +124,44 @@
126
124
  'default_company_id': company_id,
127
125
  'default_state': state,
128
126
  }"
129
- attrs="{'readonly': [('state', '!=', 'draft')]}"
127
+ readonly="state != 'draft'"
130
128
  >
131
129
  <tree editable="bottom">
132
- <field name="name" readonly="1" />
130
+ <field name="name" readonly="1" optional="show" />
133
131
  <field name="product_id" />
134
- <field name="allowed_uom_categ_id" invisible="1" />
132
+ <field
133
+ name="allowed_uom_categ_id"
134
+ column_invisible="1"
135
+ />
135
136
  <field
136
137
  name="product_uom_id"
137
138
  options="{'no_open': True, 'no_create': True}"
138
139
  groups="uom.group_uom"
139
140
  />
140
- <field name="product_uom_id" invisible="1" />
141
141
  <field
142
142
  name="route_id"
143
143
  options="{'no_create': True}"
144
144
  groups="stock.group_stock_multi_locations"
145
145
  />
146
- <field name="route_ids" invisible="1" />
146
+ <field name="route_ids" column_invisible="1" />
147
147
  <field name="product_uom_qty" />
148
- <field name="qty_in_progress" />
149
- <field name="qty_done" />
150
- <field name="expected_date" invisible="1" />
151
- <field name="picking_policy" invisible="1" />
148
+ <field name="qty_in_progress" optional="show" />
149
+ <field name="qty_done" optional="show" />
150
+ <field name="expected_date" column_invisible="1" />
151
+ <field name="picking_policy" column_invisible="1" />
152
+ <field name="warehouse_id" column_invisible="1" />
152
153
  <field
153
154
  name="allow_virtual_location"
154
- invisible="1"
155
+ column_invisible="1"
156
+ />
157
+ <field name="product_uom_id" column_invisible="1" />
158
+ <field name="location_id" column_invisible="1" />
159
+ <field
160
+ name="procurement_group_id"
161
+ column_invisible="1"
155
162
  />
156
- <field name="warehouse_id" invisible="1" />
157
- <field name="location_id" invisible="1" />
158
- <field name="procurement_group_id" invisible="1" />
159
- <field name="company_id" invisible="1" />
160
- <field name="state" />
163
+ <field name="company_id" column_invisible="1" />
164
+ <field name="state" optional="show" />
161
165
  </tree>
162
166
  </field>
163
167
  </page>
@@ -175,7 +179,7 @@
175
179
  <field name="name">stock.request.order.search</field>
176
180
  <field name="model">stock.request.order</field>
177
181
  <field name="arch" type="xml">
178
- <search string="Stock Requests Order Search">
182
+ <search>
179
183
  <field name="name" string="Stock Request Orders" />
180
184
  <field name="state" />
181
185
  <field name="warehouse_id" />
@@ -10,33 +10,28 @@
10
10
  decoration-muted="state == 'cancel'"
11
11
  decoration-bf="message_needaction==True"
12
12
  >
13
- <field name="message_needaction" invisible="1" />
14
- <field name="allow_virtual_location" invisible="1" />
13
+ <field name="message_needaction" column_invisible="1" />
15
14
  <field name="name" />
16
15
  <field name="warehouse_id" groups="stock.group_stock_multi_locations" />
17
16
  <field name="location_id" groups="stock.group_stock_multi_locations" />
17
+ <field name="allow_virtual_location" column_invisible="1" />
18
18
  <field
19
19
  name="route_id"
20
20
  options="{'no_create': True}"
21
21
  groups="stock.group_stock_multi_locations"
22
22
  />
23
23
  <field name="product_id" />
24
+ <field name="allowed_uom_categ_id" column_invisible="1" />
24
25
  <field
25
26
  name="product_uom_id"
26
27
  options="{'no_open': True, 'no_create': True}"
27
28
  groups="uom.group_uom"
28
29
  />
29
- <field
30
- name="product_uom_id"
31
- readonly="True"
32
- groups="!uom.group_uom"
33
- force_save="1"
34
- />
35
30
  <field name="product_uom_qty" />
36
31
  <field name="qty_in_progress" />
37
- <field name="qty_done" />
38
- <field name="qty_cancelled" />
39
- <field name="state" />
32
+ <field name="qty_done" optional="show" />
33
+ <field name="qty_cancelled" optional="show" />
34
+ <field name="state" optional="show" />
40
35
  </tree>
41
36
  </field>
42
37
  </record>
@@ -44,10 +39,9 @@
44
39
  <field name="name">stock.request.search</field>
45
40
  <field name="model">stock.request</field>
46
41
  <field name="arch" type="xml">
47
- <search string="Stock Requests Search">
42
+ <search>
48
43
  <field name="name" string="Stock Requests" />
49
44
  <field name="warehouse_id" />
50
- <field name="allow_virtual_location" invisible="1" />
51
45
  <field name="location_id" groups="stock.group_stock_multi_locations" />
52
46
  <field name="company_id" groups="base.group_multi_company" />
53
47
  <field name="product_id" />
@@ -109,24 +103,23 @@
109
103
  <field name="name">stock.request.form</field>
110
104
  <field name="model">stock.request</field>
111
105
  <field name="arch" type="xml">
112
- <form string="Stock Requests">
113
- <field name="company_id" invisible="1" />
106
+ <form>
114
107
  <header>
115
108
  <button
116
109
  name="action_confirm"
117
110
  string="Confirm"
118
111
  type="object"
119
- attrs="{'invisible': [('state', 'not in', ['draft'])]}"
112
+ invisible="state != 'draft'"
120
113
  />
121
114
  <button
122
115
  name="action_cancel"
123
- states="draft,open"
116
+ invisible="state not in ['draft','open']"
124
117
  type="object"
125
118
  string="Cancel"
126
119
  />
127
120
  <button
128
121
  name="action_draft"
129
- states="cancel"
122
+ invisible="state not in ['cancel']"
130
123
  type="object"
131
124
  string="Set to Draft"
132
125
  />
@@ -134,23 +127,23 @@
134
127
  name="action_done"
135
128
  string="Done"
136
129
  type="object"
137
- attrs="{'invisible': [('state', 'not in', ['open'])]}"
130
+ invisible="state != 'open'"
138
131
  />
139
132
  <field name="state" widget="statusbar" />
140
133
  </header>
141
134
  <sheet>
142
135
  <div class="oe_button_box" name="button_box">
136
+ <field name="picking_ids" invisible="1" />
143
137
  <button
144
138
  type="object"
145
139
  name="action_view_transfer"
146
140
  class="oe_stat_button"
147
141
  icon="fa-truck"
148
- attrs="{'invisible': [('picking_count', '=', 0)]}"
142
+ invisible="picking_count == 0"
149
143
  groups="stock.group_stock_user"
150
144
  >
151
145
  <field
152
146
  name="picking_count"
153
- groups="stock.group_stock_user"
154
147
  widget="statinfo"
155
148
  string="Transfers"
156
149
  />
@@ -169,63 +162,71 @@
169
162
  readonly="1"
170
163
  groups="stock_request.group_stock_request_order"
171
164
  />
172
- <field name="product_id" />
173
- <field name="expected_date" />
174
- <field name="picking_policy" />
165
+ <field name="product_id" readonly="state != 'draft'" />
166
+ <field name="expected_date" readonly="state != 'draft'" />
167
+ <field name="picking_policy" readonly="state != 'draft'" />
175
168
  </group>
176
169
  <group>
177
- <field name="allow_virtual_location" invisible="1" />
178
170
  <field
179
171
  name="warehouse_id"
180
- widget="selection"
172
+ options="{'no_create': True, 'no_open': True}"
181
173
  groups="stock.group_stock_multi_locations"
174
+ readonly="state != 'draft'"
182
175
  />
176
+ <field name="allow_virtual_location" invisible="1" />
183
177
  <field
184
178
  name="location_id"
185
179
  groups="stock.group_stock_multi_locations"
186
- domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"
180
+ readonly="state != 'draft'"
187
181
  />
188
182
  <field
189
183
  name="route_id"
190
184
  options="{'no_create': True}"
191
185
  groups="stock.group_stock_multi_locations"
186
+ readonly="state != 'draft'"
192
187
  />
193
188
  <field name="route_ids" invisible="1" />
194
189
  <field
195
190
  name="procurement_group_id"
196
191
  groups="stock.group_adv_location"
192
+ readonly="state != 'draft'"
197
193
  />
198
194
  <field
199
195
  name="company_id"
200
196
  groups="base.group_multi_company"
201
197
  options="{'no_create': True}"
198
+ readonly="state != 'draft'"
202
199
  />
200
+ <field name="company_id" invisible="1" />
201
+ <field name="warehouse_id" invisible="1" />
202
+ <field name="location_id" invisible="1" />
203
+ <field name="route_id" invisible="1" />
204
+ <field name="procurement_group_id" invisible="1" />
205
+ <field name="product_uom_id" invisible="1" />
203
206
  </group>
204
207
  <group name="quantities">
205
- <field name="allowed_uom_categ_id" invisible="1" />
206
208
  <label for="product_uom_qty" />
207
209
  <div>
208
- <field name="product_uom_qty" class="oe_inline" />
210
+ <field
211
+ name="product_uom_qty"
212
+ class="oe_inline"
213
+ readonly="state != 'draft'"
214
+ />
215
+ <field name="allowed_uom_categ_id" invisible="1" />
209
216
  <field
210
217
  name="product_uom_id"
211
218
  class="oe_inline"
212
219
  options="{'no_open': True, 'no_create': True}"
213
220
  groups="uom.group_uom"
221
+ readonly="state != 'draft'"
214
222
  />
215
- <field name="product_uom_id" invisible="1" />
216
223
  </div>
217
224
  <field
218
225
  name="qty_in_progress"
219
- attrs="{'invisible': [('state', '=', 'draft')]}"
220
- />
221
- <field
222
- name="qty_done"
223
- attrs="{'invisible': [('state', '=', 'draft')]}"
224
- />
225
- <field
226
- name="qty_cancelled"
227
- attrs="{'invisible': [('state', '=', 'draft')]}"
226
+ invisible="state == 'draft'"
228
227
  />
228
+ <field name="qty_done" invisible="state == 'draft'" />
229
+ <field name="qty_cancelled" invisible="state == 'draft'" />
229
230
  </group>
230
231
  </group>
231
232
  <notebook>