← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~pedro.baeza/ocb-addons/fix-lp_1254631 into lp:ocb-addons

 

Pedro Manuel Baeza has proposed merging lp:~pedro.baeza/ocb-addons/fix-lp_1254631 into lp:ocb-addons.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1254631 in OpenERP Community Backports (Addons): "No bank account on invoice when invoicing a contact"
  https://bugs.launchpad.net/ocb-addons/+bug/1254631

For more details, see:
https://code.launchpad.net/~pedro.baeza/ocb-addons/fix-lp_1254631/+merge/216728

Fix for the bug #1254631. Details on the bug report.
-- 
https://code.launchpad.net/~pedro.baeza/ocb-addons/fix-lp_1254631/+merge/216728
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~pedro.baeza/ocb-addons/fix-lp_1254631 into lp:ocb-addons.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2014-03-24 09:12:54 +0000
+++ account/account_invoice.py	2014-04-22 13:40:24 +0000
@@ -519,8 +519,8 @@
                 acc_id = p.property_account_payable.id
                 partner_payment_term = p.property_supplier_payment_term and p.property_supplier_payment_term.id or False
             fiscal_position = p.property_account_position and p.property_account_position.id or False
-            if p.bank_ids:
-                bank_id = p.bank_ids[0].id
+            if p.commercial_partner_id.bank_ids:
+                bank_id = p.commercial_partner_id.bank_ids[0].id
 
         result = {'value': {
             'account_id': acc_id,


Follow ups