'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)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
+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:
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