Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Combine forcecreate="0" detection and loading data without creation #82

Open
StefanRijnhart opened this issue Oct 6, 2017 · 6 comments

Comments

@StefanRijnhart
Copy link
Member

Now that the compare noupdate xml script detects the value of forcecreate (1), and we can have a mode that allows to update data on existing items only (2), I'm thinking that these best be combined and that the load_data method should always pick apart each item and, if the item has the forcecreate='0' attribute, it is only actually loaded if the item already exists in the database.

What do you think @pedrobaeza, @hbrunn?

And do we need to keep the init_no_create mode in that case?

(1) OCA/OpenUpgrade#1060
(2) #80

@hbrunn
Copy link
Member

hbrunn commented Oct 7, 2017

talking code, this would mean checking for forcecreate in https://github.com/OCA/openupgradelib/pull/80/files#diff-3d7675eb1386de028dab1f879bdc4681R296 and changing the condition above to always read through _get_existing_records in the xml case, right? Aye!

@pedrobaeza
Copy link
Member

@StefanRijnhart are you going to work on this then?

@StefanRijnhart
Copy link
Member Author

@pedrobaeza I would when I encounter a use case (I don't think there is one at the moment?)

@pedrobaeza
Copy link
Member

No, not yet indeed. Should we close this issue?

@StefanRijnhart
Copy link
Member Author

I think we can leave it open, as a reminder if that is alright with you.

@pedrobaeza
Copy link
Member

OK, I try to reduce the number of TODOs at maximum, but when it's not possible, better to keep it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants