Skip to content

[18.0][OU-ADD] website_sale_collect: Migration scripts. Renamed from website_sale_picking#5349

Merged
pedrobaeza merged 1 commit into
OCA:18.0from
Tecnativa:18.0-ou-add-website_sale_collect
Aug 28, 2025
Merged

[18.0][OU-ADD] website_sale_collect: Migration scripts. Renamed from website_sale_picking#5349
pedrobaeza merged 1 commit into
OCA:18.0from
Tecnativa:18.0-ou-add-website_sale_collect

Conversation

@carlos-lopez-tecnativa

Copy link
Copy Markdown
Contributor

TT57380
@Tecnativa @pedrobaeza @MiquelRForgeFlow could you please review this?

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration website_sale_collect

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Aug 26, 2025

@pedrobaeza pedrobaeza left a comment

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.

Have you checked if there's anything of noupdate data due to the module renaming? Not sure if the system handles this case.

@carlos-lopez-tecnativa

Copy link
Copy Markdown
Contributor Author

Have you checked if there's anything of noupdate data due to the module renaming? Not sure if the system handles this case.

Yes, I checked, the records have noupdate="1", and only two records are like that. However, the XML-IDs are different. Please see:
V17
https://github.com/odoo/odoo/blob/17.0/addons/website_sale_picking/data/website_sale_picking_data.xml

V18
https://github.com/odoo/odoo/blob/18.0/addons/website_sale_collect/data/delivery_carrier_data.xml
https://github.com/odoo/odoo/blob/18.0/addons/website_sale_collect/data/product_product_data.xml

So I think that, for the analysis, these are completely different records. But since I consider them to be the same records, to prevent Odoo from creating new ones, I call rename_xmlids in the pre-migration and delete_record_translations in the post-migration.

Should I manually add these changes into a noupdate_changes_work.xml file, or what would be the best way?

@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-ou-add-website_sale_collect branch 2 times, most recently from a485faf to d36513c Compare August 26, 2025 19:09
"website_sale_collect",
[
"carrier_pick_up_in_store",
"payment_provider_on_site",

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.

I don't see this one in noupdate_changes.xml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the record does not have the noupdate attribute, I did not add it to noupdate_changes_work.xml.
I renamed the XML-ID to prevent Odoo from creating another payment.provider.
I also used delete_record_translations because the name field is translatable.
Or is this step not necessary for payment.provider?

V17
https://github.com/odoo/odoo/blob/7c3d34f5ef4d111fbbc89a07e207fe5add4d0275/addons/website_sale_picking/data/payment_provider_data.xml#L4
V18
https://github.com/odoo/odoo/blob/08b2573f2ac2b812a0e7f8ebaf90db431124ac69/addons/website_sale_collect/data/payment_provider_data.xml#L4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If I don’t use delete_record_translations, the payment.provider keeps the old name.
I tested it, so I think it is necessary.

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.

That may be because you didn't load translations after the upgrade, but if it's noupdate=0, it shouldn't be a problem.

@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-ou-add-website_sale_collect branch from d36513c to 203567f Compare August 27, 2025 14:06
@pedrobaeza pedrobaeza merged commit 2a31b8c into OCA:18.0 Aug 28, 2025
4 checks passed
@pedrobaeza pedrobaeza deleted the 18.0-ou-add-website_sale_collect branch August 28, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants