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

[ADD] Show taxes details in POS order addon #38

Closed
wants to merge 3 commits into from

Conversation

antespi
Copy link

@antespi antespi commented Jul 9, 2015

This module track list of taxes in a POS order. Then shows one line per tax with its total amount in POS order PDF report.

Notice : As a POS order hasn't a mandatory partner, this addon computes taxes regardless partner's fiscal position (if any). User can create an invoice from the POS order if he wants to take care about partner's fiscal position.

Notice : Taxes are computed when POS Order is paid, because after this action product will not change.

@guewen
Copy link
Member

guewen commented Jul 10, 2015

👍

# Find orders with state : paid, done or invoiced
orders = self.search([('state', 'in', ('paid', 'done', 'invoiced'))])
# Compute tax detail
orders.compute_tax_detail()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work if an Order was realized with a product with VAT 1, and now the product has a VAT 2 defined.
Sample : VAT changes in France from 19.6% to 20% (in 2014).
Notice : I have no solution. Maybe you could :

  • mention the possible problem in the readme file;
  • compute_tax_detail function could return False if pos_order.amount_tax != sum(pos_order_tax.amount).
  • action_paid should fail if compute_tax_detail return False. (so it will be possible for user to fix the problem).
    (This last case is if Taxes change when the session is opened.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@legalsylvain, thanks for your warning

Taxes are copied (name, base, amount) when order is paid, so taxes are the ones were configured in product when order was paid. Taxes can be changed in product, but this will not affect to order.

Original Odoo code does the same, calculates amount_tax and amount first in JS code (POS) and then recalculates taxes again when creating account_move when POS session is closing. So, you can check this in runbot and see that payments are incoherent with account moves created when POS session is closed and validated.

It's not expected that user change taxes of a product when a POS session is in process, but you're right, I've added this notice in README. I've also implement an amount check to advice user when taxes have been change to one or more products during POS session.

@antespi
Copy link
Author

antespi commented Jul 29, 2015

These features are included, with better implementation, in this PR: #39

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

Successfully merging this pull request may close these issues.

None yet

3 participants