Skip to content

[IMP] don't delete the xmlid of an undeletable record - #594

Merged
MiquelRForgeFlow merged 2 commits into
OCA:9.0from
hbrunn:9.0-keep-undeletable-xmlid
Nov 16, 2017
Merged

[IMP] don't delete the xmlid of an undeletable record#594
MiquelRForgeFlow merged 2 commits into
OCA:9.0from
hbrunn:9.0-keep-undeletable-xmlid

Conversation

@hbrunn

@hbrunn hbrunn commented Jul 31, 2016

Copy link
Copy Markdown
Member

This is a demo to see if the strategy mentioned in #577 actually works

Marked as invalid because we should get something like this via a merge with upstream. Keep until either this is merged in upstream or we decide to use this anyways.

@hbrunn hbrunn added the invalid label Jul 31, 2016
@hbrunn hbrunn added this to the 9.0 milestone Jul 31, 2016
@StefanRijnhart

Copy link
Copy Markdown
Member

It seems hard to tell from CI if this fixes the problem. Can you add a test to check that no view for analytic lines remain without a proper xml id?

@hbrunn

hbrunn commented Aug 1, 2016

Copy link
Copy Markdown
Member Author

good idea, let's see. Logging says it doesn't delete the xmlid in https://travis-ci.org/OCA/OpenUpgrade/builds/148643765#L6532, but trust is good, control is better.

@StefanRijnhart

Copy link
Copy Markdown
Member

So it works! Can we merge this?

@hbrunn

hbrunn commented Aug 1, 2016

Copy link
Copy Markdown
Member Author

let's give Odoo SA a week or so to contemplate on the PR I made. If they don't merge until then,let's merge this. @jbeficent meanwhile can put this branch in hin buildout to test it

@JordiBForgeFlow

Copy link
Copy Markdown
Member

It's not deleting the record. The old record still exists, without an external ID

@hbrunn

hbrunn commented Aug 2, 2016

Copy link
Copy Markdown
Member Author

by now it also keeps the xmlid as the test shows. Then it can be removed by usual database_cleanup operations.

@JordiBForgeFlow

Copy link
Copy Markdown
Member

When I do the actual migration I can see the records there:
image

I am not sure why the test passes. Perhaps the test in module 'analytic' is run before the module 'account' is migrated?

See:
Test in module analytic is executed here:
https://travis-ci.org/OCA/OpenUpgrade/builds/148815247#L1848

Migration of account module starts here:
https://travis-ci.org/OCA/OpenUpgrade/builds/148815247#L2113

@pedrobaeza

Copy link
Copy Markdown
Member

How is the state of this?

@pedrobaeza

Copy link
Copy Markdown
Member

@hbrunn should this finally get merged?

@hbrunn

hbrunn commented May 22, 2017

Copy link
Copy Markdown
Member Author

I never came around to try this with @jbeficent's example, so I'm doubtful. But for some corner cases, I do think we need this (or something similar)

@pedrobaeza

Copy link
Copy Markdown
Member

@jbeficent please approve / merge this if it's correct. I don't know enough the problem it tries to solve.

@mvaled

mvaled commented Jun 20, 2017

Copy link
Copy Markdown

@StefanRijnhart today I ran another migration with this branch merged (see https://github.com/merchise-autrement/openupgrade/tree/merchise-predevelop-9.0).

When running Odoo 9 (https://github.com/merchise-autrement/odoo/tree/merchise-develop-9.0) againts the DB I still get the following:

QWebException: Could not find /account_analytic_analysis/static/src/css/analytic.css defined in bundle 'web.assets_backend'

The same happens for edi and im_chat.

The xmlids of those modules were deleted:

$ psql -d mercurio -c "select name from ir_model_data where module='account.analytic.analysis'"
 name 
------
(0 rows)

Those were the removed xmlids I though #594 was about, but after reading more carefully, obsolete modules seem to be still a WIP: #577 (comment).

I see that odoo/odoo#12954 accepted the patch with odoo/odoo@14ac3a9 (a variation) for Odoo 10. So I'm OK to have this merged. But we still need to decide how to proceed with obsolote modules.

@StefanRijnhart

Copy link
Copy Markdown
Member

On the upstream PR, there is talk of a bug (without making it clear what it is). And these commits are older than the one on the PR on which the bug is supposedly fixed. Does this change still contain the bug?

@StefanRijnhart

Copy link
Copy Markdown
Member

The bug mentioned on the upstream PR is the one fixed here: odoo/odoo@8f6b5fc#diff-678bd201dfe1a0c69add630cf73e76ba. It does not apply to this change. So, +1 for having this merged.

@pedrobaeza

Copy link
Copy Markdown
Member

But that one was done for 11.0, not 9.0. Does it matter?

@StefanRijnhart

Copy link
Copy Markdown
Member

@pedrobaeza indeed, the bug was introduced in the refactoring to the new API, so it is not in 9.0 and it is not related to the change in this PR.

@pedrobaeza

Copy link
Copy Markdown
Member

OK, merging then.

@MiquelRForgeFlow

Copy link
Copy Markdown
Contributor

Merging this

@MiquelRForgeFlow
MiquelRForgeFlow merged commit b962ef5 into OCA:9.0 Nov 16, 2017
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.

6 participants