[FIX] stock_picking_report_valued: Remove round_method condition because don't apply here

This commit is contained in:
Carlos Dauden
2019-06-11 15:05:22 +02:00
committed by Sergio Teruel
parent 47b63a1ee2
commit f4fa234fe5
2 changed files with 6 additions and 14 deletions

View File

@@ -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",

View File

@@ -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,