[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/odoo#158327 Opw: runbot error 60338 X-original-commit: 78518f5dbf26680f678c6bbd950d60bb96eeedfe Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com> Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -4064,6 +4064,9 @@ class TestStockValuation(TestStockValuationBase):
|
||||
revaluation = revaluation_form.save()
|
||||
revaluation.action_validate_revaluation()
|
||||
|
||||
account_move = self.env['account.move'].search([('journal_id', '=', revaluation.account_journal_id.id)])
|
||||
account_move = self.env['stock.valuation.layer'].search([
|
||||
('product_id', '=', self.product1.id),
|
||||
('stock_move_id', '=', False),
|
||||
]).account_move_id
|
||||
|
||||
self.assertEqual(account_move.line_ids[0].name, 'OdooBot changed stock valuation from 15.0 to 25.0 - [prda] Product A')
|
||||
|
||||
Reference in New Issue
Block a user