-
-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][MIG] stock_quant_manual_assign: Migration to 17.0 #1973
base: 17.0
Are you sure you want to change the base?
Changes from 1 commit
2785319
0e0bd63
83366b5
40aefd8
02d8e47
abd77b7
f83e7bc
a60b752
9e4ecf7
1aa5ccf
ad07824
268e9c7
46b178d
d1ce44d
49dc221
ecbc9cf
c2bbad6
37aa1b7
2853b4a
021b070
587847b
f5b362e
5c8a14d
bb51885
e963113
3af77db
0264c93
bdf88e6
4500679
770c959
30cbce6
236115c
8ca4ae7
b254ddb
188f599
6f964ad
619125c
5f7ba7d
6040cef
dac27ac
561723e
5cdac1d
d4bd9aa
3d8b049
3c9f93f
3bcc65c
3437f69
f0986dc
696d206
6fbf54d
fb72bef
38d9f2b
c2ad3ca
9cd99c7
fad14ff
b32f1c1
7a4bbc1
33c3e45
df7b89c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can take a look at https://www.odoo.com/documentation/17.0/developer/reference/backend/testing.html# |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ def setUpClass(cls): | |
"location_id": cls.location_src.id, | ||
} | ||
) | ||
cls.picking_type = cls.env.ref("stock.picking_type_out") | ||
cls.picking_type = cls.env.ref("stock.warehouse0").out_type_id | ||
cls.quant1 = cls.quant_model.sudo().create( | ||
{ | ||
"product_id": cls.product.id, | ||
|
@@ -100,7 +100,7 @@ def test_quant_assign_wizard(self): | |
self.assertEqual(wizard.lines_qty, 0.0, "None selected must give 0") | ||
self.assertEqual( | ||
sum(line.qty for line in wizard.quants_lines), | ||
self.move.reserved_availability, | ||
self.move.quantity, | ||
) | ||
self.assertEqual(wizard.move_qty, self.move.product_uom_qty) | ||
|
||
|
@@ -149,7 +149,7 @@ def test_quant_manual_assign(self): | |
"There are 2 quants selected", | ||
) | ||
self.assertFalse(self.move.picking_type_id.auto_fill_qty_done) | ||
self.assertEqual(sum(self.move.move_line_ids.mapped("qty_done")), 0.0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because of "qty_done" was removed in 17.0, so I think we don't need these test case. |
||
self.assertEqual(sum(self.move.move_line_ids.mapped("quantity")), 0.0) | ||
|
||
def test_quant_manual_assign_auto_fill_qty_done(self): | ||
wizard = self.quant_assign_wizard.with_context(active_id=self.move.id).create( | ||
|
@@ -162,7 +162,7 @@ def test_quant_manual_assign_auto_fill_qty_done(self): | |
self.picking_type.auto_fill_qty_done = True | ||
wizard.assign_quants() | ||
self.assertTrue(self.move.picking_type_id.auto_fill_qty_done) | ||
self.assertEqual(sum(self.move.move_line_ids.mapped("qty_done")), 150.0) | ||
self.assertEqual(sum(self.move.move_line_ids.mapped("quantity")), 150.0) | ||
|
||
def test_quant_assign_wizard_after_availability_check(self): | ||
self.move._action_assign() | ||
|
@@ -186,5 +186,5 @@ def test_quant_assign_wizard_after_availability_check(self): | |
) | ||
self.assertEqual( | ||
sum(line.qty for line in wizard.quants_lines), | ||
self.move.reserved_availability, | ||
self.move.quantity, | ||
) |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because of qty_done was removed in 17.0, so this file is no need any more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last version is 16.0.1.1.0, so please pick the last one.
beside, you can take a look at PR #2038.