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 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

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)]}
        )
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant