Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stock_reserve unit test gives warning in log when on demo database - Enable multiple locations #1975

Open
chrisandrewmann opened this issue Mar 28, 2024 · 0 comments
Labels

Comments

@chrisandrewmann
Copy link

Module

stock_reserve

Describe the bug

When running the unit tests on stock_reserve in a demo database (Odoo.SH for example), it throws a warning saying that multiple stock locations setting is not enabled.
Message in log: "Creating a new warehouse will automatically activate the Storage Locations setting"

To Reproduce

Affected versions: All

Steps to reproduce the behavior:

  1. Install stock_reserve on a demo database
  2. Run full Odoo test suite and module unit tests

Expected behavior
No warnings thrown in the logs

Suggestion
After adding the following to start of the test_stock_reserve.py test this sorts the issue.

class TestStockReserve(common.TransactionCase):
    def setUp(self):
        super().setUp()
        # Enable Storage Locations setting
        group_user_id = self.env.ref("base.group_user").id
        self.env["res.groups"].browse(group_user_id).write(
            {"implied_ids": [(4, self.env.ref("stock.group_stock_multi_locations").id)]}
        )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant