diff options
| author | Rémy Voet (ryv) <ryv@odoo.com> | 2020-10-20 08:07:40 +0000 |
|---|---|---|
| committer | Rémy Voet (ryv) <ryv@odoo.com> | 2020-10-30 14:56:39 +0000 |
| commit | 09d2ddecaf4fc6474c96acf1f4a12de4789caef8 (patch) | |
| tree | 87f39d220f2b03f393f824cc2def2b09bd0f3124 /odoo/addons/test_populate/tests/test_populate.py | |
| parent | 15368c6d1316d43b1591b88e4d5786d86403f8a1 (diff) | |
[FIX] base: fix `populate.randint` tool
The randint generator generated always `None`
because the `return` was forget in method of `populate.compute`.
- Add a test for the randint tool, and fix the issue.
- Change the documentation of `_populate_factories` to be more
explicit about the custom generator.
closes odoo/odoo#60327
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Diffstat (limited to 'odoo/addons/test_populate/tests/test_populate.py')
| -rw-r--r-- | odoo/addons/test_populate/tests/test_populate.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/addons/test_populate/tests/test_populate.py b/odoo/addons/test_populate/tests/test_populate.py index 0a5c80d8025..1cd71ec20f8 100644 --- a/odoo/addons/test_populate/tests/test_populate.py +++ b/odoo/addons/test_populate/tests/test_populate.py @@ -47,6 +47,7 @@ class TestPopulate(common.TransactionCase): self.assertEqual(records.mapped('some_ref')[5:20], [ 1, 0, 2, 4, 4, 3, 4, 1, 2, 2, 2, 4, 4, 1, 2 ]) + self.assertEqual(records.mapped('sequence')[:20], [6, 10, 1, 1, 1, 3, 8, 9, 1, 5, 9, 5, 7, 3, 5, 3, 6, 4, 9, 2]) # Test randint @mute_logger('odoo.cli.populate') def test_populate_inherit(self): |
