[IMP] Make sure we can do dropship where the purchase is invoiced on incoming shipments
This commit is contained in:
parent
5d43f4b0c9
commit
ff308c2152
|
@ -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)
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import wizard
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -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)
|
||||
return super(stock_invoice_onshipping, self)._get_journal_type(cr, uid, context=context)
|
||||
|
||||
|
||||
_defaults = {
|
||||
'journal_type': _get_journal_type,
|
||||
}
|
Loading…
Reference in New Issue