Merge lp:~sandi-dirntis/openerpsl/openerpsl_20140121_1 into lp:openerpsl/7.0
- openerpsl_20140121_1
- Merge into 7.0
Proposed by
Aleksander Dirntiš
Status: | Merged |
---|---|
Merged at revision: | 288 |
Proposed branch: | lp:~sandi-dirntis/openerpsl/openerpsl_20140121_1 |
Merge into: | lp:openerpsl/7.0 |
Diff against target: |
949 lines (+304/-185) 8 files modified
sale_order_extensions/i18n/en_US.po (+56/-18) sale_order_extensions/i18n/sale_order_extensions.pot (+56/-18) sale_order_extensions/i18n/sl.po (+58/-20) sale_order_extensions/sale_order.py (+48/-36) stock_return_on_delivery/i18n/en_US.po (+26/-24) stock_return_on_delivery/i18n/sl.po (+29/-36) stock_return_on_delivery/i18n/stock_return_on_delivery.pot (+26/-28) stock_return_on_delivery/stock_partial_return.py (+5/-5) |
To merge this branch: | bzr merge lp:~sandi-dirntis/openerpsl/openerpsl_20140121_1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mentis | Pending | ||
Review via email: mp+202511@code.launchpad.net |
Commit message
Description of the change
[MOD] Modified behavior on two modules
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'sale_order_extensions/i18n/en_US.po' |
2 | --- sale_order_extensions/i18n/en_US.po 2014-01-12 20:54:03 +0000 |
3 | +++ sale_order_extensions/i18n/en_US.po 2014-01-21 17:01:24 +0000 |
4 | @@ -6,8 +6,8 @@ |
5 | msgstr "" |
6 | "Project-Id-Version: OpenERP Server 7.0\n" |
7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2013-12-25 14:04+0000\n" |
9 | -"PO-Revision-Date: 2013-12-25 14:04+0000\n" |
10 | +"POT-Creation-Date: 2014-01-21 16:41+0000\n" |
11 | +"PO-Revision-Date: 2014-01-21 16:41+0000\n" |
12 | "Last-Translator: <>\n" |
13 | "Language-Team: \n" |
14 | "MIME-Version: 1.0\n" |
15 | @@ -21,15 +21,14 @@ |
16 | msgstr "" |
17 | |
18 | #. module: sale_order_extensions |
19 | -#: model:ir.actions.act_window,name:sale_order_extensions.action_production_quotations |
20 | -#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_production_quotations |
21 | -msgid "Quotations - Production" |
22 | +#: code:addons/sale_order_extensions/sale_order.py:141 |
23 | +#, python-format |
24 | +msgid "Type \"service\" not set on next return products:" |
25 | msgstr "" |
26 | |
27 | #. module: sale_order_extensions |
28 | -#: model:ir.actions.act_window,name:sale_order_extensions.action_surplus_quotations |
29 | -#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_surplus_quotations |
30 | -msgid "Quotations - Surplus" |
31 | +#: model:ir.model,name:sale_order_extensions.model_product_product |
32 | +msgid "Product" |
33 | msgstr "" |
34 | |
35 | #. module: sale_order_extensions |
36 | @@ -53,6 +52,24 @@ |
37 | msgstr "" |
38 | |
39 | #. module: sale_order_extensions |
40 | +#: code:addons/sale_order_extensions/sale_order.py:133 |
41 | +#, python-format |
42 | +msgid "Tax not set for next products:" |
43 | +msgstr "" |
44 | + |
45 | +#. module: sale_order_extensions |
46 | +#: model:ir.actions.act_window,name:sale_order_extensions.action_surplus_quotations |
47 | +#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_surplus_quotations |
48 | +msgid "Quotations - Surplus" |
49 | +msgstr "" |
50 | + |
51 | +#. module: sale_order_extensions |
52 | +#: model:ir.actions.act_window,name:sale_order_extensions.action_production_quotations |
53 | +#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_production_quotations |
54 | +msgid "Quotations - Production" |
55 | +msgstr "" |
56 | + |
57 | +#. module: sale_order_extensions |
58 | #: view:sale.order:0 |
59 | msgid "Sales Order that haven't yet been confirmed" |
60 | msgstr "" |
61 | @@ -63,6 +80,15 @@ |
62 | msgstr "" |
63 | |
64 | #. module: sale_order_extensions |
65 | +#: code:addons/sale_order_extensions/sale_order.py:120 |
66 | +#: code:addons/sale_order_extensions/sale_order.py:128 |
67 | +#: code:addons/sale_order_extensions/sale_order.py:136 |
68 | +#: code:addons/sale_order_extensions/sale_order.py:144 |
69 | +#, python-format |
70 | +msgid "Error!" |
71 | +msgstr "" |
72 | + |
73 | +#. module: sale_order_extensions |
74 | #: model:ir.actions.act_window,help:sale_order_extensions.action_production_quotations |
75 | #: model:ir.actions.act_window,help:sale_order_extensions.action_surplus_quotations |
76 | msgid "<p class=\"oe_view_nocontent_create\">\n" |
77 | @@ -80,26 +106,38 @@ |
78 | msgstr "" |
79 | |
80 | #. module: sale_order_extensions |
81 | -#: view:sale.order:0 |
82 | -msgid "Set to Draft" |
83 | -msgstr "" |
84 | - |
85 | -#. module: sale_order_extensions |
86 | #: model:ir.model,name:sale_order_extensions.model_sale_shop |
87 | msgid "Sales Shop" |
88 | msgstr "" |
89 | |
90 | #. module: sale_order_extensions |
91 | #: view:sale.order:0 |
92 | +msgid "Set to Draft" |
93 | +msgstr "" |
94 | + |
95 | +#. module: sale_order_extensions |
96 | +#: code:addons/sale_order_extensions/sale_order.py:117 |
97 | +#, python-format |
98 | +msgid "Price not set for next products:" |
99 | +msgstr "" |
100 | + |
101 | +#. module: sale_order_extensions |
102 | +#: view:sale.order:0 |
103 | +msgid "context.get('shop_production', False)" |
104 | +msgstr "" |
105 | + |
106 | +#. module: sale_order_extensions |
107 | +#: view:sale.order:0 |
108 | msgid "Quotations" |
109 | msgstr "" |
110 | |
111 | #. module: sale_order_extensions |
112 | +#: code:addons/sale_order_extensions/sale_order.py:125 |
113 | +#, python-format |
114 | +msgid "Quantity not set for next products:" |
115 | +msgstr "" |
116 | + |
117 | +#. module: sale_order_extensions |
118 | #: model:ir.model,name:sale_order_extensions.model_sale_order_line |
119 | msgid "Sales Order Line" |
120 | msgstr "" |
121 | - |
122 | -#. module: sale_order_extensions |
123 | -#: field:sale.order.line,product_qty_returned:0 |
124 | -msgid "Quantity Returned" |
125 | -msgstr "" |
126 | |
127 | === modified file 'sale_order_extensions/i18n/sale_order_extensions.pot' |
128 | --- sale_order_extensions/i18n/sale_order_extensions.pot 2014-01-12 20:54:03 +0000 |
129 | +++ sale_order_extensions/i18n/sale_order_extensions.pot 2014-01-21 17:01:24 +0000 |
130 | @@ -6,8 +6,8 @@ |
131 | msgstr "" |
132 | "Project-Id-Version: OpenERP Server 7.0\n" |
133 | "Report-Msgid-Bugs-To: \n" |
134 | -"POT-Creation-Date: 2013-12-25 14:04+0000\n" |
135 | -"PO-Revision-Date: 2013-12-25 14:04+0000\n" |
136 | +"POT-Creation-Date: 2014-01-21 16:41+0000\n" |
137 | +"PO-Revision-Date: 2014-01-21 16:41+0000\n" |
138 | "Last-Translator: <>\n" |
139 | "Language-Team: \n" |
140 | "MIME-Version: 1.0\n" |
141 | @@ -21,15 +21,14 @@ |
142 | msgstr "" |
143 | |
144 | #. module: sale_order_extensions |
145 | -#: model:ir.actions.act_window,name:sale_order_extensions.action_production_quotations |
146 | -#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_production_quotations |
147 | -msgid "Quotations - Production" |
148 | +#: code:addons/sale_order_extensions/sale_order.py:141 |
149 | +#, python-format |
150 | +msgid "Type \"service\" not set on next return products:" |
151 | msgstr "" |
152 | |
153 | #. module: sale_order_extensions |
154 | -#: model:ir.actions.act_window,name:sale_order_extensions.action_surplus_quotations |
155 | -#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_surplus_quotations |
156 | -msgid "Quotations - Surplus" |
157 | +#: model:ir.model,name:sale_order_extensions.model_product_product |
158 | +msgid "Product" |
159 | msgstr "" |
160 | |
161 | #. module: sale_order_extensions |
162 | @@ -53,6 +52,24 @@ |
163 | msgstr "" |
164 | |
165 | #. module: sale_order_extensions |
166 | +#: code:addons/sale_order_extensions/sale_order.py:133 |
167 | +#, python-format |
168 | +msgid "Tax not set for next products:" |
169 | +msgstr "" |
170 | + |
171 | +#. module: sale_order_extensions |
172 | +#: model:ir.actions.act_window,name:sale_order_extensions.action_surplus_quotations |
173 | +#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_surplus_quotations |
174 | +msgid "Quotations - Surplus" |
175 | +msgstr "" |
176 | + |
177 | +#. module: sale_order_extensions |
178 | +#: model:ir.actions.act_window,name:sale_order_extensions.action_production_quotations |
179 | +#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_production_quotations |
180 | +msgid "Quotations - Production" |
181 | +msgstr "" |
182 | + |
183 | +#. module: sale_order_extensions |
184 | #: view:sale.order:0 |
185 | msgid "Sales Order that haven't yet been confirmed" |
186 | msgstr "" |
187 | @@ -63,6 +80,15 @@ |
188 | msgstr "" |
189 | |
190 | #. module: sale_order_extensions |
191 | +#: code:addons/sale_order_extensions/sale_order.py:120 |
192 | +#: code:addons/sale_order_extensions/sale_order.py:128 |
193 | +#: code:addons/sale_order_extensions/sale_order.py:136 |
194 | +#: code:addons/sale_order_extensions/sale_order.py:144 |
195 | +#, python-format |
196 | +msgid "Error!" |
197 | +msgstr "" |
198 | + |
199 | +#. module: sale_order_extensions |
200 | #: model:ir.actions.act_window,help:sale_order_extensions.action_production_quotations |
201 | #: model:ir.actions.act_window,help:sale_order_extensions.action_surplus_quotations |
202 | msgid "<p class=\"oe_view_nocontent_create\">\n" |
203 | @@ -80,26 +106,38 @@ |
204 | msgstr "" |
205 | |
206 | #. module: sale_order_extensions |
207 | -#: view:sale.order:0 |
208 | -msgid "Set to Draft" |
209 | -msgstr "" |
210 | - |
211 | -#. module: sale_order_extensions |
212 | #: model:ir.model,name:sale_order_extensions.model_sale_shop |
213 | msgid "Sales Shop" |
214 | msgstr "" |
215 | |
216 | #. module: sale_order_extensions |
217 | #: view:sale.order:0 |
218 | +msgid "Set to Draft" |
219 | +msgstr "" |
220 | + |
221 | +#. module: sale_order_extensions |
222 | +#: code:addons/sale_order_extensions/sale_order.py:117 |
223 | +#, python-format |
224 | +msgid "Price not set for next products:" |
225 | +msgstr "" |
226 | + |
227 | +#. module: sale_order_extensions |
228 | +#: view:sale.order:0 |
229 | +msgid "context.get('shop_production', False)" |
230 | +msgstr "" |
231 | + |
232 | +#. module: sale_order_extensions |
233 | +#: view:sale.order:0 |
234 | msgid "Quotations" |
235 | msgstr "" |
236 | |
237 | #. module: sale_order_extensions |
238 | +#: code:addons/sale_order_extensions/sale_order.py:125 |
239 | +#, python-format |
240 | +msgid "Quantity not set for next products:" |
241 | +msgstr "" |
242 | + |
243 | +#. module: sale_order_extensions |
244 | #: model:ir.model,name:sale_order_extensions.model_sale_order_line |
245 | msgid "Sales Order Line" |
246 | msgstr "" |
247 | - |
248 | -#. module: sale_order_extensions |
249 | -#: field:sale.order.line,product_qty_returned:0 |
250 | -msgid "Quantity Returned" |
251 | -msgstr "" |
252 | |
253 | === modified file 'sale_order_extensions/i18n/sl.po' |
254 | --- sale_order_extensions/i18n/sl.po 2014-01-12 20:54:03 +0000 |
255 | +++ sale_order_extensions/i18n/sl.po 2014-01-21 17:01:24 +0000 |
256 | @@ -6,8 +6,8 @@ |
257 | msgstr "" |
258 | "Project-Id-Version: OpenERP Server 7.0\n" |
259 | "Report-Msgid-Bugs-To: \n" |
260 | -"POT-Creation-Date: 2013-12-25 14:04+0000\n" |
261 | -"PO-Revision-Date: 2013-12-25 14:04+0000\n" |
262 | +"POT-Creation-Date: 2014-01-21 16:41+0000\n" |
263 | +"PO-Revision-Date: 2014-01-21 16:41+0000\n" |
264 | "Last-Translator: <>\n" |
265 | "Language-Team: \n" |
266 | "MIME-Version: 1.0\n" |
267 | @@ -21,16 +21,15 @@ |
268 | msgstr "Prodaja iz proizvodnje" |
269 | |
270 | #. module: sale_order_extensions |
271 | -#: model:ir.actions.act_window,name:sale_order_extensions.action_production_quotations |
272 | -#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_production_quotations |
273 | -msgid "Quotations - Production" |
274 | -msgstr "Ponudbe - Proizvodnja" |
275 | +#: code:addons/sale_order_extensions/sale_order.py:141 |
276 | +#, python-format |
277 | +msgid "Type \"service\" not set on next return products:" |
278 | +msgstr "Izdelki za vračilo, ki niso vrste \"storitev\":" |
279 | |
280 | #. module: sale_order_extensions |
281 | -#: model:ir.actions.act_window,name:sale_order_extensions.action_surplus_quotations |
282 | -#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_surplus_quotations |
283 | -msgid "Quotations - Surplus" |
284 | -msgstr "Ponudbe - Viški" |
285 | +#: model:ir.model,name:sale_order_extensions.model_product_product |
286 | +msgid "Product" |
287 | +msgstr "Izdelek" |
288 | |
289 | #. module: sale_order_extensions |
290 | #: model:ir.model,name:sale_order_extensions.model_sale_order |
291 | @@ -53,6 +52,24 @@ |
292 | msgstr "Pripravljeno" |
293 | |
294 | #. module: sale_order_extensions |
295 | +#: code:addons/sale_order_extensions/sale_order.py:133 |
296 | +#, python-format |
297 | +msgid "Tax not set for next products:" |
298 | +msgstr "Davek ni določen za izdelke:" |
299 | + |
300 | +#. module: sale_order_extensions |
301 | +#: model:ir.actions.act_window,name:sale_order_extensions.action_surplus_quotations |
302 | +#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_surplus_quotations |
303 | +msgid "Quotations - Surplus" |
304 | +msgstr "Ponudbe - Viški" |
305 | + |
306 | +#. module: sale_order_extensions |
307 | +#: model:ir.actions.act_window,name:sale_order_extensions.action_production_quotations |
308 | +#: model:ir.ui.menu,name:sale_order_extensions.menu_sale_production_quotations |
309 | +msgid "Quotations - Production" |
310 | +msgstr "Ponudbe - Proizvodnja" |
311 | + |
312 | +#. module: sale_order_extensions |
313 | #: view:sale.order:0 |
314 | msgid "Sales Order that haven't yet been confirmed" |
315 | msgstr "Nepotrjeni prodajni nalogi" |
316 | @@ -63,6 +80,15 @@ |
317 | msgstr "Pripravljeno" |
318 | |
319 | #. module: sale_order_extensions |
320 | +#: code:addons/sale_order_extensions/sale_order.py:120 |
321 | +#: code:addons/sale_order_extensions/sale_order.py:128 |
322 | +#: code:addons/sale_order_extensions/sale_order.py:136 |
323 | +#: code:addons/sale_order_extensions/sale_order.py:144 |
324 | +#, python-format |
325 | +msgid "Error!" |
326 | +msgstr "Napaka!" |
327 | + |
328 | +#. module: sale_order_extensions |
329 | #: model:ir.actions.act_window,help:sale_order_extensions.action_production_quotations |
330 | #: model:ir.actions.act_window,help:sale_order_extensions.action_surplus_quotations |
331 | msgid "<p class=\"oe_view_nocontent_create\">\n" |
332 | @@ -86,26 +112,38 @@ |
333 | " " |
334 | |
335 | #. module: sale_order_extensions |
336 | -#: view:sale.order:0 |
337 | -msgid "Set to Draft" |
338 | -msgstr "Vrni v pripravo" |
339 | - |
340 | -#. module: sale_order_extensions |
341 | #: model:ir.model,name:sale_order_extensions.model_sale_shop |
342 | msgid "Sales Shop" |
343 | msgstr "Trgovina" |
344 | |
345 | #. module: sale_order_extensions |
346 | #: view:sale.order:0 |
347 | +msgid "Set to Draft" |
348 | +msgstr "Vrni v pripravo" |
349 | + |
350 | +#. module: sale_order_extensions |
351 | +#: code:addons/sale_order_extensions/sale_order.py:117 |
352 | +#, python-format |
353 | +msgid "Price not set for next products:" |
354 | +msgstr "Cena ni določena za izdelke:" |
355 | + |
356 | +#. module: sale_order_extensions |
357 | +#: view:sale.order:0 |
358 | +msgid "context.get('shop_production', False)" |
359 | +msgstr "" |
360 | + |
361 | +#. module: sale_order_extensions |
362 | +#: view:sale.order:0 |
363 | msgid "Quotations" |
364 | msgstr "Ponudbe" |
365 | |
366 | #. module: sale_order_extensions |
367 | +#: code:addons/sale_order_extensions/sale_order.py:125 |
368 | +#, python-format |
369 | +msgid "Quantity not set for next products:" |
370 | +msgstr "Količina ni določena za izdelke:" |
371 | + |
372 | +#. module: sale_order_extensions |
373 | #: model:ir.model,name:sale_order_extensions.model_sale_order_line |
374 | msgid "Sales Order Line" |
375 | msgstr "Postavka prodajnega naloga" |
376 | - |
377 | -#. module: sale_order_extensions |
378 | -#: field:sale.order.line,product_qty_returned:0 |
379 | -msgid "Quantity Returned" |
380 | -msgstr "Vrnjena količina" |
381 | |
382 | === modified file 'sale_order_extensions/sale_order.py' |
383 | --- sale_order_extensions/sale_order.py 2014-01-06 16:13:31 +0000 |
384 | +++ sale_order_extensions/sale_order.py 2014-01-21 17:01:24 +0000 |
385 | @@ -108,43 +108,43 @@ |
386 | return {'value':{'order_line':lines}} |
387 | |
388 | def action_button_confirm_surplus(self, cr, uid, ids, context=None): |
389 | - assert len(ids) == 1, 'This option should only be used for a single id at a time.' |
390 | - _without_stock = self.action_check_stock(cr, uid, ids, context) |
391 | - _without_tax = self.action_check_tax(cr, uid, ids, context) |
392 | - if len(_without_stock) != 0: |
393 | - _text = 'Not enough stock for next products:' |
394 | - for _line in _without_stock: |
395 | - _text = _text + '\n ' + _line |
396 | - raise osv.except_osv(('Error!'), (_text)) |
397 | - return False |
398 | - elif len(_without_tax) != 0: |
399 | - _text = 'Tax not set for next products:' |
400 | - for _line in _without_stock: |
401 | - _text = _text + '\n ' + _line |
402 | - raise osv.except_osv(('Error!'), (_text)) |
403 | - return False |
404 | - else: |
405 | - return self.action_button_confirm(cr, uid, ids, context) |
406 | - |
407 | + return self.action_button_confirm(cr, uid, ids, context) |
408 | |
409 | def action_prepare(self, cr, uid, ids, context=None): |
410 | assert len(ids) == 1, 'This option should only be used for a single id at a time.' |
411 | _without_price = self.action_check_prices(cr, uid, ids, context) |
412 | - _without_tax = self.action_check_tax(cr, uid, ids, context) |
413 | if len(_without_price) != 0: |
414 | - _text = 'Prices for next products are not set:' |
415 | + _text = _('Price not set for next products:') |
416 | for _line in _without_price: |
417 | _text = _text + '\n ' + _line |
418 | - raise osv.except_osv(('Error!'), (_text)) |
419 | - return False |
420 | - elif len(_without_tax) != 0: |
421 | - _text = 'Tax not set for next products:' |
422 | + raise osv.except_osv(_('Error!'), (_text)) |
423 | + return False |
424 | + |
425 | + _without_quantity = self.action_check_quantity(cr, uid, ids, context) |
426 | + if len(_without_quantity) != 0: |
427 | + _text = _('Quantity not set for next products:') |
428 | + for _line in _without_quantity: |
429 | + _text = _text + '\n ' + _line |
430 | + raise osv.except_osv(_('Error!'), (_text)) |
431 | + return False |
432 | + |
433 | + _without_tax = self.action_check_tax(cr, uid, ids, context) |
434 | + if len(_without_tax) != 0: |
435 | + _text = _('Tax not set for next products:') |
436 | for _line in _without_tax: |
437 | - _text = _text + '\n ' + _line |
438 | - raise osv.except_osv(('Error!'), (_text)) |
439 | - return False |
440 | - else: |
441 | - return self.write(cr, uid, ids, {'state': 'prepared'}, context) |
442 | + _text = _text + '\n ' + _line |
443 | + raise osv.except_osv(_('Error!'), (_text)) |
444 | + return False |
445 | + |
446 | + _return_not_service = self.action_check_return_products(cr, uid, ids, context) |
447 | + if len(_return_not_service) != 0: |
448 | + _text = _('Type "service" not set on next return products:') |
449 | + for _line in _return_not_service: |
450 | + _text = _text + '\n ' + _line |
451 | + raise osv.except_osv(_('Error!'), (_text)) |
452 | + return False |
453 | + |
454 | + return self.write(cr, uid, ids, {'state': 'prepared'}, context) |
455 | |
456 | def action_draft(self, cr, uid, ids, context=None): |
457 | assert len(ids) == 1, 'This option should only be used for a single id at a time.' |
458 | @@ -167,16 +167,16 @@ |
459 | _without_price.append(_line.name) |
460 | return _without_price |
461 | |
462 | - def action_check_stock(self, cr, uid, ids, context=None): |
463 | + def action_check_quantity(self, cr, uid, ids, context=None): |
464 | if context == None: |
465 | context = {} |
466 | - _without_stock = [] |
467 | + _without_quantity = [] |
468 | |
469 | -# for _order in self.browse(cr, uid, ids, context): |
470 | -# for _line in _order.order_line: |
471 | -# if _line.product_id.qty_available < _line.product_uom_qty: |
472 | -# _without_stock.append(_line.name) |
473 | - return _without_stock |
474 | + for _order in self.browse(cr, uid, ids, context): |
475 | + for _line in _order.order_line: |
476 | + if _line.product_uom_qty == 0: |
477 | + _without_quantity.append(_line.name) |
478 | + return _without_quantity |
479 | |
480 | def action_check_tax(self, cr, uid, ids, context=None): |
481 | if context == None: |
482 | @@ -189,6 +189,18 @@ |
483 | _without_tax.append(_line.name) |
484 | return _without_tax |
485 | |
486 | + def action_check_return_products(self, cr, uid, ids, context=None): |
487 | + if context == None: |
488 | + context = {} |
489 | + _return_not_service = [] |
490 | + |
491 | + for _order in self.browse(cr, uid, ids, context): |
492 | + for _line in _order.order_line: |
493 | + if 'V_' in _line.product_id.default_code and _line.product_id.type != 'service': |
494 | + _return_not_service.append(_line.name) |
495 | + return _return_not_service |
496 | + |
497 | + |
498 | def _get_line_price(self, cr, uid, partner, pricelist, date_order, product, uom, uom_quantity): |
499 | _dp = self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price') |
500 | _price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist], product, uom_quantity or 1.0, partner, |
501 | |
502 | === modified file 'stock_return_on_delivery/i18n/en_US.po' |
503 | --- stock_return_on_delivery/i18n/en_US.po 2013-12-09 18:09:35 +0000 |
504 | +++ stock_return_on_delivery/i18n/en_US.po 2014-01-21 17:01:24 +0000 |
505 | @@ -4,10 +4,10 @@ |
506 | # |
507 | msgid "" |
508 | msgstr "" |
509 | -"Project-Id-Version: OpenERP Server 7.0alpha\n" |
510 | +"Project-Id-Version: OpenERP Server 7.0\n" |
511 | "Report-Msgid-Bugs-To: \n" |
512 | -"POT-Creation-Date: 2012-11-28 09:02+0000\n" |
513 | -"PO-Revision-Date: 2012-11-28 09:02+0000\n" |
514 | +"POT-Creation-Date: 2014-01-21 16:41+0000\n" |
515 | +"PO-Revision-Date: 2014-01-21 16:41+0000\n" |
516 | "Last-Translator: <>\n" |
517 | "Language-Team: \n" |
518 | "MIME-Version: 1.0\n" |
519 | @@ -27,7 +27,6 @@ |
520 | |
521 | #. module: stock_return_on_delivery |
522 | #: field:stock.move,product_qty_returned:0 |
523 | -#: field:stock.partial.return.line,quantity_returned:0 |
524 | msgid "Quantity Returned" |
525 | msgstr "" |
526 | |
527 | @@ -47,8 +46,8 @@ |
528 | msgstr "" |
529 | |
530 | #. module: stock_return_on_delivery |
531 | -#: constraint:stock.move:0 |
532 | -msgid "You try to assign a lot which is not from the same product." |
533 | +#: field:stock.move,return_move_id:0 |
534 | +msgid "unknown" |
535 | msgstr "" |
536 | |
537 | #. module: stock_return_on_delivery |
538 | @@ -68,19 +67,23 @@ |
539 | msgstr "" |
540 | |
541 | #. module: stock_return_on_delivery |
542 | +#: model:ir.model,name:stock_return_on_delivery.model_stock_partial_picking |
543 | +msgid "Partial Picking Processing Wizard" |
544 | +msgstr "" |
545 | + |
546 | +#. module: stock_return_on_delivery |
547 | #: field:stock.partial.return,picking_id:0 |
548 | msgid "Picking" |
549 | msgstr "" |
550 | |
551 | #. module: stock_return_on_delivery |
552 | -#: constraint:stock.move:0 |
553 | -msgid "You must assign a serial number for this product." |
554 | +#: model:ir.model,name:stock_return_on_delivery.model_stock_partial_picking_line |
555 | +msgid "stock.partial.picking.line" |
556 | msgstr "" |
557 | |
558 | #. module: stock_return_on_delivery |
559 | -#: field:stock.partial.return,move_ids:0 |
560 | #: view:stock.partial.return.line:0 |
561 | -msgid "Product Returns" |
562 | +msgid "Stock Return Line" |
563 | msgstr "" |
564 | |
565 | #. module: stock_return_on_delivery |
566 | @@ -94,13 +97,9 @@ |
567 | msgstr "" |
568 | |
569 | #. module: stock_return_on_delivery |
570 | -#: constraint:stock.move:0 |
571 | -msgid "You cannot move products from or to a location of the type view." |
572 | -msgstr "" |
573 | - |
574 | -#. module: stock_return_on_delivery |
575 | +#: field:stock.partial.return,move_ids:0 |
576 | #: view:stock.partial.return.line:0 |
577 | -msgid "Stock Return Line" |
578 | +msgid "Product Returns" |
579 | msgstr "" |
580 | |
581 | #. module: stock_return_on_delivery |
582 | @@ -109,19 +108,13 @@ |
583 | msgstr "" |
584 | |
585 | #. module: stock_return_on_delivery |
586 | -#: sql_constraint:stock.picking:0 |
587 | -#: sql_constraint:stock.picking.out:0 |
588 | -msgid "Reference must be unique per Company!" |
589 | -msgstr "" |
590 | - |
591 | -#. module: stock_return_on_delivery |
592 | #: model:ir.model,name:stock_return_on_delivery.model_stock_partial_return_line |
593 | msgid "stock.partial.return.line" |
594 | msgstr "" |
595 | |
596 | #. module: stock_return_on_delivery |
597 | #: field:stock.partial.return.line,quantity:0 |
598 | -msgid "Quantity" |
599 | +msgid "Calculated Quantity" |
600 | msgstr "" |
601 | |
602 | #. module: stock_return_on_delivery |
603 | @@ -135,6 +128,11 @@ |
604 | msgstr "" |
605 | |
606 | #. module: stock_return_on_delivery |
607 | +#: field:stock.partial.return.line,quantity_delivered:0 |
608 | +msgid "Delivered Quantity" |
609 | +msgstr "" |
610 | + |
611 | +#. module: stock_return_on_delivery |
612 | #: view:stock.config.settings:0 |
613 | msgid "Automatic Returns On Delivery" |
614 | msgstr "" |
615 | @@ -155,6 +153,11 @@ |
616 | msgstr "" |
617 | |
618 | #. module: stock_return_on_delivery |
619 | +#: field:stock.partial.return.line,quantity_returned:0 |
620 | +msgid "Returned Quantity" |
621 | +msgstr "" |
622 | + |
623 | +#. module: stock_return_on_delivery |
624 | #: model:ir.model,name:stock_return_on_delivery.model_stock_config_settings |
625 | msgid "stock.config.settings" |
626 | msgstr "" |
627 | @@ -168,4 +171,3 @@ |
628 | #: view:stock.partial.return:0 |
629 | msgid "or" |
630 | msgstr "" |
631 | - |
632 | |
633 | === modified file 'stock_return_on_delivery/i18n/sl.po' |
634 | --- stock_return_on_delivery/i18n/sl.po 2014-01-06 20:29:28 +0000 |
635 | +++ stock_return_on_delivery/i18n/sl.po 2014-01-21 17:01:24 +0000 |
636 | @@ -4,10 +4,10 @@ |
637 | # |
638 | msgid "" |
639 | msgstr "" |
640 | -"Project-Id-Version: OpenERP Server 7.0alpha\n" |
641 | +"Project-Id-Version: OpenERP Server 7.0\n" |
642 | "Report-Msgid-Bugs-To: \n" |
643 | -"POT-Creation-Date: 2012-11-28 09:02+0000\n" |
644 | -"PO-Revision-Date: 2012-11-28 09:02+0000\n" |
645 | +"POT-Creation-Date: 2014-01-21 16:41+0000\n" |
646 | +"PO-Revision-Date: 2014-01-21 16:41+0000\n" |
647 | "Last-Translator: <>\n" |
648 | "Language-Team: \n" |
649 | "MIME-Version: 1.0\n" |
650 | @@ -27,7 +27,6 @@ |
651 | |
652 | #. module: stock_return_on_delivery |
653 | #: field:stock.move,product_qty_returned:0 |
654 | -#: field:stock.partial.return.line,quantity_returned:0 |
655 | msgid "Quantity Returned" |
656 | msgstr "Vrnjena količina" |
657 | |
658 | @@ -47,9 +46,9 @@ |
659 | msgstr "Izdelek" |
660 | |
661 | #. module: stock_return_on_delivery |
662 | -#: constraint:stock.move:0 |
663 | -msgid "You try to assign a lot which is not from the same product." |
664 | -msgstr "Določili ste serijo, ki ni iz tega izdelka." |
665 | +#: field:stock.move,return_move_id:0 |
666 | +msgid "unknown" |
667 | +msgstr "neznano" |
668 | |
669 | #. module: stock_return_on_delivery |
670 | #: view:stock.partial.return:0 |
671 | @@ -68,20 +67,19 @@ |
672 | msgstr "Datum" |
673 | |
674 | #. module: stock_return_on_delivery |
675 | +#: model:ir.model,name:stock_return_on_delivery.model_stock_partial_picking |
676 | +msgid "Partial Picking Processing Wizard" |
677 | +msgstr "Pomočnik za delni prevzem" |
678 | + |
679 | +#. module: stock_return_on_delivery |
680 | #: field:stock.partial.return,picking_id:0 |
681 | msgid "Picking" |
682 | msgstr "Prevzem" |
683 | |
684 | #. module: stock_return_on_delivery |
685 | -#: constraint:stock.move:0 |
686 | -msgid "You must assign a serial number for this product." |
687 | -msgstr "Določiti morate serijsko številko izdelka." |
688 | - |
689 | -#. module: stock_return_on_delivery |
690 | -#: field:stock.partial.return,move_ids:0 |
691 | #: view:stock.partial.return.line:0 |
692 | -msgid "Product Returns" |
693 | -msgstr "Vračila izdelka" |
694 | +msgid "Stock Return Line" |
695 | +msgstr "Postavka vračila" |
696 | |
697 | #. module: stock_return_on_delivery |
698 | #: model:ir.model,name:stock_return_on_delivery.model_stock_partial_return |
699 | @@ -94,14 +92,10 @@ |
700 | msgstr "Obdelaj vračilo" |
701 | |
702 | #. module: stock_return_on_delivery |
703 | -#: constraint:stock.move:0 |
704 | -msgid "You cannot move products from or to a location of the type view." |
705 | -msgstr "Izdelkov ne morete premakniti iz ali na lokacijo tipa pogled." |
706 | - |
707 | -#. module: stock_return_on_delivery |
708 | +#: field:stock.partial.return,move_ids:0 |
709 | #: view:stock.partial.return.line:0 |
710 | -msgid "Stock Return Line" |
711 | -msgstr "Postavka vračila" |
712 | +msgid "Product Returns" |
713 | +msgstr "Vračila izdelkov" |
714 | |
715 | #. module: stock_return_on_delivery |
716 | #: view:stock.partial.return:0 |
717 | @@ -109,20 +103,14 @@ |
718 | msgstr "Premiki izdelkov" |
719 | |
720 | #. module: stock_return_on_delivery |
721 | -#: sql_constraint:stock.picking:0 |
722 | -#: sql_constraint:stock.picking.out:0 |
723 | -msgid "Reference must be unique per Company!" |
724 | -msgstr "Referenca mora biti različna za podjetja!" |
725 | - |
726 | -#. module: stock_return_on_delivery |
727 | #: model:ir.model,name:stock_return_on_delivery.model_stock_partial_return_line |
728 | msgid "stock.partial.return.line" |
729 | msgstr "" |
730 | |
731 | #. module: stock_return_on_delivery |
732 | #: field:stock.partial.return.line,quantity:0 |
733 | -msgid "Quantity" |
734 | -msgstr "Količina" |
735 | +msgid "Calculated Quantity" |
736 | +msgstr "Obračunana količina" |
737 | |
738 | #. module: stock_return_on_delivery |
739 | #: model:ir.model,name:stock_return_on_delivery.model_stock_move |
740 | @@ -135,6 +123,11 @@ |
741 | msgstr "Premik" |
742 | |
743 | #. module: stock_return_on_delivery |
744 | +#: field:stock.partial.return.line,quantity_delivered:0 |
745 | +msgid "Delivered Quantity" |
746 | +msgstr "Dobavljena količina" |
747 | + |
748 | +#. module: stock_return_on_delivery |
749 | #: view:stock.config.settings:0 |
750 | msgid "Automatic Returns On Delivery" |
751 | msgstr "Avtomatska vračila ob izdaji" |
752 | @@ -155,6 +148,11 @@ |
753 | msgstr "Prekliči" |
754 | |
755 | #. module: stock_return_on_delivery |
756 | +#: field:stock.partial.return.line,quantity_returned:0 |
757 | +msgid "Returned Quantity" |
758 | +msgstr "Vrnjena količina" |
759 | + |
760 | +#. module: stock_return_on_delivery |
761 | #: model:ir.model,name:stock_return_on_delivery.model_stock_config_settings |
762 | msgid "stock.config.settings" |
763 | msgstr "" |
764 | @@ -162,14 +160,9 @@ |
765 | #. module: stock_return_on_delivery |
766 | #: model:ir.model,name:stock_return_on_delivery.model_stock_picking_out |
767 | msgid "Delivery Orders" |
768 | -msgstr "Dobavnice" |
769 | +msgstr "dobavnice" |
770 | |
771 | #. module: stock_return_on_delivery |
772 | #: view:stock.partial.return:0 |
773 | msgid "or" |
774 | msgstr "ali" |
775 | - |
776 | -#. module: stock_return_on_delivery |
777 | -#: field:stock.partial.return.line,quantity_delivered:0 |
778 | -msgid "Quantity Delivered" |
779 | -msgstr "Dobavljena količina" |
780 | |
781 | === modified file 'stock_return_on_delivery/i18n/stock_return_on_delivery.pot' |
782 | --- stock_return_on_delivery/i18n/stock_return_on_delivery.pot 2014-01-06 20:29:28 +0000 |
783 | +++ stock_return_on_delivery/i18n/stock_return_on_delivery.pot 2014-01-21 17:01:24 +0000 |
784 | @@ -4,10 +4,10 @@ |
785 | # |
786 | msgid "" |
787 | msgstr "" |
788 | -"Project-Id-Version: OpenERP Server 7.0alpha\n" |
789 | +"Project-Id-Version: OpenERP Server 7.0\n" |
790 | "Report-Msgid-Bugs-To: \n" |
791 | -"POT-Creation-Date: 2012-11-28 09:02+0000\n" |
792 | -"PO-Revision-Date: 2012-11-28 09:02+0000\n" |
793 | +"POT-Creation-Date: 2014-01-21 16:41+0000\n" |
794 | +"PO-Revision-Date: 2014-01-21 16:41+0000\n" |
795 | "Last-Translator: <>\n" |
796 | "Language-Team: \n" |
797 | "MIME-Version: 1.0\n" |
798 | @@ -27,7 +27,6 @@ |
799 | |
800 | #. module: stock_return_on_delivery |
801 | #: field:stock.move,product_qty_returned:0 |
802 | -#: field:stock.partial.return.line,quantity_returned:0 |
803 | msgid "Quantity Returned" |
804 | msgstr "" |
805 | |
806 | @@ -47,8 +46,8 @@ |
807 | msgstr "" |
808 | |
809 | #. module: stock_return_on_delivery |
810 | -#: constraint:stock.move:0 |
811 | -msgid "You try to assign a lot which is not from the same product." |
812 | +#: field:stock.move,return_move_id:0 |
813 | +msgid "unknown" |
814 | msgstr "" |
815 | |
816 | #. module: stock_return_on_delivery |
817 | @@ -68,19 +67,23 @@ |
818 | msgstr "" |
819 | |
820 | #. module: stock_return_on_delivery |
821 | +#: model:ir.model,name:stock_return_on_delivery.model_stock_partial_picking |
822 | +msgid "Partial Picking Processing Wizard" |
823 | +msgstr "" |
824 | + |
825 | +#. module: stock_return_on_delivery |
826 | #: field:stock.partial.return,picking_id:0 |
827 | msgid "Picking" |
828 | msgstr "" |
829 | |
830 | #. module: stock_return_on_delivery |
831 | -#: constraint:stock.move:0 |
832 | -msgid "You must assign a serial number for this product." |
833 | +#: model:ir.model,name:stock_return_on_delivery.model_stock_partial_picking_line |
834 | +msgid "stock.partial.picking.line" |
835 | msgstr "" |
836 | |
837 | #. module: stock_return_on_delivery |
838 | -#: field:stock.partial.return,move_ids:0 |
839 | #: view:stock.partial.return.line:0 |
840 | -msgid "Product Returns" |
841 | +msgid "Stock Return Line" |
842 | msgstr "" |
843 | |
844 | #. module: stock_return_on_delivery |
845 | @@ -94,13 +97,9 @@ |
846 | msgstr "" |
847 | |
848 | #. module: stock_return_on_delivery |
849 | -#: constraint:stock.move:0 |
850 | -msgid "You cannot move products from or to a location of the type view." |
851 | -msgstr "" |
852 | - |
853 | -#. module: stock_return_on_delivery |
854 | +#: field:stock.partial.return,move_ids:0 |
855 | #: view:stock.partial.return.line:0 |
856 | -msgid "Stock Return Line" |
857 | +msgid "Product Returns" |
858 | msgstr "" |
859 | |
860 | #. module: stock_return_on_delivery |
861 | @@ -109,19 +108,13 @@ |
862 | msgstr "" |
863 | |
864 | #. module: stock_return_on_delivery |
865 | -#: sql_constraint:stock.picking:0 |
866 | -#: sql_constraint:stock.picking.out:0 |
867 | -msgid "Reference must be unique per Company!" |
868 | -msgstr "" |
869 | - |
870 | -#. module: stock_return_on_delivery |
871 | #: model:ir.model,name:stock_return_on_delivery.model_stock_partial_return_line |
872 | msgid "stock.partial.return.line" |
873 | msgstr "" |
874 | |
875 | #. module: stock_return_on_delivery |
876 | #: field:stock.partial.return.line,quantity:0 |
877 | -msgid "Quantity" |
878 | +msgid "Calculated Quantity" |
879 | msgstr "" |
880 | |
881 | #. module: stock_return_on_delivery |
882 | @@ -135,6 +128,11 @@ |
883 | msgstr "" |
884 | |
885 | #. module: stock_return_on_delivery |
886 | +#: field:stock.partial.return.line,quantity_delivered:0 |
887 | +msgid "Delivered Quantity" |
888 | +msgstr "" |
889 | + |
890 | +#. module: stock_return_on_delivery |
891 | #: view:stock.config.settings:0 |
892 | msgid "Automatic Returns On Delivery" |
893 | msgstr "" |
894 | @@ -155,6 +153,11 @@ |
895 | msgstr "" |
896 | |
897 | #. module: stock_return_on_delivery |
898 | +#: field:stock.partial.return.line,quantity_returned:0 |
899 | +msgid "Returned Quantity" |
900 | +msgstr "" |
901 | + |
902 | +#. module: stock_return_on_delivery |
903 | #: model:ir.model,name:stock_return_on_delivery.model_stock_config_settings |
904 | msgid "stock.config.settings" |
905 | msgstr "" |
906 | @@ -168,8 +171,3 @@ |
907 | #: view:stock.partial.return:0 |
908 | msgid "or" |
909 | msgstr "" |
910 | - |
911 | -#. module: stock_return_on_delivery |
912 | -#: field:stock.partial.return.line,quantity_delivered:0 |
913 | -msgid "Quantity Delivered" |
914 | -msgstr "" |
915 | |
916 | === modified file 'stock_return_on_delivery/stock_partial_return.py' |
917 | --- stock_return_on_delivery/stock_partial_return.py 2014-01-09 20:37:18 +0000 |
918 | +++ stock_return_on_delivery/stock_partial_return.py 2014-01-21 17:01:24 +0000 |
919 | @@ -32,9 +32,9 @@ |
920 | _rec_name = 'product_id' |
921 | _columns = { |
922 | 'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'), |
923 | - 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True), |
924 | - 'quantity_delivered': fields.float("Quantity Delivered", digits_compute=dp.get_precision('Product Unit of Measure'), required=True), |
925 | - 'quantity_returned' : fields.float("Quantity Returned", digits_compute=dp.get_precision('Product Unit of Measure'), required=True), |
926 | + 'quantity' : fields.float("Calculated Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True), |
927 | + 'quantity_delivered': fields.float("Delivered Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True), |
928 | + 'quantity_returned' : fields.float("Returned Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True), |
929 | 'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'), |
930 | 'wizard_id' : fields.many2one('stock.partial.return', string="Wizard", ondelete='CASCADE'), |
931 | } |
932 | @@ -78,7 +78,7 @@ |
933 | partial_move = { |
934 | 'product_id' : move.product_id.id, |
935 | 'quantity' : move.state in ('assigned','done','confirmed') and move.product_qty or 0, |
936 | - 'quantity_delivered': move.state in ('assigned','done','confirmed') and move.product_qty or 0, |
937 | + 'quantity_delivered': move.state in ('assigned','done','confirmed') and (move.product_qty + move.product_qty_returned) or 0, |
938 | 'quantity_returned' : move.state in ('assigned','done','confirmed') and move.product_qty_returned or 0, |
939 | 'move_id' : move.id, |
940 | } |
941 | @@ -91,7 +91,7 @@ |
942 | if return_line.quantity_returned <> return_line.move_id.product_qty_returned or return_line.quantity_delivered <> return_line.move_id.product_qty: |
943 | if return_line.quantity_returned <> 0: |
944 | _returns = True |
945 | - _product_qty = return_line.quantity_delivered + return_line.move_id.product_qty_returned - return_line.quantity_returned |
946 | + _product_qty = return_line.quantity_delivered - return_line.quantity_returned |
947 | _product_uos_qty = _product_qty * return_line.move_id.product_id.uos_coeff |
948 | _product_qty_returned = return_line.quantity_returned |
949 | move_obj = self.pool.get('stock.move') |