diff options
| author | william <wan@odoo.com> | 2020-03-30 11:46:27 +0000 |
|---|---|---|
| committer | william <wan@odoo.com> | 2020-08-05 11:57:10 +0000 |
| commit | 82dc0cb7b91ae59beae7e1c865b670afc5958b31 (patch) | |
| tree | 949b949b249cdac265310798d5abb82675a1741b /addons/point_of_sale/tests | |
| parent | 276ba8e90c87f8294286f915508766761a58d1e2 (diff) | |
[IMP] account: soft post entries in the future
Add an easy way to not post the entries in the future when calling
post() on it, but rather set it to be auto-posted at accounting date.
This is useful when we are creating a lot of entries in batch and some
might be in the future, some in the past, and we don't want to separate
that in two batch every time. (asset, accrual, transfer,... )
Diffstat (limited to 'addons/point_of_sale/tests')
| -rw-r--r-- | addons/point_of_sale/tests/test_point_of_sale_flow.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/point_of_sale/tests/test_point_of_sale_flow.py b/addons/point_of_sale/tests/test_point_of_sale_flow.py index 78e0b381ab8..c2b1696b39e 100644 --- a/addons/point_of_sale/tests/test_point_of_sale_flow.py +++ b/addons/point_of_sale/tests/test_point_of_sale_flow.py @@ -471,7 +471,7 @@ class TestPointOfSaleFlow(TestPointOfSaleCommon): # I test that the total of the attached invoice is correct invoice = self.env['account.move'].browse(res['res_id']) - invoice.post() + invoice.action_post() self.assertAlmostEqual( invoice.amount_total, self.pos_order_pos1.amount_total, places=2, msg="Invoice not correct") @@ -869,7 +869,7 @@ class TestPointOfSaleFlow(TestPointOfSaleCommon): # I test that the total of the attached invoice is correct invoice = self.env['account.move'].browse(res['res_id']) - invoice.post() + invoice.action_post() self.assertAlmostEqual( invoice.amount_total, self.pos_order_pos1.amount_total, places=2, msg="Invoice not correct") |
