diff --git a/stock_picking_report_valued/__manifest__.py b/stock_picking_report_valued/__manifest__.py index d739f96..9f64b9c 100644 --- a/stock_picking_report_valued/__manifest__.py +++ b/stock_picking_report_valued/__manifest__.py @@ -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", diff --git a/stock_picking_report_valued/models/stock_picking.py b/stock_picking_report_valued/models/stock_picking.py index 77a26e1..abf9165 100644 --- a/stock_picking_report_valued/models/stock_picking.py +++ b/stock_picking_report_valued/models/stock_picking.py @@ -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,