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

[17.0][OU-ADD] stock: migrate to 17.0 #4681

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from
Open

[17.0][OU-ADD] stock: migrate to 17.0 #4681

wants to merge 2 commits into from

Conversation

hbrunn
Copy link
Member

@hbrunn hbrunn commented Nov 29, 2024

continuation of #4557

@hbrunn
Copy link
Member Author

hbrunn commented Nov 29, 2024

/ocabot migration stock


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env, "stock", "17.0.1.1/noupdate_changes.xml")
Copy link
Contributor

Choose a reason for hiding this comment

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

call delete_record_translations() on mail_template_data_delivery_confirmation


stock / product.product / sale_delay (float) : type is now 'integer' ('float')
stock / product.template / sale_delay (float) : type is now 'integer' ('float')
# NOTHING TO DO
Copy link
Contributor

Choose a reason for hiding this comment

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

openupgrade.float_to_integer()

# DONE: pre-migration

stock / stock.move.line / picked (boolean) : NEW hasdefault: compute
stock / stock.move.line / quant_id (many2one) : NEW relation: stock.quant
Copy link
Contributor

Choose a reason for hiding this comment

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

should we try to fill this?

stock / stock.picking.type / picking_properties_definition (properties_definition): NEW
stock / stock.picking.type / product_label_format (selection): NEW selection_keys: ['2x7xprice', '4x12', '4x12xprice', '4x7xprice', 'dymo', 'zpl', 'zplxprice'], hasdefault: default
stock / stock.picking.type / show_reserved (boolean) : now a function
# NOTHING TO DO: fields in new model
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you mean by new model?

ir.model.constraint: stock.constraint_stock_package_type_positive_height (changed definition: is now 'check(height>=0.0)' ('check(height>=0)'))
ir.model.constraint: stock.constraint_stock_package_type_positive_length (changed definition: is now 'check(packaging_length>=0.0)' ('check(packaging_length>=0)'))
ir.model.constraint: stock.constraint_stock_package_type_positive_width (changed definition: is now 'check(width>=0.0)' ('check(width>=0)'))
# NOTHING TO DO
Copy link
Contributor

Choose a reason for hiding this comment

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

detele them in pre-migration with delete_sql_constraint_safely() in order to let odoo add it again directly with the new definition

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

Successfully merging this pull request may close these issues.

5 participants