Skip to content

[9.0][FIX]account voucher. Delete inherited views first - #923

Closed
AaronHForgeFlow wants to merge 1 commit into
OCA:9.0from
ForgeFlow:9.0-fix-account_voucher
Closed

[9.0][FIX]account voucher. Delete inherited views first#923
AaronHForgeFlow wants to merge 1 commit into
OCA:9.0from
ForgeFlow:9.0-fix-account_voucher

Conversation

@AaronHForgeFlow

Copy link
Copy Markdown

Description of the issue/feature this PR addresses: There may exist some custom modules that inherits from the account.voucher.payment views

Current behavior before PR: Tried to migrate a database with a custom module that inherits a view from account.voucher.payment. Constraint Error when executing the query that deletes the view because there are some other views that inherit the original one.

Desired behavior after PR is merged: Delete all the views for account.voucher.payment. First, the inherited ones and then the standard ones.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@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.

Perfect! 👍

@mvaled

mvaled commented Jun 20, 2017

Copy link
Copy Markdown

I think this is special case of #594. Don't you think we should provide a general solution?

@pedrobaeza

Copy link
Copy Markdown
Member

I don't see why is this needed. Using correctly openupgradelib's update_module_names method with the merge_modules=True argument, you can lead perfectly with dangling views on a missing module, as Odoo update process remove them.

@AaronHForgeFlow

Copy link
Copy Markdown
Author

All right @pedrobaeza Closing this 😥

@MiquelRForgeFlow
MiquelRForgeFlow deleted the 9.0-fix-account_voucher branch April 20, 2018 11:00
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.

4 participants