Merge lp:~openbig/bigconsulting/add_tool_tip_in_somemod into lp:bigconsulting
- add_tool_tip_in_somemod
- Merge into addons
Proposed by
Atik Agewan(OpenERP)
Status: | Merged |
---|---|
Merged at revision: | 34 |
Proposed branch: | lp:~openbig/bigconsulting/add_tool_tip_in_somemod |
Merge into: | lp:bigconsulting |
Diff against target: |
563 lines (+42/-101) 15 files modified
packing_barcode_check/packing_barcode_check_wizard.xml (+2/-3) packing_barcode_check/wizard/scan_product.py (+4/-13) packing_barcode_check/wizard/select_picking.py (+2/-6) product_ean13_generator/product_ean13_generator.py (+3/-4) product_ean13_generator/wizard/generator_ean13.py (+3/-3) product_price_information/product_price_info.py (+3/-10) product_price_information/wizard/sale_prize_information.py (+3/-5) sales_shop_stock_availability/sales_shop_stock_availability.py (+4/-12) sales_shop_stock_availability/sales_shop_stock_availability_view.xml (+1/-0) sales_shop_stock_availability/wizard/stock_shop_availability.py (+6/-17) sales_shop_stock_availability/wizard/stock_shop_availability_view.xml (+1/-2) stock_minimum_calculator/stock_minimujm_calculator_wizard.xml (+0/-1) stock_minimum_calculator/stock_minimum_calculator.py (+0/-2) stock_minimum_calculator/stock_minimum_calculator_sequence.xml (+2/-2) stock_minimum_calculator/supplier_cost_optimated_leadtimes.py (+8/-21) |
To merge this branch: | bzr merge lp:~openbig/bigconsulting/add_tool_tip_in_somemod |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
openbig | Pending | ||
Review via email: mp+28699@code.launchpad.net |
Commit message
Description of the change
tool tip added in only 2 modules and in another module remove blank sapce
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 'packing_barcode_check/packing_barcode_check_wizard.xml' |
2 | --- packing_barcode_check/packing_barcode_check_wizard.xml 2010-06-23 14:49:06 +0000 |
3 | +++ packing_barcode_check/packing_barcode_check_wizard.xml 2010-06-29 06:29:34 +0000 |
4 | @@ -7,14 +7,13 @@ |
5 | name="select.picking" |
6 | menu="False" |
7 | id="id_select_picking"/> |
8 | - |
9 | + |
10 | <wizard |
11 | string="Scan Product" |
12 | model="stock.picking" |
13 | name="scan.product" |
14 | menu="True" |
15 | id="id_scan_product"/> |
16 | - |
17 | - |
18 | + |
19 | </data> |
20 | </openerp> |
21 | |
22 | === modified file 'packing_barcode_check/wizard/scan_product.py' |
23 | --- packing_barcode_check/wizard/scan_product.py 2010-06-24 12:19:20 +0000 |
24 | +++ packing_barcode_check/wizard/scan_product.py 2010-06-29 06:29:34 +0000 |
25 | @@ -31,15 +31,14 @@ |
26 | </form>""" |
27 | |
28 | scan_product_ean_fields = { |
29 | - 'ean': {'string': 'EAN number', 'type': 'char','required': True, 'size':32}, |
30 | + 'ean': {'string': 'EAN number', 'type': 'char','required': True, 'size':32}, |
31 | } |
32 | |
33 | def _scan_product_ean(self, cr, uid, data, context): |
34 | print "_scan_product_lot:::::",data, |
35 | pool = pooler.get_pool(cr.dbname) |
36 | - stock_move_obj = pool.get("stock.move") |
37 | + stock_move_obj = pool.get("stock.move") |
38 | picking_id = data['ids'] |
39 | - |
40 | form_ean = data['form']['ean'] |
41 | stock_move_ids = stock_move_obj.search(cr, uid, [('picking_id','=',picking_id[0])]) |
42 | EAN_Found = False |
43 | @@ -53,7 +52,6 @@ |
44 | if product_ean == form_ean: |
45 | EAN_Found = True |
46 | return 'scan_product_number' |
47 | - |
48 | if not EAN_Found: |
49 | raise osv.except_osv(_('Warning!'),('Product does not belongs to this picking or already scanned.')) |
50 | return {} |
51 | @@ -64,17 +62,15 @@ |
52 | </form>""" |
53 | |
54 | scan_product_lot_fields = { |
55 | - 'lot_number_id': {'string':'Lot Number', 'type': 'many2one', 'relation':'stock.production.lot', 'required':True}, |
56 | + 'lot_number_id': {'string':'Lot Number', 'type': 'many2one', 'relation':'stock.production.lot', 'required':True}, |
57 | } |
58 | |
59 | def _scan_product_lot_number(self, cr, uid, data, context): |
60 | - |
61 | pool = pooler.get_pool(cr.dbname) |
62 | move_obj = pool.get("stock.move") |
63 | - stock_pciking_obj = pool.get("stock.picking") |
64 | + stock_pciking_obj = pool.get("stock.picking") |
65 | picking_ids = data['ids'] |
66 | form_lot_number = data['form']['lot_number_id'] |
67 | - |
68 | for picking_id in picking_ids: |
69 | pick_data = stock_pciking_obj.browse(cr, uid,picking_id) |
70 | for pick in pick_data.tobe_scan_ids: |
71 | @@ -105,9 +101,7 @@ |
72 | return data['form'] |
73 | |
74 | class select_picking(wizard.interface): |
75 | - |
76 | states = { |
77 | - |
78 | 'init' : { |
79 | 'actions' : [_get_defaults], |
80 | 'result' : {'type': 'form', |
81 | @@ -124,7 +118,6 @@ |
82 | 'actions': [], |
83 | 'result': {'type': 'form', 'arch':scan_product_lot_form, 'fields':scan_product_lot_fields, 'state':[('end','Cancel', 'gtk-cancel'),('scan_product_lot_number','Ok', 'gtk-ok', True)]} |
84 | }, |
85 | - |
86 | 'scan_product_lot_number': { |
87 | 'actions': [], |
88 | 'result' : {'type' : 'choice', |
89 | @@ -134,9 +127,7 @@ |
90 | 'actions' : [], |
91 | 'result': {'type': 'state', 'state': 'end'} |
92 | }, |
93 | - |
94 | } |
95 | select_picking("scan.product") |
96 | |
97 | - |
98 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
99 | \ No newline at end of file |
100 | |
101 | === modified file 'packing_barcode_check/wizard/select_picking.py' |
102 | --- packing_barcode_check/wizard/select_picking.py 2010-06-23 14:49:06 +0000 |
103 | +++ packing_barcode_check/wizard/select_picking.py 2010-06-29 06:29:34 +0000 |
104 | @@ -33,10 +33,8 @@ |
105 | 'picking_id': {'string': 'Picking', 'type': 'many2one', 'relation': 'stock.picking','domain': [('type','=','out')], 'required': True}, |
106 | } |
107 | |
108 | - |
109 | - |
110 | class select_picking(wizard.interface): |
111 | - |
112 | + |
113 | def _open_picking(self, cr, uid, data, context): |
114 | pool = pooler.get_pool(cr.dbname) |
115 | pool_obj = pooler.get_pool(cr.dbname) |
116 | @@ -51,9 +49,8 @@ |
117 | 'view_id':[resource_id], |
118 | 'res_id':data['form']['picking_id'], |
119 | } |
120 | - |
121 | return value |
122 | - |
123 | + |
124 | states = { |
125 | 'init' : { |
126 | 'actions' : [], |
127 | @@ -71,5 +68,4 @@ |
128 | } |
129 | select_picking("select.picking") |
130 | |
131 | - |
132 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
133 | \ No newline at end of file |
134 | |
135 | === modified file 'product_ean13_generator/product_ean13_generator.py' |
136 | --- product_ean13_generator/product_ean13_generator.py 2010-08-17 13:38:00 +0000 |
137 | +++ product_ean13_generator/product_ean13_generator.py 2010-06-29 06:29:34 +0000 |
138 | @@ -25,13 +25,13 @@ |
139 | from tools.translate import _ |
140 | |
141 | class ir_sequence(osv.osv): |
142 | - |
143 | + |
144 | _inherit = 'ir.sequence' |
145 | _columns = { |
146 | 'number_max': fields.char('Max. Number',size=64,), |
147 | 'warning_number': fields.char('Warning ab',size=64,), |
148 | } |
149 | - |
150 | + |
151 | def get_id(self, cr, uid, sequence_id, test='id=%s', context={}): |
152 | if test not in ('id=%s', 'code=%s'): |
153 | raise ValueError('invalid test') |
154 | @@ -41,7 +41,6 @@ |
155 | ean_nr = self.browse(cr, uid, res['id'], context=context) |
156 | sequence = super(ir_sequence, self).get_id(cr, uid, sequence_id, test, context) |
157 | code = 'generator.ean13' |
158 | - |
159 | if ean_nr.code == code: |
160 | number = ean_nr.number_max |
161 | check_seq = sequence[8:] |
162 | @@ -52,7 +51,7 @@ |
163 | context.update({'active_id':res['id']}) |
164 | obj.run(cr, uid, id, context) |
165 | return sequence |
166 | - |
167 | + |
168 | ir_sequence() |
169 | |
170 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
171 | \ No newline at end of file |
172 | |
173 | === modified file 'product_ean13_generator/wizard/generator_ean13.py' |
174 | --- product_ean13_generator/wizard/generator_ean13.py 2010-07-31 08:37:22 +0000 |
175 | +++ product_ean13_generator/wizard/generator_ean13.py 2010-06-29 06:29:34 +0000 |
176 | @@ -26,8 +26,8 @@ |
177 | from tools.translate import _ |
178 | |
179 | ean13_generator_form = """<?xml version="1.0" encoding="utf-8"?> |
180 | -<form string="Create ean13"> |
181 | - <label string="Do you want to define ean codes for packaging? If yes,you have to define packaging list before starting the wizard" /> |
182 | +<form string="Create EAN13"> |
183 | + <label string="Do you want to define EAN codes for packaging?If yes,you have to define packaging list before starting the wizard"/> |
184 | </form>""" |
185 | |
186 | ean13_generator_fields = {} |
187 | @@ -36,7 +36,7 @@ |
188 | return not x%2 |
189 | |
190 | def _generatorEan13(self, cr, uid, data, context): |
191 | - |
192 | + |
193 | product_obj = pooler.get_pool(cr.dbname).get('product.product') |
194 | sequence_obj = pooler.get_pool(cr.dbname).get('ir.sequence') |
195 | packaging_obj = pooler.get_pool(cr.dbname).get('product.packaging') |
196 | |
197 | === modified file 'product_price_information/product_price_info.py' |
198 | --- product_price_information/product_price_info.py 2010-06-25 10:12:24 +0000 |
199 | +++ product_price_information/product_price_info.py 2010-06-29 06:29:34 +0000 |
200 | @@ -24,24 +24,19 @@ |
201 | |
202 | class sale_order_line(osv.osv): |
203 | _inherit = "sale.order.line" |
204 | - |
205 | _columns = { |
206 | 'sale_price_unit_tax': fields.float('Sale price W/O taxes'), |
207 | } |
208 | - |
209 | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, |
210 | uom=False, qty_uos=0, uos=False, name='', partner_id=False, |
211 | lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): |
212 | - |
213 | tax_obj = self.pool.get('account.tax') |
214 | - |
215 | result = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty, |
216 | uom, qty_uos, uos, name, partner_id, lang, update_tax, date_order, packaging, fiscal_position, flag) |
217 | if product: |
218 | context = {'lang': lang, 'partner_id': partner_id, 'qty': qty} |
219 | product_obj = self.pool.get('product.product').browse(cr, uid, product, context=context) |
220 | result['value']['sale_price_unit_tax'] = product_obj.product_tmpl_id.price_unit_tax |
221 | - |
222 | return result |
223 | |
224 | sale_order_line() |
225 | @@ -58,7 +53,6 @@ |
226 | |
227 | sale_order() |
228 | |
229 | - |
230 | class sale_shop(osv.osv): |
231 | _name = 'sale.shop' |
232 | _inherit = 'sale.shop' |
233 | @@ -212,20 +206,19 @@ |
234 | def button_dummy(self, cr, uid, ids, context={}): |
235 | return True |
236 | |
237 | - |
238 | _columns = { |
239 | 'pi_quantity1': fields.float('Quantity1'), |
240 | 'pi_quantity2': fields.float('Quantity2'), |
241 | 'pi_pricelist_id': fields.many2one('product.pricelist', 'Pricelist'), |
242 | 'pi_partner_id': fields.many2one('res.partner', 'Customer'), |
243 | - 'pi_customer_prices1': fields.function(_get_all_values, method=True, type='float', string='Costomer Prices',multi='pi_customer_prices1'), |
244 | + 'pi_customer_prices1': fields.function(_get_all_values, method=True, type='float', string='Costomer Prices',multi='pi_customer_prices1',help='Costomer Price For Quantity1 & Quantity2'), |
245 | 'pi_customer_prices2': fields.function(_get_all_values, method=True, type='float', string='Costomer Prices',multi='pi_customer_prices2'), |
246 | - 'pi_list_prices1': fields.function(_get_all_values, method=True, type='float', string='List Prices',multi='pi_list_prices1'), |
247 | + 'pi_list_prices1': fields.function(_get_all_values, method=True, type='float', string='List Prices',multi='pi_list_prices1',help= 'Price Of Public Pricelist'), |
248 | # 'pi_next_better_price_qty': fields.function(_get_all_values, method=True, type='float', string='Next Better Price Qty',multi='pi_next_better_price_qty'), |
249 | # 'pi_best_price_on_qty': fields.function(_get_all_values, method=True, type='float', string='Best Price On Quantity',multi='pi_best_price_on_qty'), |
250 | 'pi_last_customer_prices': fields.function(_get_all_values, method=True, type='float', string='Last Costomer Prices',multi='pi_last_customer_prices'), |
251 | # 'pi_last_list_prices': fields.function(_get_all_values, method=True, type='float', string='Last List Prices',multi='pi_last_list_prices'), |
252 | - 'pi_qty_buyed': fields.function(_get_all_values, method=True, type='float', string='Quantity Buyed',multi='pi_qty_buyed'), |
253 | + 'pi_qty_buyed': fields.function(_get_all_values, method=True, type='float', string='Quantity Buyed',multi='pi_qty_buyed',help='Last Costomer Buyed Quantity'), |
254 | } |
255 | _defaults = { |
256 | 'pi_quantity1': lambda *a: 1.0, |
257 | |
258 | === modified file 'product_price_information/wizard/sale_prize_information.py' |
259 | --- product_price_information/wizard/sale_prize_information.py 2010-06-25 10:12:24 +0000 |
260 | +++ product_price_information/wizard/sale_prize_information.py 2010-06-29 06:29:34 +0000 |
261 | @@ -30,19 +30,18 @@ |
262 | 'product_id': fields.many2one('product.product', 'Product',required= True), |
263 | 'quantity1': fields.float('Quantity1'), |
264 | 'quantity2': fields.float('Quantity2'), |
265 | - 'customer_prices1':fields.float('Costomer Prices'), |
266 | + 'customer_prices1':fields.float('Costomer Prices',help='Costomer Price For Quantity1 & Quantity2'), |
267 | 'customer_prices2':fields.float('Costomer Prices'), |
268 | 'last_customer_prices':fields.float('Last Costomer Prices'), |
269 | - 'list_prices1':fields.float('List Prices'), |
270 | + 'list_prices1':fields.float('List Prices',help= 'Price Of Public Pricelist'), |
271 | # 'last_list_prices':fields.float('Last List Prices'), |
272 | # 'next_better_price_qty':fields.float('Next Better Price Qty'), |
273 | # 'best_price_on_qty':fields.float('Best Price On Quantity'), |
274 | - 'qty_buyed':fields.float('Quantity Buyed'), |
275 | + 'qty_buyed':fields.float('Quantity Buyed',help='Last Costomer Buyed Quantity'), |
276 | } |
277 | _defaults = { |
278 | 'quantity1': lambda *a: 1.0, |
279 | 'quantity2': lambda *a: 5.0, |
280 | - |
281 | } |
282 | |
283 | def set_default(self, cr, uid, ids, context=None): |
284 | @@ -98,7 +97,6 @@ |
285 | # self.write(cr , uid, ids,{'customer_prices1':c_price1,'customer_prices2':c_price2,'list_prices1':list_price1,'list_prices2':list_price2,'next_better_price_qty':m_qty,'best_price_on_qty':c_price3,'last_customer_prices':last_price,'qty_buyed':qty_last,'last_list_prices':last_list_price},context=context) |
286 | self.write(cr , uid, ids,{'customer_prices1':c_price1,'customer_prices2':c_price2,'list_prices1':list_price1,'last_customer_prices':last_price,'qty_buyed':qty_last},context=context) |
287 | value = { |
288 | - |
289 | 'name': 'Sale Prize Information', |
290 | 'view_type': 'form', |
291 | 'view_mode': 'tree,form', |
292 | |
293 | === modified file 'sales_shop_stock_availability/sales_shop_stock_availability.py' |
294 | --- sales_shop_stock_availability/sales_shop_stock_availability.py 2010-12-22 14:54:45 +0000 |
295 | +++ sales_shop_stock_availability/sales_shop_stock_availability.py 2010-06-29 06:29:34 +0000 |
296 | @@ -27,25 +27,19 @@ |
297 | _inherit = "product.product" |
298 | |
299 | def _product_available_other_shop(self, cr, uid, ids, name, arg, context={}): |
300 | - |
301 | res = {} |
302 | product_obj = self.pool.get('product.product') |
303 | shop = context.get('shop', False) |
304 | fields_name = ['qty_available','virtual_available'] |
305 | - |
306 | stock2 = product_obj._product_available(cr, uid, ids ,fields_name,context={}) |
307 | - |
308 | context.update({'shop':shop}) |
309 | stock1 = product_obj._product_available(cr, uid, ids ,fields_name,context=context) |
310 | - |
311 | real_res = {} |
312 | for key,value in stock2.items(): |
313 | real_res[key] = stock2[key]['qty_available'] - stock1[key]['qty_available'] |
314 | - |
315 | - virtual_res = {} |
316 | - for key,value in stock2.items(): |
317 | + virtual_res = {} |
318 | + for key,value in stock2.items(): |
319 | virtual_res[key] = stock2[key]['virtual_available'] - stock1[key]['virtual_available'] |
320 | - |
321 | for id in ids: |
322 | res[id] = {} |
323 | if 'qty_available_other_shop' in name: |
324 | @@ -53,13 +47,11 @@ |
325 | if 'virtual_qty_available_other_shop' in name: |
326 | res[id].update({'virtual_qty_available_other_shop' : virtual_res[id]}) |
327 | return res |
328 | - |
329 | + |
330 | _columns = { |
331 | 'qty_available_other_shop': fields.function(_product_available_other_shop, method=True, type='float', string='Real Other Stock', help="Current quantities of products in other stock location except selected shop in sale order.", multi='qty_available_other_shop'), |
332 | - |
333 | 'virtual_qty_available_other_shop': fields.function(_product_available_other_shop, method=True, type='float', string='Virtual Other Stock', help="Current virtual quantities of products in other stock location except selected shop in sale order.", multi='virtual_qty_available_other_shop'), |
334 | - } |
335 | - |
336 | + } |
337 | |
338 | product_product() |
339 | |
340 | |
341 | === modified file 'sales_shop_stock_availability/sales_shop_stock_availability_view.xml' |
342 | --- sales_shop_stock_availability/sales_shop_stock_availability_view.xml 2010-12-22 14:54:45 +0000 |
343 | +++ sales_shop_stock_availability/sales_shop_stock_availability_view.xml 2010-06-29 06:29:34 +0000 |
344 | @@ -40,5 +40,6 @@ |
345 | </xpath> |
346 | </field> |
347 | </record> |
348 | + |
349 | </data> |
350 | </openerp> |
351 | |
352 | === modified file 'sales_shop_stock_availability/wizard/stock_shop_availability.py' |
353 | --- sales_shop_stock_availability/wizard/stock_shop_availability.py 2010-06-15 09:10:12 +0000 |
354 | +++ sales_shop_stock_availability/wizard/stock_shop_availability.py 2010-06-29 06:29:34 +0000 |
355 | @@ -24,50 +24,39 @@ |
356 | class stock_shop_availability(osv.osv_memory): |
357 | _name = 'stock.shop.availability' |
358 | _description = 'Stock Shop Availability' |
359 | - |
360 | _columns = { |
361 | 'shop_id': fields.many2one('sale.shop', 'Shop', required=True), |
362 | 'product_id': fields.many2one('product.product', 'Product',required= True), |
363 | - 'real_stock': fields.float('Real Stock'), |
364 | - 'virtual_stock': fields.float('Virtual Stock'), |
365 | - 'other_shop_real_stock': fields.float('Other Shop Real Stock'), |
366 | - 'other_shop_virtual_stock': fields.float('Other Shop Virtual Stock'), |
367 | - |
368 | + 'real_stock': fields.float('Real Stock',help="Current quantities of products in selected shop in sale order."), |
369 | + 'virtual_stock': fields.float('Virtual Stock',help="Current virtual quantities of products selected shop in sale order."), |
370 | + 'other_shop_real_stock': fields.float('Other Shop Real Stock',help="Current quantities of products in other stock location except selected shop in sale order."), |
371 | + 'other_shop_virtual_stock': fields.float('Other Shop Virtual Stock',help="Current virtual quantities of products in other stock location except selected shop in sale order."), |
372 | } |
373 | - |
374 | + |
375 | def product_available_other_shop(self, cr, uid, ids, context=None): |
376 | - |
377 | form = self.read(cr, uid, ids, [])[0] |
378 | - |
379 | product_id = form['product_id'] |
380 | shop_id = form['shop_id'] |
381 | - |
382 | product_obj = self.pool.get('product.product') |
383 | fields_name = ['qty_available','virtual_available'] |
384 | - |
385 | stock2 = product_obj._product_available(cr, uid, [product_id] ,fields_name,context={}) |
386 | - |
387 | context.update({'shop':shop_id,'product_id':product_id}) |
388 | stock1 = product_obj._product_available(cr, uid, [product_id] ,fields_name,context=context) |
389 | - |
390 | for key,value in stock1.items(): |
391 | real_val1 = value['qty_available'] |
392 | virt_val1 = value['virtual_available'] |
393 | - |
394 | for key,value in stock2.items(): |
395 | real_val2 = value['qty_available'] |
396 | virt_val2 = value['virtual_available'] |
397 | - |
398 | other_real_val = real_val2 - real_val1 |
399 | other_virt_val = virt_val2 - virt_val1 |
400 | - |
401 | for id in ids: |
402 | self.write(cr, uid, [id],{ |
403 | 'real_stock':real_val1, |
404 | 'virtual_stock':virt_val1, |
405 | 'other_shop_real_stock':other_real_val, |
406 | 'other_shop_virtual_stock':other_virt_val, |
407 | - |
408 | + |
409 | }) |
410 | return True |
411 | |
412 | |
413 | === modified file 'sales_shop_stock_availability/wizard/stock_shop_availability_view.xml' |
414 | --- sales_shop_stock_availability/wizard/stock_shop_availability_view.xml 2010-06-15 09:10:12 +0000 |
415 | +++ sales_shop_stock_availability/wizard/stock_shop_availability_view.xml 2010-06-29 06:29:34 +0000 |
416 | @@ -11,7 +11,7 @@ |
417 | <group col="4" colspan="4"> |
418 | <field name="shop_id"/> |
419 | <field name="product_id"/> |
420 | - </group> |
421 | + </group> |
422 | <group col="4" colspan="4"> |
423 | <group col="2" colspan="2"> |
424 | <separator string="Availability in Shop"/><newline/> |
425 | @@ -28,7 +28,6 @@ |
426 | <button icon='gtk-cancel' special="cancel" string="Cancel" /> |
427 | <button icon="gtk-ok" string="Calculate" name="product_available_other_shop" type="object"/> |
428 | </group> |
429 | - |
430 | </form> |
431 | </field> |
432 | </record> |
433 | |
434 | === modified file 'stock_minimum_calculator/stock_minimujm_calculator_wizard.xml' |
435 | --- stock_minimum_calculator/stock_minimujm_calculator_wizard.xml 2010-06-15 06:50:37 +0000 |
436 | +++ stock_minimum_calculator/stock_minimujm_calculator_wizard.xml 2010-06-29 06:29:34 +0000 |
437 | @@ -13,6 +13,5 @@ |
438 | name="orderpoint.calculator" |
439 | menu="True" |
440 | id="id_order_point_cacluator"/> |
441 | - |
442 | </data> |
443 | </openerp> |
444 | |
445 | === modified file 'stock_minimum_calculator/stock_minimum_calculator.py' |
446 | --- stock_minimum_calculator/stock_minimum_calculator.py 2010-06-24 08:01:22 +0000 |
447 | +++ stock_minimum_calculator/stock_minimum_calculator.py 2010-06-29 06:29:34 +0000 |
448 | @@ -44,7 +44,6 @@ |
449 | 'partner_id': fields.many2one('res.partner', 'Suplier Information',), |
450 | 'supp_stock':fields.float("Supplier Stock"), |
451 | } |
452 | - |
453 | supplier_product() |
454 | |
455 | class product_seasonal(osv.osv): |
456 | @@ -54,7 +53,6 @@ |
457 | 'code':fields.char("Code",size=64, required=True), |
458 | 'seasonal_factor':fields.float("Seasonal Factor"), |
459 | } |
460 | - |
461 | product_seasonal() |
462 | |
463 | class product_product(osv.osv): |
464 | |
465 | === modified file 'stock_minimum_calculator/stock_minimum_calculator_sequence.xml' |
466 | --- stock_minimum_calculator/stock_minimum_calculator_sequence.xml 2010-06-15 06:50:37 +0000 |
467 | +++ stock_minimum_calculator/stock_minimum_calculator_sequence.xml 2010-06-29 06:29:34 +0000 |
468 | @@ -3,11 +3,11 @@ |
469 | <data noupdate="1"> |
470 | <!-- Sequences for stock.orderpoint.step2 --> |
471 | <record id="sequence_stock_op_point" model="ir.sequence.type"> |
472 | - <field name="name">Stock orderpoint Calculator</field> |
473 | + <field name="name">Stock Orderpoint Calculator</field> |
474 | <field name="code">stock.orderpoint.calculator</field> |
475 | </record> |
476 | <record id="sequence_stock_op" model="ir.sequence"> |
477 | - <field name="name">stock orderpoint Calculator</field> |
478 | + <field name="name">stock Orderpoint Calculator</field> |
479 | <field name="code">stock.orderpoint.calculator</field> |
480 | <field name="prefix">OP/</field> |
481 | <field name="padding">5</field> |
482 | |
483 | === modified file 'stock_minimum_calculator/supplier_cost_optimated_leadtimes.py' |
484 | --- stock_minimum_calculator/supplier_cost_optimated_leadtimes.py 2010-06-24 08:01:22 +0000 |
485 | +++ stock_minimum_calculator/supplier_cost_optimated_leadtimes.py 2010-06-29 06:29:34 +0000 |
486 | @@ -19,12 +19,12 @@ |
487 | # |
488 | ############################################################################## |
489 | from osv import fields, osv |
490 | -import time |
491 | +import time |
492 | from tools.translate import _ |
493 | from mx import DateTime |
494 | |
495 | class supplier_cost_optimated_leadtimes(osv.osv_memory): |
496 | - |
497 | + |
498 | _name="supplier.cost.optimated.leadtimes" |
499 | _columns = { |
500 | 'partner_id': fields.many2one('res.partner', 'Suplier'), |
501 | @@ -38,55 +38,42 @@ |
502 | 'economic_lead_time':fields.float("Economic Lead Time", readonly=True), |
503 | 'stock_holding_rate_id':fields.many2one("stock.holding.rate",'Holding Rate',required=True), |
504 | } |
505 | - |
506 | + |
507 | def _compute(self, cr, uid, ids, context=None): |
508 | |
509 | form = self.read(cr, uid, ids, [], context=context)[0] |
510 | analytic_account_obj = self.pool.get('account.analytic.account') |
511 | analytic_line_obj = self.pool.get('account.analytic.line') |
512 | stock_hold_rate_obj = self.pool.get("stock.holding.rate") |
513 | - |
514 | date_start = form['date_start'] |
515 | date_stop = form['date_stop'] |
516 | - |
517 | - pur_balance = 0.0 |
518 | + pur_balance = 0.0 |
519 | pur_analytic_id = form['account_purchase_rev'] |
520 | - |
521 | pur_analytic_line_id = analytic_line_obj.search(cr,uid,[('account_id','=',pur_analytic_id), ('date','>=',date_start),('date','<=',date_stop)]) |
522 | - |
523 | if pur_analytic_line_id: |
524 | for pur_analytic_id in pur_analytic_line_id: |
525 | pur_analytic_amount = analytic_line_obj.browse(cr, uid, pur_analytic_id, context) |
526 | - balance = pur_analytic_amount.amount |
527 | + balance = pur_analytic_amount.amount |
528 | pur_balance += balance |
529 | - |
530 | - |
531 | cost_del_analytic_id = form['account_cost_pre_del'] |
532 | cost_balance = 0.0 |
533 | - |
534 | cost_del_analytic_line_id = analytic_line_obj.search(cr,uid,[('account_id','=',cost_del_analytic_id), ('date','>=',date_start),('date','<=',date_stop)]) |
535 | - |
536 | if cost_del_analytic_line_id: |
537 | for cost_analytic_id in cost_del_analytic_line_id: |
538 | cost_analytic_amount = analytic_line_obj.browse(cr, uid, cost_analytic_id, context) |
539 | - balance = cost_analytic_amount.amount |
540 | + balance = cost_analytic_amount.amount |
541 | cost_balance += balance |
542 | - |
543 | stock_hold_id = stock_hold_rate_obj.browse(cr, uid, form['stock_holding_rate_id']) |
544 | stock_hold_rate = stock_hold_id.stock_hold_rate |
545 | - |
546 | economic_numer_orders = 0.0 |
547 | economic_lead_time = 0.0 |
548 | - |
549 | if pur_balance and cost_balance: |
550 | economic_numer_orders = (pur_balance * stock_hold_rate)/ (2 * cost_balance) |
551 | economic_lead_time = 360 / economic_numer_orders |
552 | - |
553 | for id in ids: |
554 | self.write(cr, uid, [id],{'cost_per_del':cost_balance,'purchase_rev':pur_balance, 'economic_no_order':economic_numer_orders,'economic_lead_time':economic_lead_time}) |
555 | - |
556 | - return True |
557 | - |
558 | + return True |
559 | + |
560 | supplier_cost_optimated_leadtimes() |
561 | |
562 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
563 | \ No newline at end of file |