-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
[MIG][15.0] stock: migration script #3302
Conversation
/ocabot migration stock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just static review, but I am not very good at this, it is more for other reviewers to confirm if I am stupid than for dev to take action.
env.cr, | ||
""" | ||
UPDATE stock_quant_package | ||
SET name = 'Unknown Pack' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a chance we get a lot of these?
Maybe
SET name = 'Unknown Pack' | |
SET name = 'Unknown Pack ' || id::text |
I never use packages so maybe it is irrelevant, just a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is required from 15.0, but at 14.0 it was set default value via self.env['ir.sequence'].next_by_code('stock.quant.package')
and didn't insert by SQL before. So I think we don't need set value for it during migration from 14.0 to 15.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reviewing, I think we still need to migrate here. Although stock.quant.package
are usually created via transfers but it has some views and end user can edit it. It mean name
of stock.quant.package
can be blank.
env.cr, | ||
""" | ||
UPDATE stock_quant_package | ||
SET name = 'Unknown Pack' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is required from 15.0, but at 14.0 it was set default value via self.env['ir.sequence'].next_by_code('stock.quant.package')
and didn't insert by SQL before. So I think we don't need set value for it during migration from 14.0 to 15.0.
77949bd
to
0c7b945
Compare
Superseded by #3510. |
This PR
Migration done