File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
account_ecotax_sale_tax/tests
account_ecotax_sale/tests Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 22# @author Mourad EL HADJ MIMOUNE <[email protected] > 33# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44
5+ from odoo import Command
56from odoo .tests .common import Form
67
78from odoo .addons .account_ecotax .tests .test_ecotax import TestInvoiceEcotaxCommon
@@ -16,6 +17,7 @@ def setUpClass(cls):
1617 "name" : "product_a" ,
1718 "uom_id" : cls .env .ref ("uom.product_uom_unit" ).id ,
1819 "weight" : 100 ,
20+ "taxes_id" : [Command .set (cls .invoice_tax .ids )],
1921 "list_price" : 200 ,
2022 }
2123 )
@@ -24,6 +26,7 @@ def setUpClass(cls):
2426 "name" : "product_b" ,
2527 "uom_id" : cls .env .ref ("uom.product_uom_unit" ).id ,
2628 "list_price" : 200 ,
29+ "taxes_id" : [Command .set (cls .invoice_tax .ids )],
2730 "weight" : 400 ,
2831 }
2932 )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def test_01_classification_weight_based_ecotax(self):
2929 so_form .save ()
3030 self .assertEqual (self .sale .order_line .ecotax_amount_unit , 16 )
3131 self .assertEqual (self .sale .order_line .subtotal_ecotax , 48 )
32- self .assertEqual (self .sale .amount_total , 648 )
32+ self .assertEqual (self .sale .amount_total , 712.8 )
3333 self .assertEqual (self .sale .amount_ecotax , 48 )
3434
3535 def test_02_classification_ecotax (self ):
@@ -56,5 +56,5 @@ def test_02_classification_ecotax(self):
5656 self .assertAlmostEqual (sale_line1 .subtotal_ecotax , 15.0 )
5757 self .assertEqual (sale_line2 .ecotax_amount_unit , 16 )
5858 self .assertEqual (sale_line2 .subtotal_ecotax , 32 )
59- self .assertEqual (self .sale .amount_total , 1047.0 )
59+ self .assertEqual (self .sale .amount_total , 1151.7 )
6060 self .assertEqual (self .sale .amount_ecotax , 47.0 )
You can’t perform that action at this time.
0 commit comments