Skip to content

[17.0][OU-ADD] delivery: Migration to 17.0#4637

Closed
acpMicrocom wants to merge 1 commit into
OCA:17.0from
microcom:17.0_ou_delivery
Closed

[17.0][OU-ADD] delivery: Migration to 17.0#4637
acpMicrocom wants to merge 1 commit into
OCA:17.0from
microcom:17.0_ou_delivery

Conversation

@acpMicrocom

Copy link
Copy Markdown

No description provided.

@legalsylvain

legalsylvain commented Oct 26, 2024

Copy link
Copy Markdown
Contributor

/ocabot migration delivery

Depends on :

@MiquelRForgeFlow MiquelRForgeFlow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's supersede it in #4751.

@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_xmlids(env.cr, _xmlids_renames)
openupgrade.add_fields(env, _new_fields)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need, as you will fill the carrier_id by sql. so, better to create column by sql in this case

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Why create it by SQL if we have an API for that?

@MiquelRForgeFlow MiquelRForgeFlow Feb 20, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least, the field should be added in stock_delivery instead :S I prefer let ORM do the work, to avoid messing anything.

@@ -0,0 +1,95 @@
---Models in module 'delivery'---
model choose.delivery.package (moved to stock_delivery) [column['model_type']]
# DONE: in migration script of module stock_delivery

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no migration script will be executed, as stock_delivery is new module.

let's install here explicitly this module.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migration scripts are also executed in newly installed modules thanks to the patches in openupgrade_framework.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know, nice. But unneeded in this case.

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