Closed QuocDuong1306 closed 1 year ago
A few notes about edi_party_data_oca
tests:
1) if we only run them alone, they pass
2) if we run tests for both eci_oca
and edi_party_data_oca
, they fail
3) in 14.0, they pass, but that's because @tagged("-at_install", "post_install")
is not actually effective: tests run at_install
(TODO)
4) in 16.0, @tagged("-at_install", "post_install")
works so tests run on a fully loaded registry
FakeModelLoader
is used in 2 edi_oca
tests: test_consumer_mixin
, test_security
registry.load("edi_oca")
in both update_registry()
and restore_registry()
: env["edi.exchange.type"]
registry class is rebuilt ignoring edi_party_data_oca
's extensionAttributeError: 'edi.exchange.type' object has no attribute 'id_category_ids'
5) workarounds:edi_party_data_oca
tests before edi_oca
tests using @tagged("at_install", "-post_install")
edi_party_data_oca
with FakeModelLoader (current chosen workaround)
6) long term fixes:registry.load("edi_oca")
in restore_registry()
is not needed anymore in odoo >= 16.0, to be investigated further (inputs welcome!)@nilshamerlinck no time to look into details now... Can this help? https://github.com/OCA/odoo-test-helper/pull/27
Hello @simahawk no, it's a different case; anyway, PR is green now with the workaround :) long term fixes can/will come later
/ocabot migration edi_party_data_oca
There's no issue in this repo with the title 'Migration to version 16.0' and the milestone 16.0, so not possible to add the comment.
Hello @simahawk, opened https://github.com/OCA/odoo-test-helper/pull/28 to address the tests issues at the odoo-test-helper
level instead of workarounds in impacted PRs
TEST Requirements are not needed, the branch has already been merged and deployed :smile:
odoo-test-helper 2.1.1 released
It's OK, thank @simahawk @etobella
/ocabot merge nobump
This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-20-by-simahawk-bump-nobump, awaiting test results.
Congratulations, your PR was merged at f8cfa53f2365be0a3dc27d8cc8e3cbf8dbd5a6be. Thanks a lot for contributing to OCA. ❤️
This was moved from: