[FIX] cannot create advance invoice in a SO
lp bug: https://launchpad.net/bugs/856402 fixed bzr revid: ara@tinyerp.com-20110923115902-0xy62ca4hb8jhq9b
This commit is contained in:
parent
2c2367e551
commit
614cfc21d6
|
@ -65,6 +65,13 @@ class sale_advance_payment_inv(osv.osv_memory):
|
|||
that is defined as 'Automatic Invoice after delivery'."))
|
||||
val = obj_lines.product_id_change(cr, uid, [], sale_adv_obj.product_id.id,
|
||||
uom = False, partner_id = sale.partner_id.id, fposition_id = sale.fiscal_position.id)
|
||||
|
||||
if not val['value'].get('account_id'):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('There is no income account defined ' \
|
||||
'for this product: "%s" (id:%d)') % \
|
||||
(sale_adv_obj.product_id.name, sale_adv_obj.product_id.id,))
|
||||
|
||||
line_id = obj_lines.create(cr, uid, {
|
||||
'name': val['value']['name'],
|
||||
'account_id': val['value']['account_id'],
|
||||
|
|
Loading…
Reference in New Issue