Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] pos_sale: create downpayment line for unique tax combination #174076

Conversation

robinengels
Copy link
Contributor

When importing a sale in PoS and doing a downpayment there was only one downpayment line created. And because of this the taxes where not always correct. If you do a 100% downpayment you would end up with negative untaxed amount on the invoice.

Steps to reproduce:

  • Create 2 taxes, A and B with 5% and 10%
  • Create 2 products, A and B. Assign the 2 taxes to the products
  • Create a sale order with the 2 products
  • Open the sale order in PoS and make a downpayment for it

Observation: There is only one downpayment line when it should have 2.

Why the fix:

If you do the same flow in the sales app, you get 2 downpayment lines. We do this to allign the behavior in sales and PoS. For each unique tax combination we compute what part of the total downpayment should be assigned to it. Then we make sure that the taxes are assigned to the line and that the line has the right value.

opw-3999047

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Jul 22, 2024

Pull request status dashboard

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Jul 22, 2024
When importing a sale in PoS and doing a downpayment there was only one
downpayment line created. And because of this the taxes where not always
correct. If you do a 100% downpayment you would end up with negative
untaxed amount on the invoice.

Steps to reproduce:
-------------------
* Create 2 taxes, A and B with 5% and 10%
* Create 2 products, A and B. Assign the 2 taxes to the products
* Create a sale order with the 2 products
* Open the sale order in PoS and make a downpayment for it
> Observation: There is only one downpayment line when it should have 2.

Why the fix:
------------
If you do the same flow in the sales app, you get 2 downpayment lines.
We do this to allign the behavior in sales and PoS. For each unique tax
combination we compute what part of the total downpayment should be
assigned to it. Then we make sure that the taxes are assigned to the
line and that the line has the right value.

opw-3999047
@robinengels robinengels force-pushed the 17.0-opw-3999047-untaxed_amount_downpayment-roen branch from 05d5d2f to 362b86c Compare July 23, 2024 15:23
@robinengels robinengels marked this pull request as ready for review July 23, 2024 15:24
@C3POdoo C3POdoo requested review from a team and adgu-odoo and removed request for a team July 23, 2024 15:26
@caburj
Copy link
Contributor

caburj commented Jul 24, 2024

robodoo r+

@robodoo robodoo closed this in afe4a2b Jul 24, 2024
@fw-bot fw-bot deleted the 17.0-opw-3999047-untaxed_amount_downpayment-roen branch August 7, 2024 11:46
Dasanchez1992 pushed a commit to Nosolotec/odoo that referenced this pull request Aug 22, 2024
When importing a sale in PoS and doing a downpayment there was only one
downpayment line created. And because of this the taxes where not always
correct. If you do a 100% downpayment you would end up with negative
untaxed amount on the invoice.

Steps to reproduce:
-------------------
* Create 2 taxes, A and B with 5% and 10%
* Create 2 products, A and B. Assign the 2 taxes to the products
* Create a sale order with the 2 products
* Open the sale order in PoS and make a downpayment for it
> Observation: There is only one downpayment line when it should have 2.

Why the fix:
------------
If you do the same flow in the sales app, you get 2 downpayment lines.
We do this to allign the behavior in sales and PoS. For each unique tax
combination we compute what part of the total downpayment should be
assigned to it. Then we make sure that the taxes are assigned to the
line and that the line has the right value.

opw-3999047

closes odoo#174076

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
riccardo-metrum pushed a commit to resultrum/odoo that referenced this pull request Sep 30, 2024
When importing a sale in PoS and doing a downpayment there was only one
downpayment line created. And because of this the taxes where not always
correct. If you do a 100% downpayment you would end up with negative
untaxed amount on the invoice.

Steps to reproduce:
-------------------
* Create 2 taxes, A and B with 5% and 10%
* Create 2 products, A and B. Assign the 2 taxes to the products
* Create a sale order with the 2 products
* Open the sale order in PoS and make a downpayment for it
> Observation: There is only one downpayment line when it should have 2.

Why the fix:
------------
If you do the same flow in the sales app, you get 2 downpayment lines.
We do this to allign the behavior in sales and PoS. For each unique tax
combination we compute what part of the total downpayment should be
assigned to it. Then we make sure that the taxes are assigned to the
line and that the line has the right value.

opw-3999047

closes odoo#174076

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants