Bharat Devnani (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-838887-bde into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #838887 in OpenERP Addons: "hr_timesheet_invoice must check for
account_id"
https://bugs.launchpad.net/openobject-addons/+bug/838887
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-838887-bde/+merge/74564
Hello Sir,
I have applied the patch given by Ferdinand, with little modifications.
Thanks & Regards,
Devnani Bharat R.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-838887-bde/+merge/74564
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-838887-bde.
=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py'
--- hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py 2011-05-02 18:46:43 +0000
+++ hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py 2011-09-08 09:27:34 +0000
@@ -126,6 +126,8 @@
taxes = []
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
+ if not account_id:
+ raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
curr_line = {
'price_unit': -amount,
'quantity': 1.0,
@@ -146,6 +148,8 @@
taxes = product.taxes_id
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
+ if not account_id:
+ raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
curr_line = {
'price_unit': account.amount_max - amount_total,
'quantity': 1.0,
=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py'
--- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2011-05-02 18:46:43 +0000
+++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2011-09-08 09:27:34 +0000
@@ -155,6 +155,8 @@
taxes = product.taxes_id
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
+ if not account_id:
+ raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
curr_line = {
'price_unit': price,
'quantity': qty,
_______________________________________________
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