c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #01518
[Bug 667920] [NEW] children tax calculation "included in base amount"
Public bug reported:
We have a parent tax of 5% and another tax 7.5% which is applied on the
original value AND the 5% tax. So we set the following:
tax 5%
in the section children taxes we check "included in base amount", then add the 7.5% tax
in the Sales order, the taxes are calcualted correctly, but when the invoice is generated the parent/child relationship gets reversed.
----------------------------------------------------------------
We believe the problem is that the "included in base amount" code is not in the correct place in the file addons/account/accout.py
class account_tax
function _unit_compute
the 2 lines of code:
#if tax.include_base_amount:
# cur_price_unit+=amount2
need to be INSIDE the children tax calculation, not outside of it, so the could would look like:
if tax.child_ids:
if tax.child_depend:
latest = res.pop()
if tax.include_base_amount:
amount = cur_price_unit + amount2
else:
amount = amount2
(notice the placement of include_base_amount).
You will need to look at the original code to understand this, but I
believe this is correct and WORKS when we test it.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
children tax calculation "included in base amount"
https://bugs.launchpad.net/bugs/667920
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Addons Modules: New
Bug description:
We have a parent tax of 5% and another tax 7.5% which is applied on the original value AND the 5% tax. So we set the following:
tax 5%
in the section children taxes we check "included in base amount", then add the 7.5% tax
in the Sales order, the taxes are calcualted correctly, but when the invoice is generated the parent/child relationship gets reversed.
----------------------------------------------------------------
We believe the problem is that the "included in base amount" code is not in the correct place in the file addons/account/accout.py
class account_tax
function _unit_compute
the 2 lines of code:
#if tax.include_base_amount:
# cur_price_unit+=amount2
need to be INSIDE the children tax calculation, not outside of it, so the could would look like:
if tax.child_ids:
if tax.child_depend:
latest = res.pop()
if tax.include_base_amount:
amount = cur_price_unit + amount2
else:
amount = amount2
(notice the placement of include_base_amount).
You will need to look at the original code to understand this, but I believe this is correct and WORKS when we test it.
Follow ups
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Fabien (Open ERP), 2010-12-29
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Fabien (Open ERP), 2010-12-29
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Fabien (Open ERP), 2010-12-29
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Maxime Chambreuil (http://www.savoirfairelinux.com), 2010-11-06
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Maxime Chambreuil (http://www.savoirfairelinux.com), 2010-11-05
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Leigh Willard, 2010-11-05
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Maxime Chambreuil (http://www.savoirfairelinux.com), 2010-10-29
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Launchpad Bug Tracker, 2010-10-29
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Maxime Chambreuil (http://www.savoirfairelinux.com), 2010-10-29
-
[Bug 667920] Re: [6.0RC1] Children tax calculation "included in base amount"
From: Maxime Chambreuil (http://www.savoirfairelinux.com), 2010-10-29
-
[Bug 667920] Re: children tax calculation "included in base amount"
From: Serge, 2010-10-29
-
[Bug 667920] Re: children tax calculation "included in base amount"
From: Serge, 2010-10-29
-
[Bug 667920] Re: children tax calculation "included in base amount"
From: Serge, 2010-10-29
-
[Bug 667920] Re: children tax calculation "included in base amount"
From: saz(OpenERP), 2010-10-29
-
[Bug 667920] Re: children tax calculation "included in base amount"
From: saz(OpenERP), 2010-10-29
-
[Bug 667920] [NEW] children tax calculation "included in base amount"
From: Leigh Willard, 2010-10-28
References