Merge lp:~sandi-dirntis/openerpsl/openerpsl_20140410_1 into lp:openerpsl/7.0

Proposed by Aleksander Dirntiš
Status: Merged
Merged at revision: 383
Proposed branch: lp:~sandi-dirntis/openerpsl/openerpsl_20140410_1
Merge into: lp:openerpsl/7.0
Diff against target: 2191 lines (+1274/-517)
14 files modified
purchase_recalculation/__init__.py (+1/-1)
purchase_recalculation/__openerp__.py (+4/-4)
purchase_recalculation/account_invoice.py (+49/-23)
purchase_recalculation/i18n/en_US.po (+230/-142)
purchase_recalculation/i18n/purchase_recalculation.pot (+230/-142)
purchase_recalculation/i18n/sl.po (+293/-0)
purchase_recalculation/i18n/sl_SI.po (+249/-160)
purchase_recalculation/product_product.py (+35/-22)
purchase_recalculation/stock_move.py (+9/-1)
purchase_recalculation/stock_picking.py (+2/-1)
purchase_recalculation/wizard/__init__.py (+1/-0)
purchase_recalculation/wizard/account_product_cost_recalculation.py (+14/-21)
purchase_recalculation/wizard/account_product_cost_set.py (+125/-0)
purchase_recalculation/wizard/account_product_cost_set_view.xml (+32/-0)
To merge this branch: bzr merge lp:~sandi-dirntis/openerpsl/openerpsl_20140410_1
Reviewer Review Type Date Requested Status
Mentis Pending
Review via email: mp+215113@code.launchpad.net

Description of the change

[MOD] Modified behavior on product cost recalculations

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 'purchase_recalculation/__init__.py'
2--- purchase_recalculation/__init__.py 2014-03-17 07:50:11 +0000
3+++ purchase_recalculation/__init__.py 2014-04-10 09:10:37 +0000
4@@ -20,7 +20,7 @@
5 #
6 ##############################################################################
7
8-#import product_period_cost
9+import product_period_cost
10 import product_product
11
12 import stock_move
13
14=== modified file 'purchase_recalculation/__openerp__.py'
15--- purchase_recalculation/__openerp__.py 2014-03-19 13:58:30 +0000
16+++ purchase_recalculation/__openerp__.py 2014-04-10 09:10:37 +0000
17@@ -22,13 +22,13 @@
18
19 {
20 'name': 'Product Cost Recalculation',
21- 'version': '1.2',
22+ 'version': '1.3',
23 'category': 'Accounting',
24 'description': """
25
26 Module adds several options and methods for product cost recalculation:\n
27
28-Options:
29+Options:\n
30 - change values on supplier shipments (incoming and returns) manually (date of delivery, quantity, unit price)\n
31 - change values on customer shipments (outgoing and returns) manually (date of delivery, quantity)\n
32 - change values on supplier shipments (incoming and returns) shipment automatically via supplier invoice or refund (unit price)\n
33@@ -38,7 +38,6 @@
34
35 TODO:\n
36 - change values option on inventory stock moves (date, quantity, unit price)\n
37-- add inventory values to product cost recalculation\n
38
39 """,
40 'author': 'Mentis d.o.o.',
41@@ -46,7 +45,8 @@
42 'data': [
43 'stock_picking_form_view.xml',
44 'wizard/stock_picking_update_view.xml',
45- 'wizard/account_product_cost_recalculation_view.xml'
46+ 'wizard/account_product_cost_recalculation_view.xml',
47+ 'wizard/account_product_cost_set_view.xml'
48 ],
49 'installable': True,
50 'active': False,
51
52=== modified file 'purchase_recalculation/account_invoice.py'
53--- purchase_recalculation/account_invoice.py 2014-03-19 13:58:30 +0000
54+++ purchase_recalculation/account_invoice.py 2014-04-10 09:10:37 +0000
55@@ -34,27 +34,50 @@
56
57 res = super(account_invoice, self).action_number(cr, uid, ids, context)
58 if res:
59- _invoice_ids = self.search(cr, uid, [('id','in',ids),('type','in',['in_invoice', 'in_refund'])], context)
60+ _invoice_ids = self.search(cr, uid, [('id','in',ids)], context)
61 if len(_invoice_ids) > 0:
62 ctx = {}
63 _costs_installed = self.pool.get('stock.picking.in').fields_get(cr, uid, ['landing_costs_line_ids'], context) != {}
64 _picking_ids = []
65 for _invoice in self.browse(cr, uid, _invoice_ids, context):
66+ _src_usage = False
67+ _dst_usage = False
68+
69 if _invoice.type == 'in_invoice':
70 _src_usage = 'supplier'
71 _dst_usage = 'internal'
72- else:
73+ elif _invoice.type == 'in_refund':
74 _src_usage = 'internal'
75 _dst_usage = 'supplier'
76+ elif _invoice.type == 'out_invoice':
77+ _src_usage = 'internal'
78+ _dst_usage = 'customer'
79+ elif _invoice.type == 'out_refund':
80+ _src_usage = 'customer'
81+ _dst_usage = 'internal'
82+
83+ if not _src_usage and not _dst_usage:
84+ continue
85
86 for _line in _invoice.invoice_line:
87 _quantity = 0.0
88 _uom_id = False
89- _order_line_ids = self.pool.get('purchase.order.line').search(cr, uid, [('invoice_lines','=',_line.id)])
90- _stock_move_ids = self.pool.get('stock.move').search(cr, uid, [('purchase_line_id','in',_order_line_ids),
91- ('state','=','done'),
92- ('location_id.usage','=',_src_usage),
93- ('location_dest_id.usage','=',_dst_usage)])
94+
95+ _order_line_ids = []
96+ _stock_move_ids = []
97+ if _src_usage == 'supplier' or _dst_usage == 'supplier':
98+ _order_line_ids = self.pool.get('purchase.order.line').search(cr, uid, [('invoice_lines','=',_line.id)])
99+ _stock_move_ids = self.pool.get('stock.move').search(cr, uid, [('purchase_line_id','in',_order_line_ids),
100+ ('state','=','done'),
101+ ('location_id.usage','=',_src_usage),
102+ ('location_dest_id.usage','=',_dst_usage)])
103+ else:
104+ _order_line_ids = self.pool.get('sale.order.line').search(cr, uid, [('invoice_lines','=',_line.id)])
105+ _stock_move_ids = self.pool.get('stock.move').search(cr, uid, [('sale_line_id','in',_order_line_ids),
106+ ('state','=','done'),
107+ ('location_id.usage','=',_src_usage),
108+ ('location_dest_id.usage','=',_dst_usage)])
109+
110 if len(_stock_move_ids) > 0:
111 _stock_moves = self.pool.get('stock.move').browse(cr, uid, _stock_move_ids, context)
112 for _stock_move in _stock_moves:
113@@ -65,22 +88,25 @@
114 if _quantity != _line.quantity:
115 _text = _line.invoice_id.origin + ' - ' + _line.name
116 raise osv.except_osv(_('Error!'), _('Invoiced quantity is different than recieved quantity.\n' + _text))
117-
118- for _stock_move in _stock_moves:
119- _updated = False
120- if _costs_installed:
121- _has_costs = len(_stock_move.landing_costs_line_ids) <> 0 or len(_stock_move.picking_id.landing_costs_line_ids) <> 0
122- if (_has_costs and _stock_move.price_unit_without_costs != _line.price_unit) \
123- or (not _has_costs and _stock_move.price_unit != _line.price_unit):
124- ctx['move%s' % (_stock_move.id)] = {'price_unit': _line.price_unit,
125- 'price_unit_without_costs': False}
126- _updated = True
127- else:
128- if _stock_move.price_unit != _line.price_unit:
129- ctx['move%s' % (_stock_move.id)] = {'price_unit': _line.price_unit}
130- _updated = True
131- if _updated:
132- _picking_ids.append(_stock_move.picking_id.id)
133+
134+ if _src_usage == 'supplier' or _dst_usage == 'supplier':
135+ for _stock_move in _stock_moves:
136+ _updated = False
137+ if _costs_installed:
138+ _has_costs = len(_stock_move.landing_costs_line_ids) <> 0 or len(_stock_move.picking_id.landing_costs_line_ids) <> 0
139+ if (_has_costs and _stock_move.price_unit_without_costs != _line.price_unit) \
140+ or (not _has_costs and _stock_move.price_unit != _line.price_unit):
141+ ctx['move%s' % (_stock_move.id)] = {'price_unit': _line.price_unit,
142+ 'price_unit_without_costs': False,
143+ 'quantity': False}
144+ _updated = True
145+ else:
146+ if _stock_move.price_unit != _line.price_unit:
147+ ctx['move%s' % (_stock_move.id)] = {'price_unit': _line.price_unit,
148+ 'quantity': False}
149+ _updated = True
150+ if _updated:
151+ _picking_ids.append(_stock_move.picking_id.id)
152 if _picking_ids:
153 self.pool.get('stock.picking')._picking_update(cr, uid, _picking_ids, ctx)
154 return res
155
156=== modified file 'purchase_recalculation/i18n/en_US.po'
157--- purchase_recalculation/i18n/en_US.po 2014-03-17 07:50:11 +0000
158+++ purchase_recalculation/i18n/en_US.po 2014-04-10 09:10:37 +0000
159@@ -6,8 +6,8 @@
160 msgstr ""
161 "Project-Id-Version: OpenERP Server 7.0\n"
162 "Report-Msgid-Bugs-To: \n"
163-"POT-Creation-Date: 2013-10-03 07:50+0000\n"
164-"PO-Revision-Date: 2013-10-03 07:50+0000\n"
165+"POT-Creation-Date: 2014-04-10 08:29+0000\n"
166+"PO-Revision-Date: 2014-04-10 08:29+0000\n"
167 "Last-Translator: <>\n"
168 "Language-Team: \n"
169 "MIME-Version: 1.0\n"
170@@ -16,190 +16,278 @@
171 "Plural-Forms: \n"
172
173 #. module: purchase_recalculation
174-#: help:account.product.cost.recalculation,product_id:0
175-msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
176-msgstr ""
177-
178-#. module: purchase_recalculation
179-#: field:stock.update.values,date_delivered:0
180+#: view:account.product.cost.recalculation:0
181+#: view:account.product.cost.set:0
182+#: view:stock.picking.update:0
183+msgid "Cancel"
184+msgstr ""
185+
186+#. module: purchase_recalculation
187+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
188+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
189+#, python-format
190+msgid "Cannot find suitable dates for recalculation."
191+msgstr ""
192+
193+#. module: purchase_recalculation
194+#: view:stock.picking.update:0
195+msgid "Confirm"
196+msgstr ""
197+
198+#. module: purchase_recalculation
199+#: field:product.period.cost,price_unit:0
200+msgid "Cost for period"
201+msgstr ""
202+
203+#. module: purchase_recalculation
204+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
205+#, python-format
206+msgid "Cost price for selected period does not exist!"
207+msgstr ""
208+
209+#. module: purchase_recalculation
210+#: selection:account.product.cost.set,type:0
211+msgid "Create new cost move per period"
212+msgstr ""
213+
214+#. module: purchase_recalculation
215+#: selection:account.product.cost.set,type:0
216+msgid "Create new cost move per period/product"
217+msgstr ""
218+
219+#. module: purchase_recalculation
220+#: selection:account.product.cost.set,type:0
221+msgid "Create new cost move per period/product category"
222+msgstr ""
223+
224+#. module: purchase_recalculation
225+#: field:stock.picking.update,date_delivered:0
226 msgid "Date delivered"
227 msgstr ""
228
229 #. module: purchase_recalculation
230+#: code:_description:0
231+#: model:ir.model,name:purchase_recalculation.model_stock_picking_out
232+#, python-format
233+msgid "Delivery Orders"
234+msgstr ""
235+
236+#. module: purchase_recalculation
237+#: code:addons/purchase_recalculation/account_invoice.py:90
238+#: code:addons/purchase_recalculation/product_product.py:186
239+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
240+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
241+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
242+#, python-format
243+msgid "Error!"
244+msgstr ""
245+
246+#. module: purchase_recalculation
247+#: code:_description:0
248 #: model:ir.model,name:purchase_recalculation.model_stock_picking_in
249+#, python-format
250 msgid "Incoming Shipments"
251 msgstr ""
252
253 #. module: purchase_recalculation
254-#: help:account.product.cost.recalculation,period_id:0
255-msgid "Period for which recalculation will be done. If not set recalculation will be done for whole fiscal year."
256-msgstr ""
257-
258-#. module: purchase_recalculation
259-#: model:ir.model,name:purchase_recalculation.model_stock_update_values
260-msgid "Update Values Processing Wizard"
261-msgstr ""
262-
263-#. module: purchase_recalculation
264-#: field:stock.update.values.line,wizard_id:0
265-msgid "Wizard"
266-msgstr ""
267-
268-#. module: purchase_recalculation
269-#: view:stock.update.values:0
270-msgid "Confirm"
271-msgstr ""
272-
273-#. module: purchase_recalculation
274-#: code:addons/purchase_recalculation/account_invoice.py:52
275-#, python-format
276-msgid "Invoiced stock moves are not in same period as invoice."
277-msgstr ""
278-
279-#. module: purchase_recalculation
280-#: view:stock.update.values:0
281-msgid "Product Moves"
282-msgstr ""
283-
284-#. module: purchase_recalculation
285-#: view:stock.update.values:0
286-msgid "Transfer Products"
287-msgstr ""
288-
289-#. module: purchase_recalculation
290-#: field:stock.update.values.line,price_unit_new:0
291-msgid "New Price Unit"
292-msgstr ""
293-
294-#. module: purchase_recalculation
295-#: view:account.product.cost.recalculation:0
296-#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
297-#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
298-#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
299-msgid "Recalculate Product Costs"
300-msgstr ""
301-
302-#. module: purchase_recalculation
303+#: code:_description:0
304+#: model:ir.model,name:purchase_recalculation.model_account_invoice
305+#, python-format
306+msgid "Invoice"
307+msgstr ""
308+
309+#. module: purchase_recalculation
310+#: code:addons/purchase_recalculation/account_invoice.py:90
311+#, python-format
312+msgid "Invoiced quantity is different than recieved quantity.\n"
313+""
314+msgstr ""
315+
316+#. module: purchase_recalculation
317+#: code:_description:0
318 #: model:ir.model,name:purchase_recalculation.model_account_move_line
319+#, python-format
320 msgid "Journal Items"
321 msgstr ""
322
323 #. module: purchase_recalculation
324-#: field:stock.update.values,picking_id:0
325+#: field:stock.picking.update.line,move_id:0
326+msgid "Move"
327+msgstr ""
328+
329+#. module: purchase_recalculation
330+#: field:stock.picking.update.line,price_unit_new:0
331+msgid "New Price Unit"
332+msgstr ""
333+
334+#. module: purchase_recalculation
335+#: field:stock.picking.update.line,quantity_new:0
336+msgid "New Quantity"
337+msgstr ""
338+
339+#. module: purchase_recalculation
340+#: field:account.product.cost.recalculation,period_id:0
341+#: field:account.product.cost.set,period_id:0
342+#: field:product.period.cost,period_id:0
343+msgid "Period"
344+msgstr ""
345+
346+#. module: purchase_recalculation
347+#: help:account.product.cost.recalculation,period_id:0
348+#: help:account.product.cost.set,period_id:0
349+msgid "Period for which recalculation will be done."
350+msgstr ""
351+
352+#. module: purchase_recalculation
353+#: field:stock.picking.update,picking_id:0
354 msgid "Picking"
355 msgstr ""
356
357 #. module: purchase_recalculation
358-#: model:ir.actions.act_window,name:purchase_recalculation.action_update_values
359-#: view:stock.picking:0
360-#: view:stock.update.values:0
361-msgid "Update Values"
362-msgstr ""
363-
364-#. module: purchase_recalculation
365-#: model:ir.model,name:purchase_recalculation.model_stock_update_values_line
366-msgid "stock.update.values.line"
367-msgstr ""
368-
369-#. module: purchase_recalculation
370-#: view:stock.update.values.line:0
371-msgid "Stock Product Line"
372-msgstr ""
373-
374-#. module: purchase_recalculation
375-#: view:stock.update.values.line:0
376-msgid "Product Returns"
377-msgstr ""
378-
379-#. module: purchase_recalculation
380+#: code:_description:0
381+#: model:ir.model,name:purchase_recalculation.model_stock_picking
382+#, python-format
383+msgid "Picking List"
384+msgstr ""
385+
386+#. module: purchase_recalculation
387+#: field:stock.picking.update.line,price_unit:0
388+msgid "Price Unit"
389+msgstr ""
390+
391+#. module: purchase_recalculation
392+#: code:_description:0
393 #: field:account.product.cost.recalculation,product_id:0
394+#: field:account.product.cost.set,product_id:0
395 #: model:ir.model,name:purchase_recalculation.model_product_product
396-#: field:stock.update.values.line,product_id:0
397+#: field:product.period.cost,product_id:0
398+#: field:stock.picking.update.line,product_id:0
399+#, python-format
400 msgid "Product"
401 msgstr ""
402
403 #. module: purchase_recalculation
404-#: code:addons/purchase_recalculation/account_invoice.py:52
405-#: code:addons/purchase_recalculation/account_invoice.py:56
406-#: code:addons/purchase_recalculation/product.py:128
407-#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:60
408+#: code:_description:0
409+#: model:ir.model,name:purchase_recalculation.model_product_period_cost
410 #, python-format
411-msgid "Error!"
412-msgstr ""
413-
414-#. module: purchase_recalculation
415-#: field:stock.update.values.line,price_unit:0
416-msgid "Price Unit"
417-msgstr ""
418-
419-#. module: purchase_recalculation
420-#: field:stock.update.values.line,quantity:0
421+msgid "Product Cost By Period"
422+msgstr ""
423+
424+#. module: purchase_recalculation
425+#: field:stock.picking.update,move_ids:0
426+msgid "Product Lines"
427+msgstr ""
428+
429+#. module: purchase_recalculation
430+#: view:stock.picking.update.line:0
431+msgid "Product Returns"
432+msgstr ""
433+
434+#. module: purchase_recalculation
435+#: help:account.product.cost.recalculation,product_id:0
436+#: help:account.product.cost.set,product_id:0
437+msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
438+msgstr ""
439+
440+#. module: purchase_recalculation
441+#: field:stock.picking.update.line,quantity:0
442 msgid "Quantity"
443 msgstr ""
444
445 #. module: purchase_recalculation
446-#: field:stock.update.values,move_ids:0
447-msgid "Product Lines"
448-msgstr ""
449-
450-#. module: purchase_recalculation
451-#: code:addons/purchase_recalculation/product.py:128
452+#: view:account.product.cost.recalculation:0
453+msgid "Recalculate Costs"
454+msgstr ""
455+
456+#. module: purchase_recalculation
457+#: code:_description:0
458+#: view:account.product.cost.recalculation:0
459+#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
460+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
461+#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
462+#, python-format
463+msgid "Recalculate Product Costs"
464+msgstr ""
465+
466+#. module: purchase_recalculation
467+#: code:_description:0
468+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_set
469+#, python-format
470+msgid "Set Product Costs"
471+msgstr ""
472+
473+#. module: purchase_recalculation
474+#: selection:account.product.cost.set,type:0
475+msgid "Set cost price on existing account move lines"
476+msgstr ""
477+
478+#. module: purchase_recalculation
479+#: view:account.product.cost.set:0
480+msgid "Set/Create Costs"
481+msgstr ""
482+
483+#. module: purchase_recalculation
484+#: view:account.product.cost.set:0
485+#: model:ir.actions.act_window,name:purchase_recalculation.action_set_product_cost
486+#: model:ir.ui.menu,name:purchase_recalculation.menu_set_product_cost
487+msgid "Set/Create Product Costs"
488+msgstr ""
489+
490+#. module: purchase_recalculation
491+#: code:addons/purchase_recalculation/product_product.py:186
492 #, python-format
493 msgid "Specify valuation accounts for product: %s."
494 msgstr ""
495
496 #. module: purchase_recalculation
497-#: code:addons/purchase_recalculation/account_invoice.py:56
498-#, python-format
499-msgid "Invoiced quantity is different than recieved quantity."
500-msgstr ""
501-
502-#. module: purchase_recalculation
503+#: code:_description:0
504 #: field:account.move.line,stock_move_id:0
505 #: model:ir.model,name:purchase_recalculation.model_stock_move
506+#, python-format
507 msgid "Stock Move"
508 msgstr ""
509
510 #. module: purchase_recalculation
511-#: field:stock.update.values.line,move_id:0
512-msgid "Move"
513-msgstr ""
514-
515-#. module: purchase_recalculation
516-#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:60
517+#: view:stock.picking.update:0
518+msgid "Transfer Products"
519+msgstr ""
520+
521+#. module: purchase_recalculation
522+#: field:account.product.cost.set,type:0
523+msgid "Type"
524+msgstr ""
525+
526+#. module: purchase_recalculation
527+#: code:_description:0
528+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update
529 #, python-format
530-msgid "Cannot find suitable dates for recalculation."
531-msgstr ""
532-
533-#. module: purchase_recalculation
534-#: field:account.product.cost.recalculation,period_id:0
535-msgid "Period"
536-msgstr ""
537-
538-#. module: purchase_recalculation
539-#: view:account.product.cost.recalculation:0
540-msgid "Recalculate Costs"
541-msgstr ""
542-
543-#. module: purchase_recalculation
544-#: view:account.product.cost.recalculation:0
545-#: view:stock.update.values:0
546+msgid "Update Picking Values Processing Wizard"
547+msgstr ""
548+
549+#. module: purchase_recalculation
550+#: model:ir.actions.act_window,name:purchase_recalculation.action_picking_update
551+#: view:stock.picking.in:0
552+#: view:stock.picking.out:0
553+#: view:stock.picking.update:0
554+msgid "Update Values"
555+msgstr ""
556+
557+#. module: purchase_recalculation
558+#: field:stock.picking.update.line,wizard_id:0
559+msgid "Wizard"
560+msgstr ""
561+
562+#. module: purchase_recalculation
563+#: view:account.product.cost.recalculation:0
564+#: view:account.product.cost.set:0
565+#: view:stock.picking.update:0
566 msgid "or"
567 msgstr ""
568
569 #. module: purchase_recalculation
570-#: model:ir.model,name:purchase_recalculation.model_account_invoice
571-msgid "Invoice"
572-msgstr ""
573-
574-#. module: purchase_recalculation
575-#: view:account.product.cost.recalculation:0
576-#: view:stock.update.values:0
577-msgid "Cancel"
578-msgstr ""
579-
580-#. module: purchase_recalculation
581-#: field:stock.update.values.line,quantity_new:0
582-msgid "New Quantity"
583+#: code:_description:0
584+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update_line
585+#, python-format
586+msgid "stock.picking.update.line"
587 msgstr ""
588
589
590=== modified file 'purchase_recalculation/i18n/purchase_recalculation.pot'
591--- purchase_recalculation/i18n/purchase_recalculation.pot 2014-03-17 07:50:11 +0000
592+++ purchase_recalculation/i18n/purchase_recalculation.pot 2014-04-10 09:10:37 +0000
593@@ -6,8 +6,8 @@
594 msgstr ""
595 "Project-Id-Version: OpenERP Server 7.0\n"
596 "Report-Msgid-Bugs-To: \n"
597-"POT-Creation-Date: 2013-10-03 07:50+0000\n"
598-"PO-Revision-Date: 2013-10-03 07:50+0000\n"
599+"POT-Creation-Date: 2014-04-10 08:29+0000\n"
600+"PO-Revision-Date: 2014-04-10 08:29+0000\n"
601 "Last-Translator: <>\n"
602 "Language-Team: \n"
603 "MIME-Version: 1.0\n"
604@@ -16,190 +16,278 @@
605 "Plural-Forms: \n"
606
607 #. module: purchase_recalculation
608-#: help:account.product.cost.recalculation,product_id:0
609-msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
610-msgstr ""
611-
612-#. module: purchase_recalculation
613-#: field:stock.update.values,date_delivered:0
614+#: view:account.product.cost.recalculation:0
615+#: view:account.product.cost.set:0
616+#: view:stock.picking.update:0
617+msgid "Cancel"
618+msgstr ""
619+
620+#. module: purchase_recalculation
621+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
622+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
623+#, python-format
624+msgid "Cannot find suitable dates for recalculation."
625+msgstr ""
626+
627+#. module: purchase_recalculation
628+#: view:stock.picking.update:0
629+msgid "Confirm"
630+msgstr ""
631+
632+#. module: purchase_recalculation
633+#: field:product.period.cost,price_unit:0
634+msgid "Cost for period"
635+msgstr ""
636+
637+#. module: purchase_recalculation
638+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
639+#, python-format
640+msgid "Cost price for selected period does not exist!"
641+msgstr ""
642+
643+#. module: purchase_recalculation
644+#: selection:account.product.cost.set,type:0
645+msgid "Create new cost move per period"
646+msgstr ""
647+
648+#. module: purchase_recalculation
649+#: selection:account.product.cost.set,type:0
650+msgid "Create new cost move per period/product"
651+msgstr ""
652+
653+#. module: purchase_recalculation
654+#: selection:account.product.cost.set,type:0
655+msgid "Create new cost move per period/product category"
656+msgstr ""
657+
658+#. module: purchase_recalculation
659+#: field:stock.picking.update,date_delivered:0
660 msgid "Date delivered"
661 msgstr ""
662
663 #. module: purchase_recalculation
664+#: code:_description:0
665+#: model:ir.model,name:purchase_recalculation.model_stock_picking_out
666+#, python-format
667+msgid "Delivery Orders"
668+msgstr ""
669+
670+#. module: purchase_recalculation
671+#: code:addons/purchase_recalculation/account_invoice.py:90
672+#: code:addons/purchase_recalculation/product_product.py:186
673+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
674+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
675+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
676+#, python-format
677+msgid "Error!"
678+msgstr ""
679+
680+#. module: purchase_recalculation
681+#: code:_description:0
682 #: model:ir.model,name:purchase_recalculation.model_stock_picking_in
683+#, python-format
684 msgid "Incoming Shipments"
685 msgstr ""
686
687 #. module: purchase_recalculation
688-#: help:account.product.cost.recalculation,period_id:0
689-msgid "Period for which recalculation will be done. If not set recalculation will be done for whole fiscal year."
690-msgstr ""
691-
692-#. module: purchase_recalculation
693-#: model:ir.model,name:purchase_recalculation.model_stock_update_values
694-msgid "Update Values Processing Wizard"
695-msgstr ""
696-
697-#. module: purchase_recalculation
698-#: field:stock.update.values.line,wizard_id:0
699-msgid "Wizard"
700-msgstr ""
701-
702-#. module: purchase_recalculation
703-#: view:stock.update.values:0
704-msgid "Confirm"
705-msgstr ""
706-
707-#. module: purchase_recalculation
708-#: code:addons/purchase_recalculation/account_invoice.py:52
709-#, python-format
710-msgid "Invoiced stock moves are not in same period as invoice."
711-msgstr ""
712-
713-#. module: purchase_recalculation
714-#: view:stock.update.values:0
715-msgid "Product Moves"
716-msgstr ""
717-
718-#. module: purchase_recalculation
719-#: view:stock.update.values:0
720-msgid "Transfer Products"
721-msgstr ""
722-
723-#. module: purchase_recalculation
724-#: field:stock.update.values.line,price_unit_new:0
725-msgid "New Price Unit"
726-msgstr ""
727-
728-#. module: purchase_recalculation
729-#: view:account.product.cost.recalculation:0
730-#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
731-#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
732-#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
733-msgid "Recalculate Product Costs"
734-msgstr ""
735-
736-#. module: purchase_recalculation
737+#: code:_description:0
738+#: model:ir.model,name:purchase_recalculation.model_account_invoice
739+#, python-format
740+msgid "Invoice"
741+msgstr ""
742+
743+#. module: purchase_recalculation
744+#: code:addons/purchase_recalculation/account_invoice.py:90
745+#, python-format
746+msgid "Invoiced quantity is different than recieved quantity.\n"
747+""
748+msgstr ""
749+
750+#. module: purchase_recalculation
751+#: code:_description:0
752 #: model:ir.model,name:purchase_recalculation.model_account_move_line
753+#, python-format
754 msgid "Journal Items"
755 msgstr ""
756
757 #. module: purchase_recalculation
758-#: field:stock.update.values,picking_id:0
759+#: field:stock.picking.update.line,move_id:0
760+msgid "Move"
761+msgstr ""
762+
763+#. module: purchase_recalculation
764+#: field:stock.picking.update.line,price_unit_new:0
765+msgid "New Price Unit"
766+msgstr ""
767+
768+#. module: purchase_recalculation
769+#: field:stock.picking.update.line,quantity_new:0
770+msgid "New Quantity"
771+msgstr ""
772+
773+#. module: purchase_recalculation
774+#: field:account.product.cost.recalculation,period_id:0
775+#: field:account.product.cost.set,period_id:0
776+#: field:product.period.cost,period_id:0
777+msgid "Period"
778+msgstr ""
779+
780+#. module: purchase_recalculation
781+#: help:account.product.cost.recalculation,period_id:0
782+#: help:account.product.cost.set,period_id:0
783+msgid "Period for which recalculation will be done."
784+msgstr ""
785+
786+#. module: purchase_recalculation
787+#: field:stock.picking.update,picking_id:0
788 msgid "Picking"
789 msgstr ""
790
791 #. module: purchase_recalculation
792-#: model:ir.actions.act_window,name:purchase_recalculation.action_update_values
793-#: view:stock.picking:0
794-#: view:stock.update.values:0
795-msgid "Update Values"
796-msgstr ""
797-
798-#. module: purchase_recalculation
799-#: model:ir.model,name:purchase_recalculation.model_stock_update_values_line
800-msgid "stock.update.values.line"
801-msgstr ""
802-
803-#. module: purchase_recalculation
804-#: view:stock.update.values.line:0
805-msgid "Stock Product Line"
806-msgstr ""
807-
808-#. module: purchase_recalculation
809-#: view:stock.update.values.line:0
810-msgid "Product Returns"
811-msgstr ""
812-
813-#. module: purchase_recalculation
814+#: code:_description:0
815+#: model:ir.model,name:purchase_recalculation.model_stock_picking
816+#, python-format
817+msgid "Picking List"
818+msgstr ""
819+
820+#. module: purchase_recalculation
821+#: field:stock.picking.update.line,price_unit:0
822+msgid "Price Unit"
823+msgstr ""
824+
825+#. module: purchase_recalculation
826+#: code:_description:0
827 #: field:account.product.cost.recalculation,product_id:0
828+#: field:account.product.cost.set,product_id:0
829 #: model:ir.model,name:purchase_recalculation.model_product_product
830-#: field:stock.update.values.line,product_id:0
831+#: field:product.period.cost,product_id:0
832+#: field:stock.picking.update.line,product_id:0
833+#, python-format
834 msgid "Product"
835 msgstr ""
836
837 #. module: purchase_recalculation
838-#: code:addons/purchase_recalculation/account_invoice.py:52
839-#: code:addons/purchase_recalculation/account_invoice.py:56
840-#: code:addons/purchase_recalculation/product.py:128
841-#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:60
842+#: code:_description:0
843+#: model:ir.model,name:purchase_recalculation.model_product_period_cost
844 #, python-format
845-msgid "Error!"
846-msgstr ""
847-
848-#. module: purchase_recalculation
849-#: field:stock.update.values.line,price_unit:0
850-msgid "Price Unit"
851-msgstr ""
852-
853-#. module: purchase_recalculation
854-#: field:stock.update.values.line,quantity:0
855+msgid "Product Cost By Period"
856+msgstr ""
857+
858+#. module: purchase_recalculation
859+#: field:stock.picking.update,move_ids:0
860+msgid "Product Lines"
861+msgstr ""
862+
863+#. module: purchase_recalculation
864+#: view:stock.picking.update.line:0
865+msgid "Product Returns"
866+msgstr ""
867+
868+#. module: purchase_recalculation
869+#: help:account.product.cost.recalculation,product_id:0
870+#: help:account.product.cost.set,product_id:0
871+msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
872+msgstr ""
873+
874+#. module: purchase_recalculation
875+#: field:stock.picking.update.line,quantity:0
876 msgid "Quantity"
877 msgstr ""
878
879 #. module: purchase_recalculation
880-#: field:stock.update.values,move_ids:0
881-msgid "Product Lines"
882-msgstr ""
883-
884-#. module: purchase_recalculation
885-#: code:addons/purchase_recalculation/product.py:128
886+#: view:account.product.cost.recalculation:0
887+msgid "Recalculate Costs"
888+msgstr ""
889+
890+#. module: purchase_recalculation
891+#: code:_description:0
892+#: view:account.product.cost.recalculation:0
893+#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
894+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
895+#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
896+#, python-format
897+msgid "Recalculate Product Costs"
898+msgstr ""
899+
900+#. module: purchase_recalculation
901+#: code:_description:0
902+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_set
903+#, python-format
904+msgid "Set Product Costs"
905+msgstr ""
906+
907+#. module: purchase_recalculation
908+#: selection:account.product.cost.set,type:0
909+msgid "Set cost price on existing account move lines"
910+msgstr ""
911+
912+#. module: purchase_recalculation
913+#: view:account.product.cost.set:0
914+msgid "Set/Create Costs"
915+msgstr ""
916+
917+#. module: purchase_recalculation
918+#: view:account.product.cost.set:0
919+#: model:ir.actions.act_window,name:purchase_recalculation.action_set_product_cost
920+#: model:ir.ui.menu,name:purchase_recalculation.menu_set_product_cost
921+msgid "Set/Create Product Costs"
922+msgstr ""
923+
924+#. module: purchase_recalculation
925+#: code:addons/purchase_recalculation/product_product.py:186
926 #, python-format
927 msgid "Specify valuation accounts for product: %s."
928 msgstr ""
929
930 #. module: purchase_recalculation
931-#: code:addons/purchase_recalculation/account_invoice.py:56
932-#, python-format
933-msgid "Invoiced quantity is different than recieved quantity."
934-msgstr ""
935-
936-#. module: purchase_recalculation
937+#: code:_description:0
938 #: field:account.move.line,stock_move_id:0
939 #: model:ir.model,name:purchase_recalculation.model_stock_move
940+#, python-format
941 msgid "Stock Move"
942 msgstr ""
943
944 #. module: purchase_recalculation
945-#: field:stock.update.values.line,move_id:0
946-msgid "Move"
947-msgstr ""
948-
949-#. module: purchase_recalculation
950-#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:60
951+#: view:stock.picking.update:0
952+msgid "Transfer Products"
953+msgstr ""
954+
955+#. module: purchase_recalculation
956+#: field:account.product.cost.set,type:0
957+msgid "Type"
958+msgstr ""
959+
960+#. module: purchase_recalculation
961+#: code:_description:0
962+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update
963 #, python-format
964-msgid "Cannot find suitable dates for recalculation."
965-msgstr ""
966-
967-#. module: purchase_recalculation
968-#: field:account.product.cost.recalculation,period_id:0
969-msgid "Period"
970-msgstr ""
971-
972-#. module: purchase_recalculation
973-#: view:account.product.cost.recalculation:0
974-msgid "Recalculate Costs"
975-msgstr ""
976-
977-#. module: purchase_recalculation
978-#: view:account.product.cost.recalculation:0
979-#: view:stock.update.values:0
980+msgid "Update Picking Values Processing Wizard"
981+msgstr ""
982+
983+#. module: purchase_recalculation
984+#: model:ir.actions.act_window,name:purchase_recalculation.action_picking_update
985+#: view:stock.picking.in:0
986+#: view:stock.picking.out:0
987+#: view:stock.picking.update:0
988+msgid "Update Values"
989+msgstr ""
990+
991+#. module: purchase_recalculation
992+#: field:stock.picking.update.line,wizard_id:0
993+msgid "Wizard"
994+msgstr ""
995+
996+#. module: purchase_recalculation
997+#: view:account.product.cost.recalculation:0
998+#: view:account.product.cost.set:0
999+#: view:stock.picking.update:0
1000 msgid "or"
1001 msgstr ""
1002
1003 #. module: purchase_recalculation
1004-#: model:ir.model,name:purchase_recalculation.model_account_invoice
1005-msgid "Invoice"
1006-msgstr ""
1007-
1008-#. module: purchase_recalculation
1009-#: view:account.product.cost.recalculation:0
1010-#: view:stock.update.values:0
1011-msgid "Cancel"
1012-msgstr ""
1013-
1014-#. module: purchase_recalculation
1015-#: field:stock.update.values.line,quantity_new:0
1016-msgid "New Quantity"
1017+#: code:_description:0
1018+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update_line
1019+#, python-format
1020+msgid "stock.picking.update.line"
1021 msgstr ""
1022
1023
1024=== added file 'purchase_recalculation/i18n/sl.po'
1025--- purchase_recalculation/i18n/sl.po 1970-01-01 00:00:00 +0000
1026+++ purchase_recalculation/i18n/sl.po 2014-04-10 09:10:37 +0000
1027@@ -0,0 +1,293 @@
1028+# Translation of OpenERP Server.
1029+# This file contains the translation of the following modules:
1030+# * purchase_recalculation
1031+#
1032+msgid ""
1033+msgstr ""
1034+"Project-Id-Version: OpenERP Server 7.0\n"
1035+"Report-Msgid-Bugs-To: \n"
1036+"POT-Creation-Date: 2014-04-10 08:29+0000\n"
1037+"PO-Revision-Date: 2014-04-10 08:29+0000\n"
1038+"Last-Translator: <>\n"
1039+"Language-Team: \n"
1040+"MIME-Version: 1.0\n"
1041+"Content-Type: text/plain; charset=UTF-8\n"
1042+"Content-Transfer-Encoding: \n"
1043+"Plural-Forms: \n"
1044+
1045+#. module: purchase_recalculation
1046+#: view:account.product.cost.recalculation:0
1047+#: view:account.product.cost.set:0
1048+#: view:stock.picking.update:0
1049+msgid "Cancel"
1050+msgstr "Prekliči"
1051+
1052+#. module: purchase_recalculation
1053+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
1054+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
1055+#, python-format
1056+msgid "Cannot find suitable dates for recalculation."
1057+msgstr "Ne najdem ustreznih datumov za preračun."
1058+
1059+#. module: purchase_recalculation
1060+#: view:stock.picking.update:0
1061+msgid "Confirm"
1062+msgstr "Potrdi"
1063+
1064+#. module: purchase_recalculation
1065+#: field:product.period.cost,price_unit:0
1066+msgid "Cost for period"
1067+msgstr "Strošek za obdobje"
1068+
1069+#. module: purchase_recalculation
1070+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
1071+#, python-format
1072+msgid "Cost price for selected period does not exist!"
1073+msgstr "Izračunan strošek za izbrano obdobje ne obstoja!"
1074+
1075+#. module: purchase_recalculation
1076+#: selection:account.product.cost.set,type:0
1077+msgid "Create new cost move per period"
1078+msgstr "Ustvari knjižbe za celotno obdobje"
1079+
1080+#. module: purchase_recalculation
1081+#: selection:account.product.cost.set,type:0
1082+msgid "Create new cost move per period/product"
1083+msgstr "Ustvari knjižbe za celotno obdobje ločeno po izdelku"
1084+
1085+#. module: purchase_recalculation
1086+#: selection:account.product.cost.set,type:0
1087+msgid "Create new cost move per period/product category"
1088+msgstr "Ustvari knjižbe za celotno obdobje ločeno po kategoriji izdelkov"
1089+
1090+#. module: purchase_recalculation
1091+#: field:stock.picking.update,date_delivered:0
1092+msgid "Date delivered"
1093+msgstr "Datum dobave"
1094+
1095+#. module: purchase_recalculation
1096+#: code:_description:0
1097+#: model:ir.model,name:purchase_recalculation.model_stock_picking_out
1098+#, python-format
1099+msgid "Delivery Orders"
1100+msgstr "Dobavnice"
1101+
1102+#. module: purchase_recalculation
1103+#: code:addons/purchase_recalculation/account_invoice.py:90
1104+#: code:addons/purchase_recalculation/product_product.py:186
1105+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
1106+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
1107+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
1108+#, python-format
1109+msgid "Error!"
1110+msgstr "Napaka!"
1111+
1112+#. module: purchase_recalculation
1113+#: code:_description:0
1114+#: model:ir.model,name:purchase_recalculation.model_stock_picking_in
1115+#, python-format
1116+msgid "Incoming Shipments"
1117+msgstr "Prejemnice"
1118+
1119+#. module: purchase_recalculation
1120+#: code:_description:0
1121+#: model:ir.model,name:purchase_recalculation.model_account_invoice
1122+#, python-format
1123+msgid "Invoice"
1124+msgstr "Račun"
1125+
1126+#. module: purchase_recalculation
1127+#: code:addons/purchase_recalculation/account_invoice.py:90
1128+#, python-format
1129+msgid "Invoiced quantity is different than recieved quantity.\n"
1130+""
1131+msgstr "Količina na računu se razlikuje od količine na prejemnici/dobavnici\n"
1132+""
1133+#. module: purchase_recalculation
1134+#: code:_description:0
1135+#: model:ir.model,name:purchase_recalculation.model_account_move_line
1136+#, python-format
1137+msgid "Journal Items"
1138+msgstr "Postavke temeljnice"
1139+
1140+#. module: purchase_recalculation
1141+#: field:stock.picking.update.line,move_id:0
1142+msgid "Move"
1143+msgstr "Premik"
1144+
1145+#. module: purchase_recalculation
1146+#: field:stock.picking.update.line,price_unit_new:0
1147+msgid "New Price Unit"
1148+msgstr "Nova cena na enoto"
1149+
1150+#. module: purchase_recalculation
1151+#: field:stock.picking.update.line,quantity_new:0
1152+msgid "New Quantity"
1153+msgstr "Nova količina"
1154+
1155+#. module: purchase_recalculation
1156+#: field:account.product.cost.recalculation,period_id:0
1157+#: field:account.product.cost.set,period_id:0
1158+#: field:product.period.cost,period_id:0
1159+msgid "Period"
1160+msgstr "Obdobje"
1161+
1162+#. module: purchase_recalculation
1163+#: help:account.product.cost.recalculation,period_id:0
1164+#: help:account.product.cost.set,period_id:0
1165+msgid "Period for which recalculation will be done."
1166+msgstr "Obdobje za katerega bojo izračunane cene."
1167+
1168+#. module: purchase_recalculation
1169+#: field:stock.picking.update,picking_id:0
1170+msgid "Picking"
1171+msgstr ""
1172+
1173+#. module: purchase_recalculation
1174+#: code:_description:0
1175+#: model:ir.model,name:purchase_recalculation.model_stock_picking
1176+#, python-format
1177+msgid "Picking List"
1178+msgstr ""
1179+
1180+#. module: purchase_recalculation
1181+#: field:stock.picking.update.line,price_unit:0
1182+msgid "Price Unit"
1183+msgstr "Cena na enoto"
1184+
1185+#. module: purchase_recalculation
1186+#: code:_description:0
1187+#: field:account.product.cost.recalculation,product_id:0
1188+#: field:account.product.cost.set,product_id:0
1189+#: model:ir.model,name:purchase_recalculation.model_product_product
1190+#: field:product.period.cost,product_id:0
1191+#: field:stock.picking.update.line,product_id:0
1192+#, python-format
1193+msgid "Product"
1194+msgstr "Izdelek"
1195+
1196+#. module: purchase_recalculation
1197+#: code:_description:0
1198+#: model:ir.model,name:purchase_recalculation.model_product_period_cost
1199+#, python-format
1200+msgid "Product Cost By Period"
1201+msgstr "Strošek izdelka po obdobjih"
1202+
1203+#. module: purchase_recalculation
1204+#: field:stock.picking.update,move_ids:0
1205+msgid "Product Lines"
1206+msgstr "Postavke"
1207+
1208+#. module: purchase_recalculation
1209+#: view:stock.picking.update.line:0
1210+msgid "Product Returns"
1211+msgstr "Vračila izdelkov"
1212+
1213+#. module: purchase_recalculation
1214+#: help:account.product.cost.recalculation,product_id:0
1215+#: help:account.product.cost.set,product_id:0
1216+msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
1217+msgstr "Izdelek za katerega bo izračunan strošek. Če ni določen noben izdelek bojo izračunani stroški za vse izdelke s povprečno vrednostjo stroška"
1218+
1219+#. module: purchase_recalculation
1220+#: field:stock.picking.update.line,quantity:0
1221+msgid "Quantity"
1222+msgstr "Količina"
1223+
1224+#. module: purchase_recalculation
1225+#: view:account.product.cost.recalculation:0
1226+msgid "Recalculate Costs"
1227+msgstr "Preračunaj stroške"
1228+
1229+#. module: purchase_recalculation
1230+#: code:_description:0
1231+#: view:account.product.cost.recalculation:0
1232+#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
1233+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
1234+#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
1235+#, python-format
1236+msgid "Recalculate Product Costs"
1237+msgstr "Preračunaj stroške"
1238+
1239+#. module: purchase_recalculation
1240+#: code:_description:0
1241+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_set
1242+#, python-format
1243+msgid "Set Product Costs"
1244+msgstr "Zaknjiži stroške"
1245+
1246+#. module: purchase_recalculation
1247+#: selection:account.product.cost.set,type:0
1248+msgid "Set cost price on existing account move lines"
1249+msgstr "Popravi stroške na obstoječih knjižbah"
1250+
1251+#. module: purchase_recalculation
1252+#: view:account.product.cost.set:0
1253+msgid "Set/Create Costs"
1254+msgstr "Popravi/ustvari knjižbe stroškov"
1255+
1256+#. module: purchase_recalculation
1257+#: view:account.product.cost.set:0
1258+#: model:ir.actions.act_window,name:purchase_recalculation.action_set_product_cost
1259+#: model:ir.ui.menu,name:purchase_recalculation.menu_set_product_cost
1260+msgid "Set/Create Product Costs"
1261+msgstr "Popravi/ustvari knjižbe stroškov"
1262+
1263+#. module: purchase_recalculation
1264+#: code:addons/purchase_recalculation/product_product.py:186
1265+#, python-format
1266+msgid "Specify valuation accounts for product: %s."
1267+msgstr "Nastavi konte zaloge za izdelke: %s."
1268+
1269+#. module: purchase_recalculation
1270+#: code:_description:0
1271+#: field:account.move.line,stock_move_id:0
1272+#: model:ir.model,name:purchase_recalculation.model_stock_move
1273+#, python-format
1274+msgid "Stock Move"
1275+msgstr "Premik zaloge"
1276+
1277+#. module: purchase_recalculation
1278+#: view:stock.picking.update:0
1279+msgid "Transfer Products"
1280+msgstr ""
1281+
1282+#. module: purchase_recalculation
1283+#: field:account.product.cost.set,type:0
1284+msgid "Type"
1285+msgstr "Način"
1286+
1287+#. module: purchase_recalculation
1288+#: code:_description:0
1289+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update
1290+#, python-format
1291+msgid "Update Picking Values Processing Wizard"
1292+msgstr "Čarovnik za posodabljanje vrednosti na prejemih in izdajah"
1293+
1294+#. module: purchase_recalculation
1295+#: model:ir.actions.act_window,name:purchase_recalculation.action_picking_update
1296+#: view:stock.picking.in:0
1297+#: view:stock.picking.out:0
1298+#: view:stock.picking.update:0
1299+msgid "Update Values"
1300+msgstr "Posodobi vrednosti"
1301+
1302+#. module: purchase_recalculation
1303+#: field:stock.picking.update.line,wizard_id:0
1304+msgid "Wizard"
1305+msgstr "Čarovnik"
1306+
1307+#. module: purchase_recalculation
1308+#: view:account.product.cost.recalculation:0
1309+#: view:account.product.cost.set:0
1310+#: view:stock.picking.update:0
1311+msgid "or"
1312+msgstr ""
1313+
1314+#. module: purchase_recalculation
1315+#: code:_description:0
1316+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update_line
1317+#, python-format
1318+msgid "stock.picking.update.line"
1319+msgstr ""
1320+
1321
1322=== modified file 'purchase_recalculation/i18n/sl_SI.po'
1323--- purchase_recalculation/i18n/sl_SI.po 2014-03-17 07:50:11 +0000
1324+++ purchase_recalculation/i18n/sl_SI.po 2014-04-10 09:10:37 +0000
1325@@ -6,8 +6,8 @@
1326 msgstr ""
1327 "Project-Id-Version: OpenERP Server 7.0\n"
1328 "Report-Msgid-Bugs-To: \n"
1329-"POT-Creation-Date: 2013-10-03 07:50+0000\n"
1330-"PO-Revision-Date: 2013-10-03 07:50+0000\n"
1331+"POT-Creation-Date: 2014-04-10 08:29+0000\n"
1332+"PO-Revision-Date: 2014-04-10 08:29+0000\n"
1333 "Last-Translator: <>\n"
1334 "Language-Team: \n"
1335 "MIME-Version: 1.0\n"
1336@@ -16,189 +16,278 @@
1337 "Plural-Forms: \n"
1338
1339 #. module: purchase_recalculation
1340-#: help:account.product.cost.recalculation,product_id:0
1341-msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
1342-msgstr "Izdelek, za katerega želite preračunati vrednosti. Če vrednost ni določena se preračun izvede za vse izdelke, ki imajo promet v obdobju"
1343-
1344-#. module: purchase_recalculation
1345-#: field:stock.update.values,date_delivered:0
1346+#: view:account.product.cost.recalculation:0
1347+#: view:account.product.cost.set:0
1348+#: view:stock.picking.update:0
1349+msgid "Cancel"
1350+msgstr "Prekliči"
1351+
1352+#. module: purchase_recalculation
1353+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
1354+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
1355+#, python-format
1356+msgid "Cannot find suitable dates for recalculation."
1357+msgstr "Ne najdem ustreznih datumov za preračun."
1358+
1359+#. module: purchase_recalculation
1360+#: view:stock.picking.update:0
1361+msgid "Confirm"
1362+msgstr "Potrdi"
1363+
1364+#. module: purchase_recalculation
1365+#: field:product.period.cost,price_unit:0
1366+msgid "Cost for period"
1367+msgstr "Strošek za obdobje"
1368+
1369+#. module: purchase_recalculation
1370+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
1371+#, python-format
1372+msgid "Cost price for selected period does not exist!"
1373+msgstr "Izračunan strošek za izbrano obdobje ne obstoja!"
1374+
1375+#. module: purchase_recalculation
1376+#: selection:account.product.cost.set,type:0
1377+msgid "Create new cost move per period"
1378+msgstr "Ustvari knjižbe za celotno obdobje"
1379+
1380+#. module: purchase_recalculation
1381+#: selection:account.product.cost.set,type:0
1382+msgid "Create new cost move per period/product"
1383+msgstr "Ustvari knjižbe za celotno obdobje ločeno po izdelku"
1384+
1385+#. module: purchase_recalculation
1386+#: selection:account.product.cost.set,type:0
1387+msgid "Create new cost move per period/product category"
1388+msgstr "Ustvari knjižbe za celotno obdobje ločeno po kategoriji izdelkov"
1389+
1390+#. module: purchase_recalculation
1391+#: field:stock.picking.update,date_delivered:0
1392 msgid "Date delivered"
1393-msgstr "Datum prejema"
1394-
1395-#. module: purchase_recalculation
1396+msgstr "Datum dobave"
1397+
1398+#. module: purchase_recalculation
1399+#: code:_description:0
1400+#: model:ir.model,name:purchase_recalculation.model_stock_picking_out
1401+#, python-format
1402+msgid "Delivery Orders"
1403+msgstr "Dobavnice"
1404+
1405+#. module: purchase_recalculation
1406+#: code:addons/purchase_recalculation/account_invoice.py:90
1407+#: code:addons/purchase_recalculation/product_product.py:186
1408+#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:54
1409+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:59
1410+#: code:addons/purchase_recalculation/wizard/account_product_cost_set.py:112
1411+#, python-format
1412+msgid "Error!"
1413+msgstr "Napaka!"
1414+
1415+#. module: purchase_recalculation
1416+#: code:_description:0
1417 #: model:ir.model,name:purchase_recalculation.model_stock_picking_in
1418+#, python-format
1419 msgid "Incoming Shipments"
1420-msgstr "Prihajajoče pošiljke"
1421+msgstr "Prejemnice"
1422+
1423+#. module: purchase_recalculation
1424+#: code:_description:0
1425+#: model:ir.model,name:purchase_recalculation.model_account_invoice
1426+#, python-format
1427+msgid "Invoice"
1428+msgstr "Račun"
1429+
1430+#. module: purchase_recalculation
1431+#: code:addons/purchase_recalculation/account_invoice.py:90
1432+#, python-format
1433+msgid "Invoiced quantity is different than recieved quantity.\n"
1434+""
1435+msgstr "Količina na računu se razlikuje od količine na prejemnici/dobavnici\n"
1436+""
1437+#. module: purchase_recalculation
1438+#: code:_description:0
1439+#: model:ir.model,name:purchase_recalculation.model_account_move_line
1440+#, python-format
1441+msgid "Journal Items"
1442+msgstr "Postavke temeljnice"
1443+
1444+#. module: purchase_recalculation
1445+#: field:stock.picking.update.line,move_id:0
1446+msgid "Move"
1447+msgstr "Premik"
1448+
1449+#. module: purchase_recalculation
1450+#: field:stock.picking.update.line,price_unit_new:0
1451+msgid "New Price Unit"
1452+msgstr "Nova cena na enoto"
1453+
1454+#. module: purchase_recalculation
1455+#: field:stock.picking.update.line,quantity_new:0
1456+msgid "New Quantity"
1457+msgstr "Nova količina"
1458+
1459+#. module: purchase_recalculation
1460+#: field:account.product.cost.recalculation,period_id:0
1461+#: field:account.product.cost.set,period_id:0
1462+#: field:product.period.cost,period_id:0
1463+msgid "Period"
1464+msgstr "Obdobje"
1465
1466 #. module: purchase_recalculation
1467 #: help:account.product.cost.recalculation,period_id:0
1468+#: help:account.product.cost.set,period_id:0
1469 msgid "Period for which recalculation will be done."
1470-msgstr "Obdobje preračuna."
1471-
1472-#. module: purchase_recalculation
1473-#: model:ir.model,name:purchase_recalculation.model_stock_update_values
1474-msgid "Update Values Processing Wizard"
1475-msgstr "Čarovnik za spremembo vrednosti"
1476-
1477-#. module: purchase_recalculation
1478-#: field:stock.update.values.line,wizard_id:0
1479-msgid "Wizard"
1480-msgstr "Čarovnik"
1481-
1482-#. module: purchase_recalculation
1483-#: view:stock.update.values:0
1484-msgid "Confirm"
1485-msgstr "Potrdi"
1486-
1487-#. module: purchase_recalculation
1488-#: code:addons/purchase_recalculation/account_invoice.py:52
1489-#, python-format
1490-msgid "Invoiced stock moves are not in same period as invoice."
1491-msgstr "Obdobje računa in dobavnice ni isto."
1492-
1493-#. module: purchase_recalculation
1494-#: view:stock.update.values:0
1495-msgid "Product Moves"
1496-msgstr ""
1497-
1498-#. module: purchase_recalculation
1499-#: view:stock.update.values:0
1500-msgid "Transfer Products"
1501-msgstr ""
1502-
1503-#. module: purchase_recalculation
1504-#: field:stock.update.values.line,price_unit_new:0
1505-msgid "New Price Unit"
1506-msgstr "Nova cena enote"
1507-
1508-#. module: purchase_recalculation
1509-#: view:account.product.cost.recalculation:0
1510-#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
1511-#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
1512-#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
1513-msgid "Recalculate Product Costs"
1514-msgstr "Preračun stroškov izdelkov"
1515-
1516-#. module: purchase_recalculation
1517-#: model:ir.model,name:purchase_recalculation.model_account_move_line
1518-msgid "Journal Items"
1519-msgstr ""
1520-
1521-#. module: purchase_recalculation
1522-#: field:stock.update.values,picking_id:0
1523+msgstr "Obdobje za katerega bojo izračunane cene."
1524+
1525+#. module: purchase_recalculation
1526+#: field:stock.picking.update,picking_id:0
1527 msgid "Picking"
1528 msgstr ""
1529
1530 #. module: purchase_recalculation
1531-#: model:ir.actions.act_window,name:purchase_recalculation.action_update_values
1532-#: view:stock.picking:0
1533-#: view:stock.update.values:0
1534-msgid "Update Values"
1535-msgstr "Posodobi vrednosti"
1536-
1537-#. module: purchase_recalculation
1538-#: model:ir.model,name:purchase_recalculation.model_stock_update_values_line
1539-msgid "stock.update.values.line"
1540-msgstr ""
1541-
1542-#. module: purchase_recalculation
1543-#: view:stock.update.values.line:0
1544-msgid "Stock Product Line"
1545-msgstr ""
1546-
1547-#. module: purchase_recalculation
1548-#: view:stock.update.values.line:0
1549-msgid "Product Returns"
1550-msgstr ""
1551-
1552-#. module: purchase_recalculation
1553+#: code:_description:0
1554+#: model:ir.model,name:purchase_recalculation.model_stock_picking
1555+#, python-format
1556+msgid "Picking List"
1557+msgstr ""
1558+
1559+#. module: purchase_recalculation
1560+#: field:stock.picking.update.line,price_unit:0
1561+msgid "Price Unit"
1562+msgstr "Cena na enoto"
1563+
1564+#. module: purchase_recalculation
1565+#: code:_description:0
1566 #: field:account.product.cost.recalculation,product_id:0
1567+#: field:account.product.cost.set,product_id:0
1568 #: model:ir.model,name:purchase_recalculation.model_product_product
1569-#: field:stock.update.values.line,product_id:0
1570+#: field:product.period.cost,product_id:0
1571+#: field:stock.picking.update.line,product_id:0
1572+#, python-format
1573 msgid "Product"
1574-msgstr ""
1575+msgstr "Izdelek"
1576
1577 #. module: purchase_recalculation
1578-#: code:addons/purchase_recalculation/account_invoice.py:52
1579-#: code:addons/purchase_recalculation/account_invoice.py:56
1580-#: code:addons/purchase_recalculation/product.py:128
1581-#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:60
1582+#: code:_description:0
1583+#: model:ir.model,name:purchase_recalculation.model_product_period_cost
1584 #, python-format
1585-msgid "Error!"
1586-msgstr ""
1587-
1588-#. module: purchase_recalculation
1589-#: field:stock.update.values.line,price_unit:0
1590-msgid "Price Unit"
1591-msgstr ""
1592-
1593-#. module: purchase_recalculation
1594-#: field:stock.update.values.line,quantity:0
1595+msgid "Product Cost By Period"
1596+msgstr "Strošek izdelka po obdobjih"
1597+
1598+#. module: purchase_recalculation
1599+#: field:stock.picking.update,move_ids:0
1600+msgid "Product Lines"
1601+msgstr "Postavke"
1602+
1603+#. module: purchase_recalculation
1604+#: view:stock.picking.update.line:0
1605+msgid "Product Returns"
1606+msgstr "Vračila izdelkov"
1607+
1608+#. module: purchase_recalculation
1609+#: help:account.product.cost.recalculation,product_id:0
1610+#: help:account.product.cost.set,product_id:0
1611+msgid "Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"
1612+msgstr "Izdelek za katerega bo izračunan strošek. Če ni določen noben izdelek bojo izračunani stroški za vse izdelke s povprečno vrednostjo stroška"
1613+
1614+#. module: purchase_recalculation
1615+#: field:stock.picking.update.line,quantity:0
1616 msgid "Quantity"
1617-msgstr ""
1618-
1619-#. module: purchase_recalculation
1620-#: field:stock.update.values,move_ids:0
1621-msgid "Product Lines"
1622-msgstr ""
1623-
1624-#. module: purchase_recalculation
1625-#: code:addons/purchase_recalculation/product.py:128
1626+msgstr "Količina"
1627+
1628+#. module: purchase_recalculation
1629+#: view:account.product.cost.recalculation:0
1630+msgid "Recalculate Costs"
1631+msgstr "Preračunaj stroške"
1632+
1633+#. module: purchase_recalculation
1634+#: code:_description:0
1635+#: view:account.product.cost.recalculation:0
1636+#: model:ir.actions.act_window,name:purchase_recalculation.action_recalculate_product_cost
1637+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_recalculation
1638+#: model:ir.ui.menu,name:purchase_recalculation.menu_recalculate_product_cost
1639+#, python-format
1640+msgid "Recalculate Product Costs"
1641+msgstr "Preračunaj stroške"
1642+
1643+#. module: purchase_recalculation
1644+#: code:_description:0
1645+#: model:ir.model,name:purchase_recalculation.model_account_product_cost_set
1646+#, python-format
1647+msgid "Set Product Costs"
1648+msgstr "Zaknjiži stroške"
1649+
1650+#. module: purchase_recalculation
1651+#: selection:account.product.cost.set,type:0
1652+msgid "Set cost price on existing account move lines"
1653+msgstr "Popravi stroške na obstoječih knjižbah"
1654+
1655+#. module: purchase_recalculation
1656+#: view:account.product.cost.set:0
1657+msgid "Set/Create Costs"
1658+msgstr "Popravi/ustvari knjižbe stroškov"
1659+
1660+#. module: purchase_recalculation
1661+#: view:account.product.cost.set:0
1662+#: model:ir.actions.act_window,name:purchase_recalculation.action_set_product_cost
1663+#: model:ir.ui.menu,name:purchase_recalculation.menu_set_product_cost
1664+msgid "Set/Create Product Costs"
1665+msgstr "Popravi/ustvari knjižbe stroškov"
1666+
1667+#. module: purchase_recalculation
1668+#: code:addons/purchase_recalculation/product_product.py:186
1669 #, python-format
1670 msgid "Specify valuation accounts for product: %s."
1671-msgstr ""
1672-
1673-#. module: purchase_recalculation
1674-#: code:addons/purchase_recalculation/account_invoice.py:56
1675-#, python-format
1676-msgid "Invoiced quantity is different than recieved quantity."
1677-msgstr "Količina na računu ne ustreza količina na prejemnici."
1678-
1679-#. module: purchase_recalculation
1680+msgstr "Nastavi konte zaloge za izdelke: %s."
1681+
1682+#. module: purchase_recalculation
1683+#: code:_description:0
1684 #: field:account.move.line,stock_move_id:0
1685 #: model:ir.model,name:purchase_recalculation.model_stock_move
1686+#, python-format
1687 msgid "Stock Move"
1688-msgstr ""
1689-
1690-#. module: purchase_recalculation
1691-#: field:stock.update.values.line,move_id:0
1692-msgid "Move"
1693-msgstr ""
1694-
1695-#. module: purchase_recalculation
1696-#: code:addons/purchase_recalculation/wizard/account_product_cost_recalculation.py:60
1697+msgstr "Premik zaloge"
1698+
1699+#. module: purchase_recalculation
1700+#: view:stock.picking.update:0
1701+msgid "Transfer Products"
1702+msgstr ""
1703+
1704+#. module: purchase_recalculation
1705+#: field:account.product.cost.set,type:0
1706+msgid "Type"
1707+msgstr "Način"
1708+
1709+#. module: purchase_recalculation
1710+#: code:_description:0
1711+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update
1712 #, python-format
1713-msgid "Cannot find suitable dates for recalculation."
1714-msgstr "Ne najdem ustreznih obdobij."
1715-
1716-#. module: purchase_recalculation
1717-#: field:account.product.cost.recalculation,period_id:0
1718-msgid "Period"
1719-msgstr ""
1720-
1721-#. module: purchase_recalculation
1722-#: view:account.product.cost.recalculation:0
1723-msgid "Recalculate Costs"
1724-msgstr "Preračunaj stroške"
1725-
1726-#. module: purchase_recalculation
1727-#: view:account.product.cost.recalculation:0
1728-#: view:stock.update.values:0
1729+msgid "Update Picking Values Processing Wizard"
1730+msgstr "Čarovnik za posodabljanje vrednosti na prejemih in izdajah"
1731+
1732+#. module: purchase_recalculation
1733+#: model:ir.actions.act_window,name:purchase_recalculation.action_picking_update
1734+#: view:stock.picking.in:0
1735+#: view:stock.picking.out:0
1736+#: view:stock.picking.update:0
1737+msgid "Update Values"
1738+msgstr "Posodobi vrednosti"
1739+
1740+#. module: purchase_recalculation
1741+#: field:stock.picking.update.line,wizard_id:0
1742+msgid "Wizard"
1743+msgstr "Čarovnik"
1744+
1745+#. module: purchase_recalculation
1746+#: view:account.product.cost.recalculation:0
1747+#: view:account.product.cost.set:0
1748+#: view:stock.picking.update:0
1749 msgid "or"
1750 msgstr ""
1751
1752 #. module: purchase_recalculation
1753-#: model:ir.model,name:purchase_recalculation.model_account_invoice
1754-msgid "Invoice"
1755-msgstr ""
1756-
1757-#. module: purchase_recalculation
1758-#: view:account.product.cost.recalculation:0
1759-#: view:stock.update.values:0
1760-msgid "Cancel"
1761-msgstr ""
1762-
1763-#. module: purchase_recalculation
1764-#: field:stock.update.values.line,quantity_new:0
1765-msgid "New Quantity"
1766-msgstr "Nova količina"
1767+#: code:_description:0
1768+#: model:ir.model,name:purchase_recalculation.model_stock_picking_update_line
1769+#, python-format
1770+msgid "stock.picking.update.line"
1771+msgstr ""
1772+
1773
1774=== modified file 'purchase_recalculation/product_product.py'
1775--- purchase_recalculation/product_product.py 2014-03-26 13:18:24 +0000
1776+++ purchase_recalculation/product_product.py 2014-04-10 09:10:37 +0000
1777@@ -29,6 +29,17 @@
1778 class product_product(osv.Model):
1779 _inherit="product.product"
1780
1781+ def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
1782+ res = super(product_product, self).read(cr, uid, ids, fields, context, load)
1783+ if context.get('active_model', False) \
1784+ and context.get('active_model') == 'stock.location.product' \
1785+ and context.get('from_date', False) \
1786+ and context.get('to_date', False) \
1787+ and 'standard_price' in fields:
1788+ res1 = {}
1789+ res1 = res
1790+ return res
1791+
1792 def _get_stock_and_cost_inventory(self, cr, uid, ids, dates, context):
1793 if dates is None:
1794 dates = {}
1795@@ -39,16 +50,16 @@
1796 _inventory_line_ids = self.pool.get('stock.inventory.line').search(cr, uid, [('product_id','=',ids[0])])
1797 _inventory_lines = self.pool.get('stock.inventory.line').browse(cr, uid, _inventory_line_ids, context)
1798 for _inventory_line in _inventory_lines:
1799- if _inventory_line.inventory_id.state == 'done' \
1800- and _inventory_line.inventory_id.date > _date_from:
1801+ if _inventory_line.inventory_id.date_done >= _date_from \
1802+ and _inventory_line.inventory_id.date_done <= _date_to \
1803+ and _inventory_line.inventory_id.state == 'done':
1804 for _move_line in _inventory_line.inventory_id.move_ids:
1805- if _move_line.product_id.id == ids[0]:
1806- _stock = _stock + _move_line.product_qty
1807- _acc_move_line_id = self.pool.get('account.move.line').search(cr, uid, [('stock_move_id','=',_move_line.id)], limit=1)
1808- if len(_acc_move_line_id) <> 0:
1809- _acc_move_line = self.pool.get('account.move.line').browse(cr, uid, _acc_move_line_id[0], context)
1810- if _acc_move_line:
1811- _cost = _acc_move_line.debit + _acc_move_line.credit
1812+ _stock = _stock + _move_line.product_qty
1813+ _acc_move_line_id = self.pool.get('account.move.line').search(cr, uid, [('stock_move_id','=',_move_line.id)], limit=1)
1814+ if len(_acc_move_line_id) <> 0:
1815+ _acc_move_line = self.pool.get('account.move.line').browse(cr, uid, _acc_move_line_id[0], context)
1816+ if _acc_move_line:
1817+ _cost = _acc_move_line.debit + _acc_move_line.credit
1818 return [_stock, _cost]
1819
1820 def _get_stock_and_cost(self, cr, uid, ids, dates, context):
1821@@ -86,15 +97,16 @@
1822 _sql_string = ' SELECT sm.id \n' \
1823 ' FROM stock_move AS sm \n' \
1824 ' WHERE sm.product_id = {product} \n' \
1825- ' AND sm.date >= \'{date_from}\' \n' \
1826 ' AND sm.date < \'{date_to}\' \n' \
1827 ' AND sm.state = \'done\' \n' \
1828 ' AND NOT EXISTS (SELECT inv.move_id \n' \
1829 ' FROM stock_inventory_move_rel AS inv \n' \
1830 ' WHERE inv.move_id = sm.id) \n ' \
1831- 'ORDER BY sm.date'.format(product = ids[0],
1832- date_from = _date_from,
1833- date_to = _date_to).replace(',)', ')')
1834+ 'ORDER BY sm.date;'.format(product = ids[0],
1835+ date_from = _date_from,
1836+ date_to = _date_to).replace(',)', ')')
1837+
1838+
1839 cr.execute(_sql_string)
1840 _move_tups = cr.fetchall()
1841 _move_ids = []
1842@@ -110,6 +122,7 @@
1843
1844 if _stock == 0.0:
1845 _cost = 0.0
1846+ _period = False
1847 else:
1848 _cost = _cost * _stock
1849
1850@@ -157,22 +170,22 @@
1851 def _set_period_cost(self, cr, uid, ids, dates, digits, average_price, context):
1852 if dates is None:
1853 dates = {}
1854-
1855+
1856 _product_id = self.pool.get('product.product').browse(cr, uid, ids[0], context)
1857-
1858+
1859 accounts = self.pool.get('product.product').get_product_accounts(cr, uid, _product_id.id, context)
1860 accounts['stock_account_expense'] = _product_id.property_account_expense and _product_id.property_account_expense.id or False
1861 if not accounts['stock_account_expense']:
1862 accounts['stock_account_expense'] = _product_id.categ_id.property_account_expense_categ and _product_id.categ_id.property_account_expense_categ.id or False
1863-
1864+
1865 if not accounts['stock_journal'] \
1866 or not accounts['stock_account_input'] \
1867 or not accounts['stock_account_output'] \
1868 or not accounts['property_stock_valuation_account_id'] \
1869 or not accounts['stock_account_expense']:
1870 raise osv.except_osv(_('Error!'), _('Specify valuation accounts for product: %s.') % (_product_id.name))
1871-
1872-
1873+
1874+
1875 _date_from = dates.get('date_from', False)
1876 _date_to = dates.get('date_to', False)
1877 if _date_from and _date_to:
1878@@ -198,7 +211,7 @@
1879 _stock_move_ids = []
1880 for _tup in _stock_move_tups:
1881 _stock_move_ids.append(_tup[0])
1882-
1883+
1884 if len(_stock_move_ids) > 0:
1885 # popravim cene na stock_move
1886 _sql_string = 'UPDATE stock_move \n' \
1887@@ -208,7 +221,7 @@
1888 stock_moves = tuple(_stock_move_ids)).replace(',)', ')')
1889 #print _sql_string
1890 cr.execute(_sql_string)
1891-
1892+
1893 # popravim vse ustrezne stock_journale
1894 _journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','stock')])
1895 _location_ids = self.pool.get('stock.location').search(cr, uid, [('usage','=','internal')])
1896@@ -251,7 +264,7 @@
1897 stock_journal = accounts['stock_journal']).replace(',)', ')')
1898 #print _sql_string
1899 cr.execute(_sql_string)
1900-
1901+
1902 # popravim vse knjižbe porabe na izdanih računih in dobropisih
1903 _journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','in',('sale', 'sale_refund'))])
1904 _sql_string = 'WITH aml AS (SELECT aml.id, \n' \
1905@@ -297,5 +310,5 @@
1906 date_to = _date_to).replace(',)', ')')
1907 #print _sql_string
1908 cr.execute(_sql_string)
1909-
1910+
1911 return True
1912
1913=== modified file 'purchase_recalculation/stock_move.py'
1914--- purchase_recalculation/stock_move.py 2014-04-01 06:32:13 +0000
1915+++ purchase_recalculation/stock_move.py 2014-04-10 09:10:37 +0000
1916@@ -35,18 +35,26 @@
1917 _credit_lines['stock_move_id'] = move.id
1918 return [(0, 0, _debit_lines), (0, 0, _credit_lines)]
1919
1920- def _move_update_values(self, cr, uid, ids, context, date_delivered, price_unit):
1921+ def _move_update_values(self, cr, uid, ids, context, date_delivered, quantity, price_unit):
1922 _costs_installed = self.pool.get('stock.move').fields_get(cr, uid, ['landing_costs_line_ids'], context) != {}
1923 _moves = self.pool.get('stock.move').browse(cr, uid, ids, context)
1924 for _move in _moves:
1925 if not date_delivered:
1926 date_delivered = _move.date
1927+ if not quantity:
1928+ quantity = _move.product_qty
1929 if _costs_installed:
1930+ if not price_unit:
1931+ price_unit = _move.price_unit_without_costs
1932 self.pool.get('stock.move').write(cr, uid, [_move.id], {'date': date_delivered,
1933+ 'product_qty': quantity,
1934 'price_unit': price_unit,
1935 'price_unit_without_costs': False})
1936 else:
1937+ if not price_unit:
1938+ price_unit = _move.price_unit
1939 self.pool.get('stock.move').write(cr, uid, [_move.id], {'date': date_delivered,
1940+ 'product_qty': quantity,
1941 'price_unit': price_unit})
1942
1943 return True
1944
1945=== modified file 'purchase_recalculation/stock_picking.py'
1946--- purchase_recalculation/stock_picking.py 2014-04-01 06:32:13 +0000
1947+++ purchase_recalculation/stock_picking.py 2014-04-10 09:10:37 +0000
1948@@ -49,7 +49,8 @@
1949 if _move_data == {}:
1950 continue
1951 _price_unit = _move_data.get('price_unit', False)
1952- self.pool.get('stock.move')._move_update_values(cr, uid, [_move.id], context, _date_delivered, _price_unit)
1953+ _quantity = _move_data.get('quantity', False)
1954+ self.pool.get('stock.move')._move_update_values(cr, uid, [_move.id], context, _date_delivered, _quantity, _price_unit)
1955 if _costs_installed and (_picking_has_costs or _moves_have_costs):
1956 self.pool.get('stock.move')._move_update_costs(cr, uid, _move_ids, context)
1957 self.pool.get('stock.move')._move_update_valuation(cr, uid, _move_ids, context)
1958
1959=== modified file 'purchase_recalculation/wizard/__init__.py'
1960--- purchase_recalculation/wizard/__init__.py 2014-03-17 07:50:11 +0000
1961+++ purchase_recalculation/wizard/__init__.py 2014-04-10 09:10:37 +0000
1962@@ -20,4 +20,5 @@
1963 ##############################################################################
1964
1965 import account_product_cost_recalculation
1966+import account_product_cost_set
1967 import stock_picking_update
1968\ No newline at end of file
1969
1970=== modified file 'purchase_recalculation/wizard/account_product_cost_recalculation.py'
1971--- purchase_recalculation/wizard/account_product_cost_recalculation.py 2014-03-26 08:11:13 +0000
1972+++ purchase_recalculation/wizard/account_product_cost_recalculation.py 2014-04-10 09:10:37 +0000
1973@@ -63,24 +63,7 @@
1974 if _recalc_id.product_id:
1975 _product_ids.append(_recalc_id.product_id.id)
1976 else:
1977- _location_ids = self.pool.get('stock.location').search(cr, uid, [('usage','=','internal')])
1978- _sql_string = ' SELECT sm.product_id AS id \n ' \
1979- ' FROM stock_move AS sm \n ' \
1980- ' INNER JOIN product_template AS pt ON pt.id = sm.product_id \n ' \
1981- ' AND pt.cost_method = \'average\' \n ' \
1982- ' WHERE sm.date >= \'{date_from}\' \n' \
1983- ' AND sm.date <= \'{date_to}\' \n ' \
1984- ' AND sm.state = \'done\' \n ' \
1985- ' AND sm.location_id IN {locations} \n ' \
1986- ' AND sm.location_dest_id NOT IN {locations} \n ' \
1987- 'GROUP BY sm.product_id \n ' \
1988- 'ORDER BY sm.product_id;'.format(date_from = _date_from + ' 00:00:00',
1989- date_to = _date_to + ' 23:59:59',
1990- locations = tuple(_location_ids)).replace(',)', ')')
1991- cr.execute(_sql_string)
1992- _products_tup = cr.fetchall()
1993- for _tup in _products_tup:
1994- _product_ids.append(_tup[0])
1995+ _product_ids = self.pool.get('product.product').search(cr, uid, [('active','=',True)])
1996
1997 _digits_obj = self.pool.get('decimal.precision')
1998 _digits_id = _digits_obj.search(cr, uid, [('name','=','Product Price')])
1999@@ -133,12 +116,22 @@
2000 if _end_period_stock and _end_period_stock <> 0:
2001 _period_average = round(_end_period_cost / _end_period_stock, _digits['price'])
2002
2003- # posodobim vrednosti prodaje na povprečno ceno za obdobje
2004+ # zapišem povprečno ceno v tabelo
2005 if _period_average and _period_average <> 0:
2006 _dates['date_from'] = _date_from + ' 00:00:00'
2007 _dates['date_to'] = _date_to + ' 23:59:59'
2008- _product._set_period_cost(_dates, _digits, _period_average)
2009-
2010+
2011+ # posodobim vrednosti prodaje na povprečno ceno za obdobje
2012+ #_product._set_period_cost(_dates, _digits, _period_average)
2013+
2014+ _product_cost_id = self.pool.get('product.period.cost').search(cr, uid, [('product_id','=', _product.id),
2015+ ('period_id','=',_period_id.id)])
2016+ if len(_product_cost_id) <> 0:
2017+ self.pool.get('product.period.cost').write(cr, uid, _product_cost_id, {'price_unit': _period_average})
2018+ else:
2019+ self.pool.get('product.period.cost').create(cr, uid, {'product_id': _product.id,
2020+ 'period_id': _period_id.id,
2021+ 'price_unit': _period_average})
2022 return True
2023
2024 def execute(self, cr, uid, ids, context=None):
2025
2026=== added file 'purchase_recalculation/wizard/account_product_cost_set.py'
2027--- purchase_recalculation/wizard/account_product_cost_set.py 1970-01-01 00:00:00 +0000
2028+++ purchase_recalculation/wizard/account_product_cost_set.py 2014-04-10 09:10:37 +0000
2029@@ -0,0 +1,125 @@
2030+# -*- coding: utf-8 -*-
2031+##############################################################################
2032+#
2033+# OpenERP, Open Source Management Solution
2034+# Copyright (C) 2004-TODAY OpenERP s.a. (<http://www.openerp.com>)
2035+# Copyright (C) 2013-TODAY Mentis d.o.o. (<http://www.mentis.si/openerp>)
2036+#
2037+# This program is free software: you can redistribute it and/or modify
2038+# it under the terms of the GNU Affero General Public License as
2039+# published by the Free Software Foundation, either version 3 of the
2040+# License, or (at your option) any later version.
2041+#
2042+# This program is distributed in the hope that it will be useful,
2043+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2044+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2045+# GNU Affero General Public License for more details.
2046+#
2047+# You should have received a copy of the GNU Affero General Public License
2048+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2049+#
2050+##############################################################################
2051+
2052+from osv import fields, osv
2053+from tools.translate import _
2054+from datetime import datetime
2055+import time
2056+import openerp.addons.decimal_precision as dp
2057+
2058+class account_product_cost_set(osv.TransientModel):
2059+ _name="account.product.cost.set"
2060+ _description="Set Product Costs"
2061+
2062+ _columns={
2063+ 'period_id': fields.many2one('account.period', "Period", required=True,
2064+ help="Period for which recalculation will be done."),
2065+ 'product_id': fields.many2one('product.product', "Product", domain=[('cost_method','=','average')], required=False,
2066+ help="Product for which recalculation will be done. If not set recalculation will be done for all products with cost method set 'Average Price'"),
2067+ 'type': fields.selection((('0', 'Set cost price on existing account move lines'),
2068+ ('1', 'Create new cost move per period/product'),
2069+ ('2', 'Create new cost move per period/product category'),
2070+ ('3', 'Create new cost move per period')), 'Type', required=True)
2071+ }
2072+ _defaults={
2073+ 'period_id': False,
2074+ 'product_id': False,
2075+ 'type': '0'
2076+ }
2077+
2078+ def _do_recalculation(self, cr, uid, ids, context=None):
2079+ _recalc_id = self.browse(cr, uid, ids[0], context)
2080+ _period_id = False
2081+ _dates = {}
2082+ _digits = {}
2083+
2084+ # najdem ustrezna obdobja
2085+ if _recalc_id.period_id:
2086+ _period_id = _recalc_id.period_id
2087+ else:
2088+ raise osv.except_osv(_('Error!'), _('Cannot find suitable dates for recalculation.'))
2089+
2090+ _date_from = _period_id.date_start
2091+ _date_to = _period_id.date_stop
2092+
2093+ # najdem ustrezne izdelke
2094+ _product_ids = []
2095+
2096+ if _recalc_id.product_id:
2097+ _product_ids.append(_recalc_id.product_id.id)
2098+ else:
2099+ _location_ids = self.pool.get('stock.location').search(cr, uid, [('usage','=','internal')])
2100+ _sql_string = ' SELECT sm.product_id AS id \n ' \
2101+ ' FROM stock_move AS sm \n ' \
2102+ ' INNER JOIN product_template AS pt ON pt.id = sm.product_id \n ' \
2103+ ' AND pt.cost_method = \'average\' \n ' \
2104+ ' WHERE sm.date >= \'{date_from}\' \n' \
2105+ ' AND sm.date <= \'{date_to}\' \n ' \
2106+ ' AND sm.state = \'done\' \n ' \
2107+ ' AND sm.location_id IN {locations} \n ' \
2108+ ' AND sm.location_dest_id NOT IN {locations} \n ' \
2109+ 'GROUP BY sm.product_id \n ' \
2110+ 'ORDER BY sm.product_id;'.format(date_from = _date_from + ' 00:00:00',
2111+ date_to = _date_to + ' 23:59:59',
2112+ locations = tuple(_location_ids)).replace(',)', ')')
2113+ cr.execute(_sql_string)
2114+ _products_tup = cr.fetchall()
2115+ for _tup in _products_tup:
2116+ _product_ids.append(_tup[0])
2117+
2118+ _digits_obj = self.pool.get('decimal.precision')
2119+ _digits_id = _digits_obj.search(cr, uid, [('name','=','Product Price')])
2120+ if len(_digits_id) > 0:
2121+ _digits['price'] = _digits_obj.browse(cr, uid, _digits_id[0])['digits']
2122+ else:
2123+ _digits['price'] = 2
2124+
2125+ _digits_id = _digits_obj.search(cr, uid, [('name','=','Account')])
2126+ if len(_digits_id) > 0:
2127+ _digits['account'] = _digits_obj.browse(cr, uid, _digits_id[0])['digits']
2128+ else:
2129+ _digits['account'] = 2
2130+
2131+ # preračunam posamezen izdelek
2132+ _products = self.pool.get('product.product').browse(cr, uid, _product_ids, context)
2133+ for _product in _products:
2134+ _dates['date_from'] = _date_from + ' 00:00:00'
2135+ _dates['date_to'] = _date_to + ' 23:59:59'
2136+
2137+ _cost_price_id = self.pool.get('product.period.cost').search(cr, uid, [('product_id','=',_product.id),('period_id','=',_period_id.id)])
2138+ if len(_cost_price_id) <> 0:
2139+ _cost_price = self.pool.get('product.period.cost').browse(cr, uid, _cost_price_id[0], context)
2140+ else:
2141+ raise osv.except_osv(_('Error!'),_('Cost price for selected period does not exist!'))
2142+
2143+ # posodobim vrednosti prodaje na povprečno ceno za obdobje
2144+ _product._set_period_cost(_dates, _digits, _cost_price.price_unit)
2145+
2146+ return True
2147+
2148+ def execute(self, cr, uid, ids, context=None):
2149+ if context is None:
2150+ context = {}
2151+ if self._do_recalculation(cr, uid, ids, context):
2152+ return {'type': 'ir.actions.act_window_close'}
2153+ else:
2154+ return False
2155
2156=== added file 'purchase_recalculation/wizard/account_product_cost_set_view.xml'
2157--- purchase_recalculation/wizard/account_product_cost_set_view.xml 1970-01-01 00:00:00 +0000
2158+++ purchase_recalculation/wizard/account_product_cost_set_view.xml 2014-04-10 09:10:37 +0000
2159@@ -0,0 +1,32 @@
2160+<?xml version="1.0" encoding="utf-8"?>
2161+<openerp>
2162+ <data>
2163+ <record id="account_product_cost_set_view" model="ir.ui.view">
2164+ <field name="name">Set Product Costs</field>
2165+ <field name="model">account.product.cost.set</field>
2166+ <field name="arch" type="xml">
2167+ <form string="Set/Create Product Costs" version="7.0">
2168+ <group>
2169+ <field name="period_id" domain="[('special','=',False)]"/>
2170+ <field name="product_id"/>
2171+ <field name="type"/>
2172+ </group>
2173+ <footer>
2174+ <button name="execute" string="Set/Create Costs" type="object" class="oe_highlight"/>
2175+ or
2176+ <button special="cancel" string="Cancel" class="oe_link"/>
2177+ </footer>
2178+ </form>
2179+ </field>
2180+ </record>
2181+
2182+ <act_window name="Set/Create Product Costs"
2183+ res_model="account.product.cost.set"
2184+ view_mode="form"
2185+ target="new"
2186+ key2="client_action_multi"
2187+ id="action_set_product_cost"/>
2188+
2189+ <menuitem action="action_set_product_cost" id="menu_set_product_cost" parent="account.menu_finance_periodical_processing" sequence="31"/>
2190+ </data>
2191+</openerp>

Subscribers

People subscribed via source and target branches