[fIX] lp 701480

bzr revid: fp@tinyerp.com-20110117080556-3i3d4z4gdktpmvpd
This commit is contained in:
Fabien Pinckaers 2011-01-17 09:05:56 +01:00
parent 147c88053f
commit a51ab82160
2 changed files with 3 additions and 3 deletions

View File

@ -363,7 +363,7 @@ class purchase_order(osv.osv):
_('There is no purchase journal defined for this company: "%s" (id:%d)') % (o.company_id.name, o.company_id.id)) _('There is no purchase journal defined for this company: "%s" (id:%d)') % (o.company_id.name, o.company_id.id))
inv = { inv = {
'name': o.partner_ref or o.name, 'name': o.partner_ref or o.name,
'reference': "P%dPO%d" % (o.partner_id.id, o.id), 'reference': o.partner_ref or o.name,
'account_id': a, 'account_id': a,
'type': 'in_invoice', 'type': 'in_invoice',
'partner_id': o.partner_id.id, 'partner_id': o.partner_id.id,
@ -440,7 +440,7 @@ class purchase_order(osv.osv):
if order_line.product_id.product_tmpl_id.type in ('product', 'consu'): if order_line.product_id.product_tmpl_id.type in ('product', 'consu'):
dest = order.location_id.id dest = order.location_id.id
move = self.pool.get('stock.move').create(cr, uid, { move = self.pool.get('stock.move').create(cr, uid, {
'name': 'PO:'+order_line.name, 'name': order.name + ': ' +(order_line.name or ''),
'product_id': order_line.product_id.id, 'product_id': order_line.product_id.id,
'product_qty': order_line.product_qty, 'product_qty': order_line.product_qty,
'product_uos_qty': order_line.product_qty, 'product_uos_qty': order_line.product_qty,

View File

@ -403,7 +403,7 @@ class sale_order(osv.osv):
'name': order.client_order_ref or '', 'name': order.client_order_ref or '',
'origin': order.name, 'origin': order.name,
'type': 'out_invoice', 'type': 'out_invoice',
'reference': "P%dSO%d" % (order.partner_id.id, order.id), 'reference': order.client_order_ref or order.name,
'account_id': a, 'account_id': a,
'partner_id': order.partner_id.id, 'partner_id': order.partner_id.id,
'journal_id': journal_ids[0], 'journal_id': journal_ids[0],