Merge lp:~rr.clearcorp/openobject-addons/7.0-base_intercompany_sale into lp:~clearcorp-drivers/openobject-addons/elico-7.0-ccorp

Proposed by Ronald Rubi on 2014-08-05
Status: Merged
Merged at revision: 38
Proposed branch: lp:~rr.clearcorp/openobject-addons/7.0-base_intercompany_sale
Merge into: lp:~clearcorp-drivers/openobject-addons/elico-7.0-ccorp
Diff against target: 27 lines (+4/-2)
2 files modified
base_intercompany_sale/purchase.py (+2/-1)
base_intercompany_sale/sale.py (+2/-1)
To merge this branch: bzr merge lp:~rr.clearcorp/openobject-addons/7.0-base_intercompany_sale
Reviewer Review Type Date Requested Status
ClearCorp drivers 2014-08-05 Pending
Review via email: mp+229660@code.launchpad.net

Description of the change

Fix tax calculation in base_intercompany_sale

To post a comment you must log in.
38. By Ronald Rubi on 2014-08-05

[MRG] Fix tax calculation in base_intercompany_sale

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_intercompany_sale/purchase.py'
2--- base_intercompany_sale/purchase.py 2014-08-01 15:53:18 +0000
3+++ base_intercompany_sale/purchase.py 2014-08-05 16:28:52 +0000
4@@ -311,7 +311,8 @@
5 taxes_id = []
6 if record.order_id:
7 if record.product_id:
8- for tax in record.product_id.taxes_id:
9+ product = sess.pool.get('product.product').browse(sess.cr, ic_uid, record.product_id.id)
10+ for tax in product.taxes_id:
11 if tax.company_id.id == backend.company_id.id:
12 taxes_id.append(tax)
13 line_tax_ids = sess.pool.get('account.fiscal.position').map_tax(sess.cr, ic_uid, record.order_id.fiscal_position, taxes_id)
14
15=== modified file 'base_intercompany_sale/sale.py'
16--- base_intercompany_sale/sale.py 2014-08-01 15:53:18 +0000
17+++ base_intercompany_sale/sale.py 2014-08-05 16:28:52 +0000
18@@ -372,7 +372,8 @@
19 taxes_id = []
20 if record.order_id:
21 if record.product_id:
22- for tax in record.product_id.taxes_id:
23+ product = sess.pool.get('product.product').browse(sess.cr, ic_uid, record.product_id.id)
24+ for tax in product.supplier_taxes_id:
25 if tax.company_id.id == backend.company_id.id:
26 taxes_id.append(tax)
27 line_tax_ids = sess.pool.get('account.fiscal.position').map_tax(sess.cr, ic_uid, record.order_id.fiscal_position, taxes_id)

Subscribers

People subscribed via source and target branches

to all changes: