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

POS to Sale Order: Taxes associated with the Fiscal Position not being applied when creating Sale Order from POS #1291

Open
Jordi-Buitrago opened this issue Feb 4, 2025 · 7 comments
Labels

Comments

@Jordi-Buitrago
Copy link

Jordi-Buitrago commented Feb 4, 2025

Module

pos_order_to_sale_order

Describe the bug

When creating a Sale Order from POS using the pos_order_to_sale_order module, the taxes associated with the Fiscal Position not being applied to the generated Sale Order, even when the contact has the correct Fiscal Position configured in their settings.

To Reproduce

Affected versions: 17.0

Steps to reproduce the behavior:

  1. Configure a contact with Fiscal Position “Recargo de Equivalencia”
    Image

  2. Create a POS Order with this contact and convert the POS Order to Sale Order using pos_order_to_sale_order module
    Image

  3. Check the generated Sale Order
    Image

Expected behavior
The generated Sale Order should apply the correct taxes (including Recargo Equivalencia) as it does when creating orders directly in the Sales module.

Image

@Jordi-Buitrago Jordi-Buitrago changed the title POS to Sale Order: Fiscal Position (RE) not inherited when creating Sale Order from POS POS to Sale Order: Fiscal Position not inherited when creating Sale Order from POS Feb 4, 2025
@Jordi-Buitrago Jordi-Buitrago changed the title POS to Sale Order: Fiscal Position not inherited when creating Sale Order from POS POS to Sale Order: Taxes associated with the Fiscal Position not being applied when creating Sale Order from POS Feb 4, 2025
@legalsylvain
Copy link
Contributor

Hi.

Is your FS available in the PoS ? Because the FS comes from PoS.

https://github.com/OCA/pos/blob/17.0/pos_order_to_sale_order/models/sale_order.py#L26

@Jordi-Buitrago
Copy link
Author

@legalsylvain Sorry, it's already edited, I wanted to refer to taxes.

@legalsylvain
Copy link
Contributor

legalsylvain commented Feb 4, 2025

Same question. taxes comes from PoS Order line :
https://github.com/OCA/pos/blob/17.0/pos_order_to_sale_order/models/sale_order_line.py#L19

is something wrong in the Pos Order ?

@danielduqma
Copy link
Contributor

Hello,

Same issue here. @legalsylvain it would be right using tax_ids_after_fiscal_position instead of tax_ids? tax_ids are just product taxes without no mapping applied (I'm talking about 16.0, I don't know if there are any significant change about this in 17.0). In fact, the same issue exists in pos_sale, you have to either recompute taxes with fiscal position or propagate mapped taxes from PoS (tax_ids_after_fiscal_position).

Regards.

@legalsylvain
Copy link
Contributor

legalsylvain commented Feb 4, 2025

Makes sense ! indeed. thanks @danielduqma

@Jordi-Buitrago : could you make a PR. ideally on V17 and V16 ?

thanks !

@navarrorico
Copy link

Hi!

In the order_data recived from JS in create_order_from_pos the key 'tax_ids_after_fiscal_position' in the lines doesen't exists. Do you agree to use _recompute_taxes() in the Sale Order after the creation? This works for me in v17.

Thanks!

@danielduqma
Copy link
Contributor

Hello @navarrorico,

As I see, there are two approaches:

  • The one you said, recompute taxes using fiscal position in sale.order
  • Use already mapped tax_ids_after_fiscal_position from PoS

As this module is OCA and easy to modify, I would personally prefer the second one, as mapping has been already done and we use taxes shown to customer, but the other option is also valid.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants