double tax deduction because of missing fiscal position mappings
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 69/100
Research direction
Start in the website_sale_b2x_alt_price module and locate product.template's _get_prices method, where the issue says taxes are mapped using the partner's fiscal position. Check the website fiscal position and company used for that calculation, then reproduce the listed local pricelist and EU portal user scenario. Done means the net price is calculated correctly without removing tax twice.
Written by the indexing model from the issue text.
Description
Module
website_sale_b2x_alt_price
Describe the bug
if you have multiple pricelists especially with different tax applications and/or users from different trx authorities (e.g. OSS) prices are incorrect
To Reproduce
all
Steps to reproduce the behavior:
- pricelist in local
- portal user from other eu country than company - so it should get VAT 0%
- proces will gave net price too low - double tax removal
Expected behavior
net price to be properly calculated
Additional context
actual product.template in _get_prices is using taxes from partner, excluding tax remapping
taxes = partner.property_account_position_id.map_tax(
product.sudo().taxes_id.filtered(lambda x: x.company_id == company_id)
).with_context(force_price_include=alt_field == "total_excluded")
this should become:
taxes = (
website.fiscal_position_id.sudo()
.map_tax(product.sudo().taxes_id.filtered(
lambda tax_id: tax_id.company_id == website_id.company_id)
).with_context(force_price_include=alt_field == 'total_excluded')
)
- Dominant language
- HTML
- Stars
- 206
- Forks
- 578
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OCA/e-commerce
-
help wanted no stale work in progress
Difficulty 2/5 Half a day Newbie friendliness 68/100
OCA/e-commerce#1343 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
OCA/e-commerce#1274 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OCA/e-commerce#1237 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 28/100
OCA/e-commerce#1156 · 1 comment ·
Maintainers usually reply within 1 day
-
help wanted no stale work in progress
Difficulty 4/5 3-5 days Newbie friendliness 45/100
OCA/e-commerce#1115 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
finos/fluxnova-bpm-platform#387 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
OHDSI/Data2Evidence#3693 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Project-N-E-K-O/N.E.K.O#3725 ·
Maintainers usually reply within 1 day