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

[FIX] delivery_driver: wrong model name #783

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

yajo
Copy link
Member

@yajo yajo commented Mar 14, 2024

Regression from #774:


  File "/opt/odoo/auto/addons/delivery_driver/migrations/16.0.1.0.1/post-migration.py", line 15, in migrate
    env["carrier.driver"]
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 549, in __getitem__
    return self.registry[model_name](self, (), ())
  File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 190, in __getitem__
    return self.models[model_name]
KeyError: 'carrier.driver'
Error: 'carrier.driver'

@moduon MT-5232

Regression from OCA#774:

```

  File "/opt/odoo/auto/addons/delivery_driver/migrations/16.0.1.0.1/post-migration.py", line 15, in migrate
    env["carrier.driver"]
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 549, in __getitem__
    return self.registry[model_name](self, (), ())
  File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 190, in __getitem__
    return self.models[model_name]
KeyError: 'carrier.driver'
Error: 'carrier.driver'
```

@moduon MT-5232
@OCA-git-bot
Copy link
Contributor

Hi @EmilioPascual, @rafaelbn,
some modules you are maintaining are being modified, check this out!

@rousseldenis
Copy link
Contributor

Tests are failing because of that sh... CTTExpress module

@yajo
Copy link
Member Author

yajo commented Mar 14, 2024

It seems one of those cases where a unit test has been confused with a monitoring tool. Now what? This issue is pretty critical...

@pedrobaeza
Copy link
Member

The test in CTT is not intended for monitoring, but for assuring that the API doesn't change and the module stops to work. Mocking that will lead to fail in that case but green CIs. Anyway, it's true that the demo environment against the tests is done is a bit unstable, but it's usually question of minutes.

You can meanwhile add the PR in your deployment, as it's not critical, as it doesn't affect any new installation nor anyone not using the module.

@EmilioPascual
Copy link
Contributor

/ocabot merge

@OCA-git-bot
Copy link
Contributor

Hi @EmilioPascual. Your command failed:

Required option bumpversion_mode for command merge. Possible values : major, minor, patch, nobump.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@rousseldenis
Copy link
Contributor

It seems one of those cases where a unit test has been confused with a monitoring tool. Now what? This issue is pretty critical...

In ten years, we'll laugh about that around a drink 😃

But, as already said, that one deserves a separate repo to not bother other people testing flows.

@EmilioPascual
Copy link
Contributor

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-783-by-EmilioPascual-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f477845 into OCA:16.0 Mar 14, 2024
3 of 5 checks passed
@yajo yajo deleted the 16.0-delivery_driver-fix_mig branch March 14, 2024 08:27
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 5180e6f. Thanks a lot for contributing to OCA. ❤️

@yajo
Copy link
Member Author

yajo commented Mar 14, 2024

I think we need a guideline about flaky tests, so here's my proposal: OCA/odoo-community.org#158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants