Repository navigation
[19.0][MIG] ai_connection: Migration to 19.0 - #111
volkantasci wants to merge 6 commits into
Conversation
Currently translated at 100.0% (14 of 14 strings) Translation: ai-18.0/ai-18.0-ai_connection Translate-URL: https://translation.odoo-community.org/projects/ai-18-0/ai-18-0-ai_connection/it/
800176f to
3f2085e
Compare
|
Hi @pedrobaeza 👋 — this |
|
@etobella and @angelmoya should review /ocabot migration ai_connection |
|
Hi @etobella, @angelmoya 👋 Gentle follow-up on this
It is the last missing dependency for two other PRs: #96 ( Happy to adjust anything. Thanks for your time! |
| from odoo.orm.model_classes import add_to_registry | ||
| from odoo.tests.common import TransactionCase | ||
|
|
||
| from .fake_models import AiConnection |
There was a problem hiding this comment.
Fake models should be added in the init.
| super().setUpClass() | ||
| add_to_registry(cls.registry, AiConnection) | ||
| cls.registry._setup_models__(cls.env.cr, [AiConnection._name]) | ||
| cls.registry.init_models(cls.env.cr, [AiConnection._name], {}) |
There was a problem hiding this comment.
Cleanup is missing
Check https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-19.0#tasks-to-do-in-the-migration
|
Thanks @etobella — both review points are addressed in
Could you take another look when you have a moment? This one is also the dependency for #96 and #106. |
|
Can you squash your commits please? |
d3d5238 to
aaf6bbd
Compare
|
Done — squashed into a single |
|
Hi @etobella 👋 — gentle reminder on this one: as requested, the commits are squashed into a single |
|
@volkantasci you squashed all commits, you should squash only your commits 😞 |
aaf6bbd to
30f2a17
Compare
|
Ah, my apologies @etobella — that was my mistake: I squashed everything. It's fixed now: the original commits are restored as they were, and only my own commits are squashed into a single |
|
|
||
| class AiConnection(models.Model): | ||
| _inherit = "ai.connection" | ||
| _name = "ai.connection" |
There was a problem hiding this comment.
the inherit was enough isn't it?
Why did you apply this?
There was a problem hiding this comment.
You are right, @etobella — it was redundant: in Odoo 19 the metaclass derives _name from a string _inherit, so _inherit = "ai.connection" alone is enough. Removed it in 6f73b4e, so the definition is back to the original form. Thanks for the catch!
30f2a17 to
6f73b4e
Compare
6f73b4e to
4cb84ad
Compare
Migration of
ai_connectionto 19.0, following the OCA migration guidelines:18.0(git format-patch ... | git am -3 --keep), so original authors, Weblate translations and bot commits are preserved.[MIG]commit on top carrying the actual 19.0 adaptation:19.0.1.0.0odoo_test_helper.FakeModelLoaderto the nativeadd_to_registryAPIai_toolmigration) so CI can resolve the dependency; once [19.0][MIG] ai_tool: Migration to 19.0 #110 merges I will rebase this branch onto19.0to drop the duplicated commits.This PR replaces the
ai_connectionpart of #100 (restructured per the review that the migration was not following OCA guidelines). The final tree is byte-identical to the content that passed CI there.