mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[10.0][FIX] stock_valued_picking_report: Fix report (#38)
This commit is contained in:
committed by
Pedro M. Baeza
parent
3c0ab13021
commit
d1854068e9
@@ -60,6 +60,7 @@ Contributors
|
||||
* Oihane Crucelaegui <oihane.crucelaegi@avanzosc.es>
|
||||
* Carlos Dauden <carlos.dauden@tecnativa.com>
|
||||
* David Vidal <david.vidal@tecnativa.com>
|
||||
* Luis M. Ontalba <luis.martinez@tecnativa.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{
|
||||
"name": "Stock Valued Picking Report",
|
||||
"summary": "Adding Valued Picking on Delivery Slip report",
|
||||
"version": "10.0.1.0.0",
|
||||
"version": "10.0.1.0.1",
|
||||
"author": "Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "https://www.tecnativa.com",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<th class="text-right"><strong>Taxes</strong></th>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='pack_operation.product_uom_id']/.." position="after">
|
||||
<xpath expr="//span[@t-field='pack_operation.qty_done_uom_ordered']/.." position="after">
|
||||
<t t-if="o.valued">
|
||||
<td class="text-right"><span t-field="pack_operation.sale_price_unit" /></td>
|
||||
<td class="text-right" groups="sale.group_discount_per_so_line">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Tecnativa - David Vidal
|
||||
# Copyright 2017 Tecnativa - Luis M. Ontalba
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import common
|
||||
@@ -27,7 +28,10 @@ class TestStockPickingValued(common.SavepointCase):
|
||||
cls.sale_order = cls.env['sale.order'].create({
|
||||
'partner_id': cls.partner.id,
|
||||
'order_line': [(0, 0, {'product_id': cls.product.id})],
|
||||
'company_id': cls.env.user.company_id.id,
|
||||
})
|
||||
cls.sale_order.company_id.tax_calculation_rounding_method = (
|
||||
'round_per_line')
|
||||
|
||||
def test_01_confirm_order(self):
|
||||
self.assertTrue(self.partner.valued_picking)
|
||||
@@ -46,3 +50,13 @@ class TestStockPickingValued(common.SavepointCase):
|
||||
self.assertEqual(picking.amount_untaxed, 0.0)
|
||||
self.assertEqual(picking.amount_tax, 0.0)
|
||||
self.assertEqual(picking.amount_total, 0.0)
|
||||
|
||||
def test_03_tax_rounding_method(self):
|
||||
self.sale_order.company_id.tax_calculation_rounding_method = (
|
||||
'round_globally')
|
||||
self.sale_order.action_confirm()
|
||||
self.assertTrue(len(self.sale_order.picking_ids))
|
||||
for picking in self.sale_order.picking_ids:
|
||||
self.assertEqual(picking.amount_untaxed, 100.0)
|
||||
self.assertEqual(picking.amount_tax, 15.0)
|
||||
self.assertEqual(picking.amount_total, 115.0)
|
||||
|
||||
Reference in New Issue
Block a user