|
[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]
diff --git a/addons/stock/report/report_stock.py b/addons/stock/report/report_stock.py
index 81e2bb125fd..5ea8c83c602 100644
--- a/addons/stock/report/report_stock.py
+++ b/addons/stock/report/report_stock.py
@@ -24,9 +24,6 @@ from tools.translate import _
import tools
from tools.sql import drop_view_if_exists
-#
-# Check if it works with UoM ???
-#
class stock_report_prodlots(osv.osv):
_name = "stock.report.prodlots"
_description = "Stock report by production lots"
diff --git a/addons/stock/report/stock_graph.py b/addons/stock/report/stock_graph.py
index d20baa08d58..bb97119c299 100644
--- a/addons/stock/report/stock_graph.py
+++ b/addons/stock/report/stock_graph.py
@@ -24,7 +24,7 @@ import time
from report.misc import choice_colors
#
-# dRAw a graph for stocks
+# Draw a graph for stocks
#
class stock_graph(object):
def __init__(self, io):
diff --git a/addons/stock/wizard/stock_inventory_merge.py b/addons/stock/wizard/stock_inventory_merge.py
index 30450e4d253..b08f0ca79c8 100644
--- a/addons/stock/wizard/stock_inventory_merge.py
+++ b/addons/stock/wizard/stock_inventory_merge.py
@@ -20,13 +20,7 @@
##############################################################################
from osv import fields, osv
-from service import web_services
-from tools.misc import UpdateableStr, UpdateableDict
from tools.translate import _
-import netsvc
-import pooler
-import time
-import wizard
class stock_inventory_merge(osv.osv_memory):
_name = "stock.inventory.merge"
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index 01e8a712dca..f3af091d58b 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -186,8 +186,7 @@ class stock_partial_move(osv.osv_memory):
res['move%s_product_qty'%(m.id)] = m.product_qty
if 'move%s_product_uom'%(m.id) in fields:
res['move%s_product_uom'%(m.id)] = m.product_uom.id
-
- if (m.picking_id.type == 'out') and (m.product_id.cost_method == 'average'):
+ if (m.picking_id.type == 'out') and (m.product_id.cost_method == 'average') and 'sale_id' in m.picking_id._columns.keys():
price = 0
if hasattr(m, 'sale_line_id') and m.sale_line_id:
price = m.sale_line_id.price_unit
@@ -201,7 +200,7 @@ class stock_partial_move(osv.osv_memory):
if 'move%s_product_currency'%(m.id) in fields:
res['move%s_product_currency'%(m.id)] = currency
- if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average'):
+ if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average') and 'purchase_id' in m.picking_id._columns.keys():
price = 0
if hasattr(m, 'purchase_line_id') and m.purchase_line_id:
price = m.purchase_line_id.price_unit
@@ -227,11 +226,6 @@ class stock_partial_move(osv.osv_memory):
"""
rec_id = context and context.get('active_id', False)
- #tracking_lot = context.get('tracking_lot', False)
- #if tracking_lot:
- # tracking = self.pool.get('stock.tracking')
- # tracking_lot = tracking.get_create_tracking_lot(cr, uid,[rec_id], tracking_lot)
- # context ['tracking_lot'] = tracking_lot
move_obj = self.pool.get('stock.move')
move_ids = context.get('active_ids', False)
partial = self.browse(cr, uid, ids[0], context)
|