[FIX] MRP/Purchase : Seller delay has to be converted into integer for date calculations.
lp bug: https://launchpad.net/bugs/541006 fixed bzr revid: jvo@tinyerp.com-20100319084615-8e9jovyuohatu97j
This commit is contained in:
parent
3d93d77e6e
commit
2bca08ed03
|
@ -197,7 +197,7 @@ class mrp_procurement(osv.osv):
|
||||||
if reste > 0:
|
if reste > 0:
|
||||||
qty += op.qty_multiple - reste
|
qty += op.qty_multiple - reste
|
||||||
newdate = DateTime.now() + DateTime.RelativeDateTime(
|
newdate = DateTime.now() + DateTime.RelativeDateTime(
|
||||||
days=op.product_id.seller_delay)
|
days=int(op.product_id.seller_delay))
|
||||||
if op.product_id.supply_method == 'buy':
|
if op.product_id.supply_method == 'buy':
|
||||||
location_id = op.warehouse_id.lot_input_id
|
location_id = op.warehouse_id.lot_input_id
|
||||||
elif op.product_id.supply_method == 'produce':
|
elif op.product_id.supply_method == 'produce':
|
||||||
|
|
|
@ -522,7 +522,7 @@ class purchase_order_line(osv.osv):
|
||||||
'uom': uom,
|
'uom': uom,
|
||||||
'date': date_order,
|
'date': date_order,
|
||||||
})[pricelist]
|
})[pricelist]
|
||||||
dt = (datetime.now() + relativedelta(days=seller_delay or 0.0)).strftime('%Y-%m-%d %H:%M:%S')
|
dt = (datetime.now() + relativedelta(days=int(seller_delay) or 0.0)).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id])[0][1]
|
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id])[0][1]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue