Skip to content

Commit 033352e

Browse files
committed
[FIX] stock_account: reinforce search domain in test
The account move search was not enough specific to retreive only one account move. The following `assert` sometimes failed because of this. This commit reinforce to search to get only one account move closes odoo#158355 Opw: runbot error 60338 X-original-commit: 78518f5 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com> Signed-off-by: William Henrotin (whe) <whe@odoo.com>
1 parent a10f3b8 commit 033352e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/stock_account/tests/test_stockvaluation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4064,6 +4064,9 @@ def test_manual_revaluation_statement(self):
40644064
revaluation = revaluation_form.save()
40654065
revaluation.action_validate_revaluation()
40664066

4067-
account_move = self.env['account.move'].search([('journal_id', '=', revaluation.account_journal_id.id)])
4067+
account_move = self.env['stock.valuation.layer'].search([
4068+
('product_id', '=', self.product1.id),
4069+
('stock_move_id', '=', False),
4070+
]).account_move_id
40684071

40694072
self.assertEqual(account_move.line_ids[0].name, 'OdooBot changed stock valuation from 15.0 to 25.0 - [prda] Product A')

0 commit comments

Comments
 (0)