@@ -19,10 +19,10 @@ def test_invoice_created_at_shipping(self):
19
19
self .so1 .action_confirm ()
20
20
for picking in self .so1 .picking_ids :
21
21
for move in picking .move_ids :
22
- move .quantity_done = move .product_uom_qty
22
+ move .quantity = move .product_uom_qty
23
23
picking .action_assign ()
24
24
with mute_logger ("odoo.addons.queue_job.delay" ):
25
- picking .with_context (test_queue_job_no_delay = True ).button_validate ()
25
+ picking .with_context (queue_job__no_delay = True ).button_validate ()
26
26
self .assertEqual (len (self .so1 .invoice_ids ), 1 )
27
27
self .assertEqual (self .so1 .invoice_ids .state , "posted" )
28
28
@@ -32,10 +32,10 @@ def test_invoice_not_created_at_shipping(self):
32
32
self .so1 .action_confirm ()
33
33
for picking in self .so1 .picking_ids :
34
34
for move in picking .move_ids :
35
- move .quantity_done = move .product_uom_qty
35
+ move .quantity = move .product_uom_qty
36
36
picking .action_assign ()
37
37
with mute_logger ("odoo.addons.queue_job.delay" ):
38
- picking .with_context (test_queue_job_no_delay = True ).button_validate ()
38
+ picking .with_context (queue_job__no_delay = True ).button_validate ()
39
39
self .assertEqual (len (self .so1 .invoice_ids ), 0 )
40
40
41
41
def test_picking_multi_order_single_invoice (self ):
@@ -50,10 +50,10 @@ def test_picking_multi_order_single_invoice(self):
50
50
so2 .picking_ids .move_ids .picking_id = picking
51
51
# Transfer the remaining picking with moves
52
52
for move in picking .move_ids :
53
- move .quantity_done = move .product_uom_qty
53
+ move .quantity = move .product_uom_qty
54
54
picking .action_assign ()
55
55
with mute_logger ("odoo.addons.queue_job.delay" ):
56
- picking .with_context (test_queue_job_no_delay = True ).button_validate ()
56
+ picking .with_context (queue_job__no_delay = True ).button_validate ()
57
57
self .assertEqual (len (self .so1 .invoice_ids ), 1 )
58
58
self .assertEqual (self .so1 .invoice_ids .state , "posted" )
59
59
self .assertEqual (self .so1 .invoice_ids , so2 .invoice_ids )
@@ -70,10 +70,10 @@ def test_picking_multi_order_multi_invoice(self):
70
70
so2 .picking_ids .move_ids .picking_id = picking
71
71
# Transfer the remaining picking with moves
72
72
for move in picking .move_ids :
73
- move .quantity_done = move .product_uom_qty
73
+ move .quantity = move .product_uom_qty
74
74
picking .action_assign ()
75
75
with mute_logger ("odoo.addons.queue_job.delay" ):
76
- picking .with_context (test_queue_job_no_delay = True ).button_validate ()
76
+ picking .with_context (queue_job__no_delay = True ).button_validate ()
77
77
self .assertEqual (len (self .so1 .invoice_ids ), 1 )
78
78
self .assertEqual (self .so1 .invoice_ids .state , "posted" )
79
79
self .assertEqual (len (so2 .invoice_ids ), 1 )
@@ -85,20 +85,20 @@ def test_picking_backorder(self):
85
85
self .partner .invoicing_mode = "at_shipping"
86
86
self .so1 .action_confirm ()
87
87
picking = self .so1 .picking_ids
88
- picking .move_ids .quantity_done = 2
88
+ picking .move_ids .quantity = 2
89
89
picking .action_assign ()
90
90
with mute_logger ("odoo.addons.queue_job.delay" ):
91
91
picking .with_context (
92
- skip_backorder = True , test_queue_job_no_delay = True
92
+ skip_backorder = True , queue_job__no_delay = True
93
93
).button_validate ()
94
94
self .assertEqual (len (self .so1 .invoice_ids ), 1 )
95
95
self .assertEqual (self .so1 .invoice_ids .state , "posted" )
96
96
# Now process the backorder
97
97
backorder = self .so1 .picking_ids - picking
98
- backorder .move_ids .quantity_done = 2
98
+ backorder .move_ids .quantity = 2
99
99
backorder .action_assign ()
100
100
with mute_logger ("odoo.addons.queue_job.delay" ):
101
- backorder .with_context (test_queue_job_no_delay = True ).button_validate ()
101
+ backorder .with_context (queue_job__no_delay = True ).button_validate ()
102
102
self .assertEqual (len (self .so1 .invoice_ids ), 2 )
103
103
self .assertTrue (
104
104
all (invoice .state == "posted" ) for invoice in self .so1 .invoice_ids
0 commit comments