diff options
| author | Pierre Masereel <pim@odoo.com> | 2019-10-17 11:24:10 +0000 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2019-11-07 09:34:01 +0000 |
| commit | 2f2bde5d9f647e4785ffabdc1b2e07a08722309c (patch) | |
| tree | 399aafd6a9fe5005a8a776784eedd84f2ac23558 /addons/point_of_sale/tests/test_pos_basic_config.py | |
| parent | 293cc0eeaba8b9328470a15c32fb093cd05fa26a (diff) | |
[IMP] point_of_sale: create picking after closing session
When you have a lot of pos order to synchronize with Odoo, it may take a
lot of time because it has to create a picking for each order. So we've
added an option in the settings that will create the picking at the end
of the session.
So the new option by default is creating the picking at session closure,
and if you need a real time stock you can enable the creation of picking
for each order.
closes odoo/odoo#39584
Task-id: 2082064
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Diffstat (limited to 'addons/point_of_sale/tests/test_pos_basic_config.py')
| -rw-r--r-- | addons/point_of_sale/tests/test_pos_basic_config.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/point_of_sale/tests/test_pos_basic_config.py b/addons/point_of_sale/tests/test_pos_basic_config.py index 3957c5e5fab..607afafa47f 100644 --- a/addons/point_of_sale/tests/test_pos_basic_config.py +++ b/addons/point_of_sale/tests/test_pos_basic_config.py @@ -100,11 +100,11 @@ class TestPoSBasicConfig(TestPoSCommon): # picking and stock moves should be in done state for order in self.pos_session.order_ids: self.assertEqual( - order.picking_id.state, + order.picking_ids[0].state, 'done', 'Picking should be in done state.' ) - move_lines = order.picking_id.move_lines + move_lines = order.picking_ids[0].move_lines self.assertEqual( move_lines.mapped('state'), ['done'] * len(move_lines), @@ -216,11 +216,11 @@ class TestPoSBasicConfig(TestPoSCommon): # no exception for invoiced orders for order in self.pos_session.order_ids: self.assertEqual( - order.picking_id.state, + order.picking_ids[0].state, 'done', 'Picking should be in done state.' ) - move_lines = order.picking_id.move_lines + move_lines = order.picking_ids[0].move_lines self.assertEqual( move_lines.mapped('state'), ['done'] * len(move_lines), @@ -376,11 +376,11 @@ class TestPoSBasicConfig(TestPoSCommon): # no exception of return orders for order in self.pos_session.order_ids: self.assertEqual( - order.picking_id.state, + order.picking_ids[0].state, 'done', 'Picking should be in done state.' ) - move_lines = order.picking_id.move_lines + move_lines = order.picking_ids[0].move_lines self.assertEqual( move_lines.mapped('state'), ['done'] * len(move_lines), @@ -440,4 +440,4 @@ class TestPoSBasicConfig(TestPoSCommon): self.assertAlmostEqual(sum(cash_receivable_lines.mapped('balance')), 290, msg='Total cash receivable balance should be equal to the total cash payments.') for line in cash_receivable_lines: - self.assertTrue(line.full_reconcile_id, msg='Each cash receivable line should be fully-reconciled.')
\ No newline at end of file + self.assertTrue(line.full_reconcile_id, msg='Each cash receivable line should be fully-reconciled.') |
