Ashvin Rathod (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-856402-ara into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #856402 in OpenERP Addons: "cannot create advance invoice in a SO "
https://bugs.launchpad.net/openobject-addons/+bug/856402
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-856402-ara/+merge/76721
Hello,
Fix: cannot create advance invoice in a SO
Thanks,
ara
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-856402-ara/+merge/76721
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-856402-ara.
=== modified file 'sale/wizard/sale_make_invoice_advance.py'
--- sale/wizard/sale_make_invoice_advance.py 2011-01-14 00:11:01 +0000
+++ sale/wizard/sale_make_invoice_advance.py 2011-09-23 12:08:24 +0000
@@ -65,6 +65,13 @@
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'],
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp