mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[FIX] stock_picking_report_valued: Remove round_method condition because don't apply here
This commit is contained in:
committed by
Sergio Teruel
parent
47b63a1ee2
commit
f4fa234fe5
@@ -8,7 +8,7 @@
|
||||
{
|
||||
"name": "Valued Picking Report",
|
||||
"summary": "Adding Valued Picking on Delivery Slip report",
|
||||
"version": "11.0.1.0.1",
|
||||
"version": "11.0.1.0.2",
|
||||
"author": "Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "https://www.tecnativa.com",
|
||||
|
||||
@@ -41,19 +41,11 @@ class StockPicking(models.Model):
|
||||
records...).
|
||||
"""
|
||||
for pick in self:
|
||||
sale = pick.sale_id
|
||||
round_method = sale.company_id.tax_calculation_rounding_method
|
||||
if round_method == 'round_globally':
|
||||
amount_untaxed = sum(pick.move_line_ids.mapped(
|
||||
'sale_price_subtotal'))
|
||||
amount_tax = sum(pick.move_line_ids.mapped(
|
||||
'sale_price_tax'))
|
||||
else:
|
||||
round_curr = sale.currency_id.round
|
||||
amount_untaxed = amount_tax = 0.0
|
||||
for tax_id, tax_group in pick.get_taxes_values().items():
|
||||
amount_untaxed += round_curr(tax_group['base'])
|
||||
amount_tax += round_curr(tax_group['amount'])
|
||||
round_curr = pick.sale_id.currency_id.round
|
||||
amount_untaxed = amount_tax = 0.0
|
||||
for tax_id, tax_group in pick.get_taxes_values().items():
|
||||
amount_untaxed += round_curr(tax_group['base'])
|
||||
amount_tax += round_curr(tax_group['amount'])
|
||||
pick.update({
|
||||
'amount_untaxed': amount_untaxed,
|
||||
'amount_tax': amount_tax,
|
||||
|
||||
Reference in New Issue
Block a user