@@ -59,9 +59,11 @@ def setUpClass(cls):
5959 "code" : "SJT0" ,
6060 }
6161 )
62- cls .default_pricelist = cls .env ['product.pricelist' ].create ({
63- 'name' : 'Default Pricelist' ,
64- })
62+ cls .default_pricelist = cls .env ["product.pricelist" ].create (
63+ {
64+ "name" : "Default Pricelist" ,
65+ }
66+ )
6567
6668 cls .setUpClassicProducts ()
6769
@@ -244,7 +246,7 @@ def test_02_invoice_plan_with_advance(self):
244246 with self .assertRaises (ValidationError ):
245247 self .so_service .action_confirm ()
246248 advance_line = self .so_service .invoice_plan_ids .filtered (
247- lambda l : l .invoice_type == "advance"
249+ lambda plan : plan .invoice_type == "advance"
248250 )
249251 self .assertEqual (len (advance_line ), 1 , "No one advance line" )
250252 # Add 10% to advance
@@ -262,7 +264,7 @@ def test_02_invoice_plan_with_advance(self):
262264 # Valid total quantity of invoices (exclude Advance line)
263265 quantity = sum (
264266 invoices .mapped ("invoice_line_ids" )
265- .filtered (lambda l : l .product_id == self .product_order )
267+ .filtered (lambda line : line .product_id == self .product_order )
266268 .mapped ("quantity" )
267269 )
268270 self .assertEqual (quantity , 1 , "Wrong number of total invoice quantity" )
@@ -326,7 +328,8 @@ def test_invoice_plan_so_edit(self):
326328 ],
327329 }
328330 )
329- # Overall amount changed to 3080, install amount not changed, only percent changed.
331+ # Overall amount changed to 3080, install amount not
332+ # changed, only percent changed.
330333 self .assertEqual (self .so_service .amount_total , 3080.0 )
331334 self .so_service .invoice_plan_ids ._compute_amount ()
332335 self .assertEqual (first_install .amount , 280.0 )
0 commit comments