Merge lp:~joao-gama/openerp-canada/6.1-bug-1087847-joao-gama into lp:openerp-canada/6.1

Status: Merged
Merged at revision: 4
Proposed branch: lp:~joao-gama/openerp-canada/6.1-bug-1087847-joao-gama
Merge into: lp:openerp-canada/6.1
Diff against target: 31 lines (+13/-8)
1 file modified
hr_expense_line_supplier/hr_expense_line_supplier.py (+13/-8)
To merge this branch: bzr merge lp:~joao-gama/openerp-canada/6.1-bug-1087847-joao-gama
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Approve
Review via email: mp+139917@code.launchpad.net

Commit message

[FIX] Bug lp:1087847

Description of the change

[FIX] Bug lp:1087847

To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_expense_line_supplier/hr_expense_line_supplier.py'
2--- hr_expense_line_supplier/hr_expense_line_supplier.py 2012-11-15 22:18:00 +0000
3+++ hr_expense_line_supplier/hr_expense_line_supplier.py 2012-12-14 15:03:22 +0000
4@@ -53,14 +53,19 @@
5 tax_tmp = [x.id for x in l.product_id.supplier_taxes_id]
6
7 tmp_dict = {}
8- for i in l.partner_id.property_account_position.tax_ids:
9- tmp_dict[i.tax_src_id.id] = i.tax_dest_id.id
10-
11- for y in tax_tmp:
12- if y in tmp_dict.keys():
13- tax_id.append(tmp_dict[y])
14- else:
15- tax_id.append(y)
16+
17+ if l.partner_id.property_account_position:
18+ for i in l.partner_id.property_account_position.tax_ids:
19+ tmp_dict[i.tax_src_id.id] = i.tax_dest_id.id
20+
21+ for y in tax_tmp:
22+ if y in tmp_dict.keys():
23+ tax_id.append(tmp_dict[y])
24+ else:
25+ tax_id.append(y)
26+ else:
27+ tax_id = tax_tmp
28+
29 else:
30 acc = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category')
31 if not acc:

Subscribers

People subscribed via source and target branches