[REF] : Corrections suggested by buildbot.

bzr revid: uco@tinyerp.com-20101012061707-wi0uph158ahn99ob
This commit is contained in:
uco (OpenERP)
2010-10-12 11:47:07 +05:30
parent 3aa45c830c
commit 3704b3de8b
6 changed files with 2 additions and 21 deletions
-4
View File
@@ -19,13 +19,9 @@
#
##############################################################################
from mx import DateTime
from osv import fields
from osv import osv
from tools.translate import _
import ir
import netsvc
import time
class StockMove(osv.osv):
+1 -1
View File
@@ -95,7 +95,7 @@ class mrp_production(osv.osv):
'state': 'waiting',
'production_id': production.id
}
sub_prod_ids = self.pool.get('stock.move').create(cr, uid, data)
self.pool.get('stock.move').create(cr, uid, data)
return picking_id
mrp_production()
@@ -24,7 +24,6 @@ from report import report_sxw
import pooler
def titlize(journal_name):
res = []
words = journal_name.split()
while words.pop() != 'journal':
continue
-7
View File
@@ -64,7 +64,6 @@ class procurement_order(osv.osv):
report_total = 0
report_except = 0
report_later = 0
allids = self.search(cr, uid, [])
while True:
cr.execute('select id from procurement_order where state=%s and procure_method=%s order by priority,date_planned limit 500 offset %s', ('confirmed', 'make_to_order', offset))
ids = map(lambda x: x[0], cr.fetchall())
@@ -226,12 +225,6 @@ class procurement_order(osv.osv):
qty += op.qty_multiple - reste
newdate = DateTime.now() + DateTime.RelativeDateTime(
days = int(op.product_id.seller_delay))
if op.product_id.supply_method == 'buy':
location_id = op.warehouse_id.lot_input_id
elif op.product_id.supply_method == 'produce':
location_id = op.warehouse_id.lot_stock_id
else:
continue
if qty <= 0:
continue
if op.product_id.type not in ('consu'):
-6
View File
@@ -26,9 +26,7 @@ from dateutil.relativedelta import relativedelta
from osv import osv, fields
import netsvc
import ir
import pooler
from tools import config
from tools.translate import _
import decimal_precision as dp
from osv.orm import browse_record, browse_null
@@ -284,7 +282,6 @@ class purchase_order(osv.osv):
for line in po.order_line:
if line.state=='draft':
todo.append(line.id)
current_name = self.name_get(cr, uid, ids)[0][1]
self.pool.get('purchase.order.line').action_confirm(cr, uid, todo, context)
for id in ids:
self.write(cr, uid, [id], {'state' : 'confirmed', 'validator' : uid})
@@ -396,8 +393,6 @@ class purchase_order(osv.osv):
return False
def action_cancel(self, cr, uid, ids, context={}):
ok = True
purchase_order_line_obj = self.pool.get('purchase.order.line')
for purchase in self.browse(cr, uid, ids):
for pick in purchase.picking_ids:
if pick.state not in ('draft','cancel'):
@@ -695,7 +690,6 @@ class purchase_order_line(osv.osv):
'product_uom': uom}}
domain = {}
partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
taxes = self.pool.get('account.tax').browse(cr, uid,map(lambda x: x.id, prod.supplier_taxes_id))
fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
res['value']['taxes_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
+1 -2
View File
@@ -46,7 +46,7 @@ class stock_move(osv.osv):
def _create_chained_picking(self, cr, uid, pick_name,picking,ptype,move, context=None):
res=super(stock_move, self)._create_chained_picking(cr, uid, pick_name,picking,ptype,move, context=context)
if picking.sale_id:
picking_obj = self.pool.get('stock.picking').write(cr,uid,[res],{'sale_id':picking.sale_id.id})
self.pool.get('stock.picking').write(cr,uid,[res],{'sale_id':picking.sale_id.id})
return res
stock_move()
@@ -66,7 +66,6 @@ class stock_picking(osv.osv):
return super(stock_picking, self).get_currency_id(cursor, user, picking)
def _get_payment_term(self, cursor, user, picking):
res = {}
if picking.sale_id and picking.sale_id.payment_term:
return picking.sale_id.payment_term.id
return super(stock_picking, self)._get_payment_term(cursor,