Merge lp:~akretion-team/sale-wkfl/7.0-addmulticpny-sale-except-module-dbl into lp:~sale-core-editors/sale-wkfl/7.0
- 7.0-addmulticpny-sale-except-module-dbl
- Merge into 7.0
Proposed by
David BEAL (ak)
Status: | Needs review |
---|---|
Proposed branch: | lp:~akretion-team/sale-wkfl/7.0-addmulticpny-sale-except-module-dbl |
Merge into: | lp:~sale-core-editors/sale-wkfl/7.0 |
Diff against target: |
448 lines (+185/-122) 5 files modified
sale_exceptions/__openerp__.py (+30/-8) sale_exceptions/i18n/sale_exceptions.pot (+127/-106) sale_exceptions/sale.py (+11/-6) sale_exceptions/sale_view.xml (+3/-2) sale_exceptions/security/rule.xml (+14/-0) |
To merge this branch: | bzr merge lp:~akretion-team/sale-wkfl/7.0-addmulticpny-sale-except-module-dbl |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pedro Manuel Baeza | Needs Resubmitting | ||
Benoit Guillot - http://www.akretion.com (community) | code review, no test | Approve | |
Review via email: mp+223750@code.launchpad.net |
Commit message
Description of the change
add multicompany support to sale_exceptions module
To post a comment you must log in.
Revision history for this message
Benoit Guillot - http://www.akretion.com (benoit-guillot-z) wrote : | # |
review:
Approve
(code review, no test)
- 49. By David BEAL (ak)
-
[FIX] module version
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Please update pot file.
The rest LGTM.
Regards.
review:
Needs Fixing
(code review)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Another thing: please comply with 80 cols PEP8.
Regards.
review:
Needs Fixing
(code review)
- 50. By David BEAL (ak)
-
[FIX] PEP8
- 51. By David BEAL (ak)
-
[FIX] add pot
Revision history for this message
David BEAL (ak) (davidbeal) wrote : | # |
@pedro
fix is done
thanks for approve if ok
Regards
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Thanks for the changes.
Regards.
review:
Approve
(code review)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
This project is now hosted on https:/
review:
Needs Resubmitting
Unmerged revisions
- 51. By David BEAL (ak)
-
[FIX] add pot
- 50. By David BEAL (ak)
-
[FIX] PEP8
- 49. By David BEAL (ak)
-
[FIX] module version
- 48. By David BEAL (ak)
-
[IMP] add multicompany support to sale_exceptions module
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'sale_exceptions/__openerp__.py' | |||
2 | --- sale_exceptions/__openerp__.py 2013-11-15 12:19:07 +0000 | |||
3 | +++ sale_exceptions/__openerp__.py 2014-06-19 21:07:47 +0000 | |||
4 | @@ -21,26 +21,48 @@ | |||
5 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
6 | 22 | # | 22 | # |
7 | 23 | ############################################################################## | 23 | ############################################################################## |
8 | 24 | |||
9 | 24 | {'name': 'Sale Exceptions', | 25 | {'name': 'Sale Exceptions', |
11 | 25 | 'version': '0.1', | 26 | 'version': '1.0', |
12 | 26 | 'category': 'Generic Modules/Sale', | 27 | 'category': 'Generic Modules/Sale', |
13 | 27 | 'description': """ | 28 | 'description': """ |
14 | 29 | |||
15 | 30 | DESCRIPTION | ||
16 | 31 | ============ | ||
17 | 28 | This module allows you attach several customizable exceptions to your sale order | 32 | This module allows you attach several customizable exceptions to your sale order |
18 | 29 | in a way that you can filter orders by exceptions type and fix them. | 33 | in a way that you can filter orders by exceptions type and fix them. |
19 | 30 | 34 | ||
20 | 31 | This is especially useful in an order importation scenario such as with | 35 | This is especially useful in an order importation scenario such as with |
21 | 32 | the base_sale_multi_channels module, because it's likely a few orders have errors | 36 | the base_sale_multi_channels module, because it's likely a few orders have errors |
22 | 33 | when you import them (like product not found in OpenERP, wrong line format etc...) | 37 | when you import them (like product not found in OpenERP, wrong line format etc...) |
23 | 38 | |||
24 | 39 | |||
25 | 40 | AUTHORS | ||
26 | 41 | ======== | ||
27 | 42 | |||
28 | 43 | Akretion | ||
29 | 44 | ---------- | ||
30 | 45 | - Raphaël Valyi | ||
31 | 46 | - Renato Lima | ||
32 | 47 | - Sébastien BEAU <sebastien.beau@akretion.com> | ||
33 | 48 | |||
34 | 49 | Camptocamp | ||
35 | 50 | ----------- | ||
36 | 51 | - Guewen Baconnier | ||
37 | 52 | |||
38 | 34 | """, | 53 | """, |
39 | 35 | 'author': 'Akretion', | 54 | 'author': 'Akretion', |
40 | 36 | 'website': 'http://www.akretion.com', | 55 | 'website': 'http://www.akretion.com', |
41 | 37 | 'depends': ['sale'], | 56 | 'depends': ['sale'], |
49 | 38 | 'init_xml': ['settings/sale.exception.csv'], | 57 | 'data': [ |
50 | 39 | 'update_xml': ['sale_workflow.xml', | 58 | 'settings/sale.exception.csv', |
51 | 40 | 'sale_view.xml', | 59 | 'sale_workflow.xml', |
52 | 41 | 'sale_exceptions_data.xml', | 60 | 'sale_view.xml', |
53 | 42 | 'wizard/sale_exception_confirm_view.xml', | 61 | 'sale_exceptions_data.xml', |
54 | 43 | 'security/ir.model.access.csv'], | 62 | 'wizard/sale_exception_confirm_view.xml', |
55 | 44 | 'demo_xml': [], | 63 | 'security/ir.model.access.csv', |
56 | 64 | 'security/rule.xml', | ||
57 | 65 | ], | ||
58 | 66 | 'demo': [], | ||
59 | 45 | 'installable': True, | 67 | 'installable': True, |
60 | 46 | } | 68 | } |
61 | 47 | 69 | ||
62 | === modified file 'sale_exceptions/i18n/sale_exceptions.pot' | |||
63 | --- sale_exceptions/i18n/sale_exceptions.pot 2013-11-15 12:55:29 +0000 | |||
64 | +++ sale_exceptions/i18n/sale_exceptions.pot 2014-06-19 21:07:47 +0000 | |||
65 | @@ -6,8 +6,8 @@ | |||
66 | 6 | msgstr "" | 6 | msgstr "" |
67 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | 7 | "Project-Id-Version: OpenERP Server 7.0\n" |
68 | 8 | "Report-Msgid-Bugs-To: \n" | 8 | "Report-Msgid-Bugs-To: \n" |
71 | 9 | "POT-Creation-Date: 2013-05-02 06:57+0000\n" | 9 | "POT-Creation-Date: 2014-06-19 21:05+0000\n" |
72 | 10 | "PO-Revision-Date: 2013-05-02 06:57+0000\n" | 10 | "PO-Revision-Date: 2014-06-19 21:05+0000\n" |
73 | 11 | "Last-Translator: <>\n" | 11 | "Last-Translator: <>\n" |
74 | 12 | "Language-Team: \n" | 12 | "Language-Team: \n" |
75 | 13 | "MIME-Version: 1.0\n" | 13 | "MIME-Version: 1.0\n" |
76 | @@ -16,13 +16,13 @@ | |||
77 | 16 | "Plural-Forms: \n" | 16 | "Plural-Forms: \n" |
78 | 17 | 17 | ||
79 | 18 | #. module: sale_exceptions | 18 | #. module: sale_exceptions |
82 | 19 | #: model:ir.model,name:sale_exceptions.model_sale_exception_confirm | 19 | #: field:sale.exception,active:0 |
83 | 20 | msgid "sale.exception.confirm" | 20 | msgid "Active" |
84 | 21 | msgstr "" | 21 | msgstr "" |
85 | 22 | 22 | ||
86 | 23 | #. module: sale_exceptions | 23 | #. module: sale_exceptions |
89 | 24 | #: selection:sale.exception,model:0 | 24 | #: view:sale.exception:0 |
90 | 25 | msgid "Sale Order Line" | 25 | msgid "Affected Sales Orders" |
91 | 26 | msgstr "" | 26 | msgstr "" |
92 | 27 | 27 | ||
93 | 28 | #. module: sale_exceptions | 28 | #. module: sale_exceptions |
94 | @@ -31,8 +31,21 @@ | |||
95 | 31 | msgstr "" | 31 | msgstr "" |
96 | 32 | 32 | ||
97 | 33 | #. module: sale_exceptions | 33 | #. module: sale_exceptions |
100 | 34 | #: model:sale.exception,name:sale_exceptions.excep_no_stock | 34 | #: view:sale.order:0 |
101 | 35 | msgid "Not Enough Virtual Stock" | 35 | msgid "Blocked in draft" |
102 | 36 | msgstr "" | ||
103 | 37 | |||
104 | 38 | #. module: sale_exceptions | ||
105 | 39 | #: code:addons/sale_exceptions/sale.py:123 | ||
106 | 40 | #: model:ir.actions.act_window,name:sale_exceptions.action_sale_exception_confirm | ||
107 | 41 | #: view:sale.exception.confirm:0 | ||
108 | 42 | #, python-format | ||
109 | 43 | msgid "Blocked in draft due to exceptions" | ||
110 | 44 | msgstr "" | ||
111 | 45 | |||
112 | 46 | #. module: sale_exceptions | ||
113 | 47 | #: field:sale.exception,company_id:0 | ||
114 | 48 | msgid "Company" | ||
115 | 36 | msgstr "" | 49 | msgstr "" |
116 | 37 | 50 | ||
117 | 38 | #. module: sale_exceptions | 51 | #. module: sale_exceptions |
118 | @@ -41,34 +54,79 @@ | |||
119 | 41 | msgstr "" | 54 | msgstr "" |
120 | 42 | 55 | ||
121 | 43 | #. module: sale_exceptions | 56 | #. module: sale_exceptions |
122 | 57 | #: code:addons/sale_exceptions/sale.py:211 | ||
123 | 58 | #, python-format | ||
124 | 59 | msgid "Error" | ||
125 | 60 | msgstr "" | ||
126 | 61 | |||
127 | 62 | #. module: sale_exceptions | ||
128 | 63 | #: code:addons/sale_exceptions/sale.py:212 | ||
129 | 64 | #, python-format | ||
130 | 65 | msgid "Error when evaluating the sale exception rule:\n" | ||
131 | 66 | " %s \n" | ||
132 | 67 | "(%s)" | ||
133 | 68 | msgstr "" | ||
134 | 69 | |||
135 | 70 | #. module: sale_exceptions | ||
136 | 71 | #: view:sale.order:0 | ||
137 | 72 | msgid "Error:" | ||
138 | 73 | msgstr "" | ||
139 | 74 | |||
140 | 75 | #. module: sale_exceptions | ||
141 | 76 | #: view:sale.order:0 | ||
142 | 77 | msgid "Exception" | ||
143 | 78 | msgstr "" | ||
144 | 79 | |||
145 | 80 | #. module: sale_exceptions | ||
146 | 81 | #: field:sale.exception,name:0 | ||
147 | 82 | msgid "Exception Name" | ||
148 | 83 | msgstr "" | ||
149 | 84 | |||
150 | 85 | #. module: sale_exceptions | ||
151 | 86 | #: model:ir.actions.act_window,name:sale_exceptions.action_sale_test_tree | ||
152 | 87 | #: model:ir.ui.menu,name:sale_exceptions.menu_sale_test | ||
153 | 88 | msgid "Exception Rules" | ||
154 | 89 | msgstr "" | ||
155 | 90 | |||
156 | 91 | #. module: sale_exceptions | ||
157 | 92 | #: field:sale.order,exceptions_ids:0 | ||
158 | 93 | msgid "Exceptions" | ||
159 | 94 | msgstr "" | ||
160 | 95 | |||
161 | 96 | #. module: sale_exceptions | ||
162 | 97 | #: field:sale.exception.confirm,exception_ids:0 | ||
163 | 98 | msgid "Exceptions to resolve" | ||
164 | 99 | msgstr "" | ||
165 | 100 | |||
166 | 101 | #. module: sale_exceptions | ||
167 | 44 | #: help:sale.exception,sequence:0 | 102 | #: help:sale.exception,sequence:0 |
168 | 45 | msgid "Gives the sequence order when applying the test" | 103 | msgid "Gives the sequence order when applying the test" |
169 | 46 | msgstr "" | 104 | msgstr "" |
170 | 47 | 105 | ||
171 | 48 | #. module: sale_exceptions | 106 | #. module: sale_exceptions |
195 | 49 | #: view:sale.exception.confirm:0 | 107 | #: field:sale.exception.confirm,ignore:0 |
196 | 50 | msgid "Sale Exceptions On Sale Order" | 108 | #: field:sale.order,ignore_exceptions:0 |
197 | 51 | msgstr "" | 109 | msgid "Ignore Exceptions" |
198 | 52 | 110 | msgstr "" | |
199 | 53 | #. module: sale_exceptions | 111 | |
200 | 54 | #: field:sale.exception.confirm,exception_ids:0 | 112 | #. module: sale_exceptions |
201 | 55 | msgid "Exceptions to resolve" | 113 | #: field:sale.order,main_exception_id:0 |
202 | 56 | msgstr "" | 114 | msgid "Main Exception" |
203 | 57 | 115 | msgstr "" | |
204 | 58 | #. module: sale_exceptions | 116 | |
205 | 59 | #: view:sale.exception.confirm:0 | 117 | #. module: sale_exceptions |
206 | 60 | msgid "_Ok" | 118 | #: model:sale.exception,name:sale_exceptions.excep_no_zip |
207 | 61 | msgstr "" | 119 | msgid "No ZIP code on destination" |
208 | 62 | 120 | msgstr "" | |
209 | 63 | #. module: sale_exceptions | 121 | |
210 | 64 | #: view:sale.exception:0 | 122 | #. module: sale_exceptions |
211 | 65 | #: view:sale.exception.confirm:0 | 123 | #: model:sale.exception,name:sale_exceptions.excep_no_stock |
212 | 66 | msgid "Sale Exception" | 124 | msgid "Not Enough Virtual Stock" |
213 | 67 | msgstr "" | 125 | msgstr "" |
214 | 68 | 126 | ||
215 | 69 | #. module: sale_exceptions | 127 | #. module: sale_exceptions |
216 | 70 | #: view:sale.order:0 | 128 | #: field:sale.exception,code:0 |
217 | 71 | msgid "TO FIX" | 129 | msgid "Python Code" |
218 | 72 | msgstr "" | 130 | msgstr "" |
219 | 73 | 131 | ||
220 | 74 | #. module: sale_exceptions | 132 | #. module: sale_exceptions |
221 | @@ -77,55 +135,47 @@ | |||
222 | 77 | msgstr "" | 135 | msgstr "" |
223 | 78 | 136 | ||
224 | 79 | #. module: sale_exceptions | 137 | #. module: sale_exceptions |
225 | 80 | #: view:sale.order:0 | ||
226 | 81 | msgid "Exception" | ||
227 | 82 | msgstr "" | ||
228 | 83 | |||
229 | 84 | #. module: sale_exceptions | ||
230 | 85 | #: view:sale.order:0 | ||
231 | 86 | msgid "Error:" | ||
232 | 87 | msgstr "" | ||
233 | 88 | |||
234 | 89 | #. module: sale_exceptions | ||
235 | 90 | #: selection:sale.exception,model:0 | ||
236 | 91 | msgid "Sale Order" | ||
237 | 92 | msgstr "" | ||
238 | 93 | |||
239 | 94 | #. module: sale_exceptions | ||
240 | 95 | #: field:sale.exception.confirm,sale_id:0 | 138 | #: field:sale.exception.confirm,sale_id:0 |
241 | 96 | msgid "Sale" | 139 | msgid "Sale" |
242 | 97 | msgstr "" | 140 | msgstr "" |
243 | 98 | 141 | ||
244 | 99 | #. module: sale_exceptions | 142 | #. module: sale_exceptions |
261 | 100 | #: field:sale.exception,active:0 | 143 | #: view:sale.exception:0 |
262 | 101 | msgid "Active" | 144 | msgid "Sale Exception" |
263 | 102 | msgstr "" | 145 | msgstr "" |
264 | 103 | 146 | ||
265 | 104 | #. module: sale_exceptions | 147 | #. module: sale_exceptions |
266 | 105 | #: field:sale.exception,name:0 | 148 | #: view:sale.exception:0 |
267 | 106 | msgid "Exception Name" | 149 | msgid "Sale Exception Setup" |
268 | 107 | msgstr "" | 150 | msgstr "" |
269 | 108 | 151 | ||
270 | 109 | #. module: sale_exceptions | 152 | #. module: sale_exceptions |
271 | 110 | #: field:sale.order,exceptions_ids:0 | 153 | #: code:_description:0 |
256 | 111 | msgid "Exceptions" | ||
257 | 112 | msgstr "" | ||
258 | 113 | |||
259 | 114 | #. module: sale_exceptions | ||
260 | 115 | #: model:ir.actions.act_window,name:sale_exceptions.action_sale_exception_confirm | ||
272 | 116 | #: model:ir.model,name:sale_exceptions.model_sale_exception | 154 | #: model:ir.model,name:sale_exceptions.model_sale_exception |
273 | 117 | #: view:sale.exception.confirm:0 | 155 | #: view:sale.exception.confirm:0 |
274 | 156 | #, python-format | ||
275 | 118 | msgid "Sale Exceptions" | 157 | msgid "Sale Exceptions" |
276 | 119 | msgstr "" | 158 | msgstr "" |
277 | 120 | 159 | ||
278 | 121 | #. module: sale_exceptions | 160 | #. module: sale_exceptions |
285 | 122 | #: model:ir.actions.act_window,name:sale_exceptions.action_sale_test_tree | 161 | #: selection:sale.exception,model:0 |
286 | 123 | #: model:ir.ui.menu,name:sale_exceptions.menu_sale_test | 162 | msgid "Sale Order" |
287 | 124 | msgid "Exception Rules" | 163 | msgstr "" |
288 | 125 | msgstr "" | 164 | |
289 | 126 | 165 | #. module: sale_exceptions | |
290 | 127 | #. module: sale_exceptions | 166 | #: selection:sale.exception,model:0 |
291 | 167 | msgid "Sale Order Line" | ||
292 | 168 | msgstr "" | ||
293 | 169 | |||
294 | 170 | #. module: sale_exceptions | ||
295 | 171 | #: field:sale.exception,sale_order_ids:0 | ||
296 | 172 | msgid "Sale Orders" | ||
297 | 173 | msgstr "" | ||
298 | 174 | |||
299 | 175 | #. module: sale_exceptions | ||
300 | 176 | #: code:_description:0 | ||
301 | 128 | #: model:ir.model,name:sale_exceptions.model_sale_order | 177 | #: model:ir.model,name:sale_exceptions.model_sale_order |
302 | 178 | #, python-format | ||
303 | 129 | msgid "Sales Order" | 179 | msgid "Sales Order" |
304 | 130 | msgstr "" | 180 | msgstr "" |
305 | 131 | 181 | ||
306 | @@ -135,43 +185,14 @@ | |||
307 | 135 | msgstr "" | 185 | msgstr "" |
308 | 136 | 186 | ||
309 | 137 | #. module: sale_exceptions | 187 | #. module: sale_exceptions |
348 | 138 | #: field:sale.exception,code:0 | 188 | #: view:sale.exception.confirm:0 |
349 | 139 | msgid "Python Code" | 189 | msgid "_Close" |
350 | 140 | msgstr "" | 190 | msgstr "" |
351 | 141 | 191 | ||
352 | 142 | #. module: sale_exceptions | 192 | #. module: sale_exceptions |
353 | 143 | #: view:sale.order:0 | 193 | #: code:_description:0 |
354 | 144 | msgid "Sales" | 194 | #: model:ir.model,name:sale_exceptions.model_sale_exception_confirm |
355 | 145 | msgstr "" | 195 | #, python-format |
356 | 146 | 196 | msgid "sale.exception.confirm" | |
319 | 147 | #. module: sale_exceptions | ||
320 | 148 | #: model:sale.exception,name:sale_exceptions.excep_no_zip | ||
321 | 149 | msgid "No ZIP code on destination" | ||
322 | 150 | msgstr "" | ||
323 | 151 | |||
324 | 152 | #. module: sale_exceptions | ||
325 | 153 | #: view:sale.exception:0 | ||
326 | 154 | msgid "Sale Exception Setup" | ||
327 | 155 | msgstr "" | ||
328 | 156 | |||
329 | 157 | #. module: sale_exceptions | ||
330 | 158 | #: view:sale.exception:0 | ||
331 | 159 | msgid "Affected Sales Orders" | ||
332 | 160 | msgstr "" | ||
333 | 161 | |||
334 | 162 | #. module: sale_exceptions | ||
335 | 163 | #: field:sale.exception,sale_order_ids:0 | ||
336 | 164 | msgid "Sale Orders" | ||
337 | 165 | msgstr "" | ||
338 | 166 | |||
339 | 167 | #. module: sale_exceptions | ||
340 | 168 | #: field:sale.exception.confirm,ignore:0 | ||
341 | 169 | #: field:sale.order,ignore_exceptions:0 | ||
342 | 170 | msgid "Ignore Exceptions" | ||
343 | 171 | msgstr "" | ||
344 | 172 | |||
345 | 173 | #. module: sale_exceptions | ||
346 | 174 | #: field:sale.order,main_exception_id:0 | ||
347 | 175 | msgid "Main Exception" | ||
357 | 176 | msgstr "" | 197 | msgstr "" |
358 | 177 | 198 | ||
359 | 178 | 199 | ||
360 | === modified file 'sale_exceptions/sale.py' | |||
361 | --- sale_exceptions/sale.py 2013-11-15 12:55:29 +0000 | |||
362 | +++ sale_exceptions/sale.py 2014-06-19 21:07:47 +0000 | |||
363 | @@ -28,12 +28,13 @@ | |||
364 | 28 | from openerp.tools.translate import _ | 28 | from openerp.tools.translate import _ |
365 | 29 | 29 | ||
366 | 30 | 30 | ||
368 | 31 | class sale_exception(orm.Model): | 31 | class SaleException(orm.Model): |
369 | 32 | _name = "sale.exception" | 32 | _name = "sale.exception" |
370 | 33 | _description = "Sale Exceptions" | 33 | _description = "Sale Exceptions" |
371 | 34 | _order = "active desc, sequence asc" | 34 | _order = "active desc, sequence asc" |
372 | 35 | _columns = { | 35 | _columns = { |
373 | 36 | 'name': fields.char('Exception Name', required=True, translate=True), | 36 | 'name': fields.char('Exception Name', required=True, translate=True), |
374 | 37 | 'company_id': fields.many2one('res.company', 'Company'), | ||
375 | 37 | 'description': fields.text('Description', translate=True), | 38 | 'description': fields.text('Description', translate=True), |
376 | 38 | 'sequence': fields.integer( | 39 | 'sequence': fields.integer( |
377 | 39 | 'Sequence', | 40 | 'Sequence', |
378 | @@ -64,11 +65,14 @@ | |||
379 | 64 | # - cr: database cursor | 65 | # - cr: database cursor |
380 | 65 | # - uid: current user id | 66 | # - uid: current user id |
381 | 66 | # - context: current context | 67 | # - context: current context |
383 | 67 | """ | 68 | """, |
384 | 69 | 'company_id': lambda s, cr, uid, c: | ||
385 | 70 | s.pool['res.company']._company_default_get( | ||
386 | 71 | cr, uid, 'sale.exception', context=c), | ||
387 | 68 | } | 72 | } |
388 | 69 | 73 | ||
389 | 70 | 74 | ||
391 | 71 | class sale_order(orm.Model): | 75 | class SaleOrder(orm.Model): |
392 | 72 | _inherit = "sale.order" | 76 | _inherit = "sale.order" |
393 | 73 | 77 | ||
394 | 74 | _order = 'main_exception_id asc, date_order desc, name desc' | 78 | _order = 'main_exception_id asc, date_order desc, name desc' |
395 | @@ -133,8 +137,8 @@ | |||
396 | 133 | if exception_ids: | 137 | if exception_ids: |
397 | 134 | return self._popup_exceptions(cr, uid, ids[0], context=context) | 138 | return self._popup_exceptions(cr, uid, ids[0], context=context) |
398 | 135 | else: | 139 | else: |
401 | 136 | return super(sale_order, self).action_button_confirm(cr, uid, ids, | 140 | return super(SaleOrder, self).action_button_confirm(cr, uid, ids, |
402 | 137 | context=context) | 141 | context=context) |
403 | 138 | 142 | ||
404 | 139 | def test_exceptions(self, cr, uid, ids, context=None): | 143 | def test_exceptions(self, cr, uid, ids, context=None): |
405 | 140 | """ | 144 | """ |
406 | @@ -233,4 +237,5 @@ | |||
407 | 233 | default.update({ | 237 | default.update({ |
408 | 234 | 'ignore_exceptions': False, | 238 | 'ignore_exceptions': False, |
409 | 235 | }) | 239 | }) |
411 | 236 | return super(sale_order, self).copy(cr, uid, id, default=default, context=context) | 240 | return super(SaleOrder, self).copy( |
412 | 241 | cr, uid, id, default=default, context=context) | ||
413 | 237 | 242 | ||
414 | === modified file 'sale_exceptions/sale_view.xml' | |||
415 | --- sale_exceptions/sale_view.xml 2013-11-15 12:55:29 +0000 | |||
416 | +++ sale_exceptions/sale_view.xml 2014-06-19 21:07:47 +0000 | |||
417 | @@ -28,9 +28,10 @@ | |||
418 | 28 | <group col="4" colspan="4" groups="base.group_sale_manager"> | 28 | <group col="4" colspan="4" groups="base.group_sale_manager"> |
419 | 29 | <field name="active"/> | 29 | <field name="active"/> |
420 | 30 | <field name="sequence"/> | 30 | <field name="sequence"/> |
422 | 31 | <group colspan="4" col="2" groups="base.group_system"> | 31 | <group colspan="4" col="4" groups="base.group_system"> |
423 | 32 | <field name="model"/> | 32 | <field name="model"/> |
425 | 33 | <field name="code"/> | 33 | <field name="company_id" groups="base.group_multi_company"/> |
426 | 34 | <field name="code" colspan="4"/> | ||
427 | 34 | </group> | 35 | </group> |
428 | 35 | </group> | 36 | </group> |
429 | 36 | <group colspan="4" col="2"> | 37 | <group colspan="4" col="2"> |
430 | 37 | 38 | ||
431 | === added file 'sale_exceptions/security/rule.xml' | |||
432 | --- sale_exceptions/security/rule.xml 1970-01-01 00:00:00 +0000 | |||
433 | +++ sale_exceptions/security/rule.xml 2014-06-19 21:07:47 +0000 | |||
434 | @@ -0,0 +1,14 @@ | |||
435 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
436 | 2 | <openerp> | ||
437 | 3 | <data noupdate="1"> | ||
438 | 4 | |||
439 | 5 | <record id="sale_exception_comp_rule" model="ir.rule"> | ||
440 | 6 | <field name="name">Sale exception multi-company</field> | ||
441 | 7 | <field name="model_id" ref="model_sale_exception"/> | ||
442 | 8 | <field name="global" eval="True"/> | ||
443 | 9 | <field name="domain_force"> | ||
444 | 10 | ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> | ||
445 | 11 | </record> | ||
446 | 12 | |||
447 | 13 | </data> | ||
448 | 14 | </openerp> |
LGTM