diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 99efd15e12d..fb2a40d2741 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -740,7 +740,7 @@ class purchase_order(osv.osv): 'move_dest_id': procurement.move_dest_id.id, #move destination is same as procurement destination 'group_id': procurement.group_id.id or group_id, #move group is same as group of procurements if it exists, otherwise take another group 'procurement_id': procurement.id, - 'invoice_state': procurement.rule_id.invoice_state or (procurement.location_id and procurement.location_id.usage == 'customer' and procurement.invoice_state) or (order.invoice_method == 'picking' and '2binvoiced') or 'none', #dropship case takes from sale + 'invoice_state': procurement.rule_id.invoice_state or (procurement.location_id and procurement.location_id.usage == 'customer' and procurement.invoice_state=='picking' and '2binvoiced') or (order.invoice_method == 'picking' and '2binvoiced') or 'none', #dropship case takes from sale }) diff_quantity -= min(procurement_qty, diff_quantity) res.append(tmp) diff --git a/addons/stock_dropshipping/__init__.py b/addons/stock_dropshipping/__init__.py index 1529644d61e..0da169d786a 100644 --- a/addons/stock_dropshipping/__init__.py +++ b/addons/stock_dropshipping/__init__.py @@ -18,6 +18,6 @@ # along with this program. If not, see . # ############################################################################## +import wizard - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_dropshipping/wizard/stock_invoice_onshipping.py b/addons/stock_dropshipping/wizard/stock_invoice_onshipping.py index f3774635438..6d0a7fc71f3 100644 --- a/addons/stock_dropshipping/wizard/stock_invoice_onshipping.py +++ b/addons/stock_dropshipping/wizard/stock_invoice_onshipping.py @@ -38,4 +38,9 @@ class stock_invoice_onshipping(osv.osv_memory): if pick.picking_type_id.code == 'outgoing' and src_usage == 'supplier' and dest_usage == 'customer' and pick_purchase: return 'purchase' else: - return super(stock_invoice_onshipping, self)._get_journal_type(cr, uid, context=context) \ No newline at end of file + return super(stock_invoice_onshipping, self)._get_journal_type(cr, uid, context=context) + + + _defaults = { + 'journal_type': _get_journal_type, + } \ No newline at end of file