openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #05630
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-760412-pso into lp:openobject-addons
Priyesh (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-760412-pso into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #760412 in OpenERP Addons: "Bank statements crashes when confirmed if partner not defined"
https://bugs.launchpad.net/openobject-addons/+bug/760412
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-760412-pso/+merge/58228
Fixed bug: 760412 (https://bugs.launchpad.net/openobject-addons/+bug/760412)
Fixed Bank statements crashes when confirmed if partner not defined
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-760412-pso/+merge/58228
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-760412-pso.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2011-03-19 09:35:42 +0000
+++ account_voucher/account_voucher.py 2011-04-19 05:09:28 +0000
@@ -757,9 +757,9 @@
account_id = inv.writeoff_acc_id.id
write_off_name = inv.comment
elif inv.type in ('sale', 'receipt'):
- account_id = inv.partner_id.property_account_receivable.id
+ account_id = inv.partner_id and inv.partner_id.property_account_receivable.id or inv.account_id.id
else:
- account_id = inv.partner_id.property_account_payable.id
+ account_id = inv.partner_id and inv.partner_id.property_account_payable.id or inv.account_id.id
move_line = {
'name': write_off_name or name,
'account_id': account_id,
Follow ups