[6.0RC1] Children tax calculation "included in base amount"

Bug #667920 reported by Leigh Willard
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Low
Maxime Chambreuil (http://www.savoirfairelinux.com)

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.

Related branches

Revision history for this message
Azazahmed Saiyed (OpenERP) (saz-openerp) wrote :

Hello Leigh Willard,

I have checked the bug specification with example and implemented this successfully. You can check the screen shots in the attachment.(sale order and its related invoice).

Would you please provide me the screen shot from your end, So i can get the exact problem regarding account taxes.

Thanks

Revision history for this message
Azazahmed Saiyed (OpenERP) (saz-openerp) wrote :
Changed in openobject-addons:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Serge (sboivin) wrote :

TPS = Parent taxe
TVQ = Child Taxe

TPS = 5% of total
TVQ = 7% of total + TPS

With the change Leigh say in her post, all work fine for us

Revision history for this message
Serge (sboivin) wrote :

Note : on screen shot is write 7.5 % but is 7%

(i forget to change precision decimal before do my screen shot)

Revision history for this message
Serge (sboivin) wrote :

Note: TVQ = 7% of (total + TPS)

(Sorry for triple post, i will ask how edit)

summary: - children tax calculation "included in base amount"
+ [6.0RC1] Children tax calculation "included in base amount"
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :
Changed in openobject-addons:
status: Incomplete → Confirmed
description: updated
Changed in openobject-addons:
assignee: nobody → Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903)
Revision history for this message
Leigh Willard (leigh) wrote :

I do not see this change in the latest trunk version. When will it be made available?

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

The merge is pending review from the OpenERP Core Team :

https://code.launchpad.net/~openerp-canada/openobject-addons/lp667920/+merge/39657

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

It works fine in trunk. See attachments on how to configure OpenERP.

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :
Changed in openobject-addons:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.