Skip to content

[17.0][FIX] stock_picking_report_valued: Respect global tax rounding method#490

Open
oscars8a wants to merge 3 commits into
OCA:17.0from
oscars8a:17.0-stock_picking_report_valued-fix-round_globally
Open

[17.0][FIX] stock_picking_report_valued: Respect global tax rounding method#490
oscars8a wants to merge 3 commits into
OCA:17.0from
oscars8a:17.0-stock_picking_report_valued-fix-round_globally

Conversation

@oscars8a

@oscars8a oscars8a commented Apr 8, 2026

Copy link
Copy Markdown

Problem:

The module was calculating picking tax amounts by always summing the
sale_price_tax field from each move line, regardless of the company's
tax_calculation_rounding_method setting. This caused discrepancies with
the related sale order when using global tax rounding (round_globally).

When round_globally is configured, sale.order calculates taxes on the
total base amount using account.tax._compute_taxes(), but the picking
was summing individual line taxes, leading to rounding differences.

Example:
I've recreated the example in Runboat.
https://www.awesomescreenshot.com/video/51310632?key=f816ff453f1917171dd799d033108b69
Sorry for my poor pronunciation

With Spanish accounting enabled, line discounts and global rounding selected.
In the Sale Order:
image

In the Delivery Slip Valued
image

Solution:

Modified StockPicking._compute_amount_all() to respect the company's
tax rounding configuration:

  • When tax_calculation_rounding_method is "round_globally": Uses the
    same method as sale.order by calling account.tax._compute_taxes()
    with all lines together, ensuring taxes match the sale order exactly.

  • When tax_calculation_rounding_method is "round_per_line": Keeps the
    original behavior of summing sale_price_tax from each line.

This ensures picking amounts always match the related sale order totals,
regardless of the tax rounding method configured.

@oscars8a oscars8a changed the title [FIX] stock_picking_report_valued: Respect global tax rounding method [17.0][FIX] stock_picking_report_valued: Respect global tax rounding method Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant