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 #4557

Closed
wants to merge 1 commit into from

Conversation

acpMicrocom
Copy link
Contributor

No description provided.

@legalsylvain
Copy link
Contributor

legalsylvain commented Sep 19, 2024

/ocabot migration stock

Depends on :

  • barcodes_gs1_nomenclature : TODO

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Sep 19, 2024
@rvalyi
Copy link
Member

rvalyi commented Oct 18, 2024

for reference the 4 key commits for the stock migration to v17: https://github.com/akretion/odoo-module-diff-analysis/tree/main/17.0/stock

Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

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

the commit message is wrong "[MIG] CRM: Migration to 17.0"

Copy link
Member

@hbrunn hbrunn left a comment

Choose a reason for hiding this comment

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

@acpMicrocom I haven't seen followup on this PR lately, so I'll implement my comments in a new PR


stock / stock.move / scrap_id (many2one) : NEW relation: stock.scrap
stock / stock.move / scrap_ids (one2many) : DEL relation: stock.scrap
# NOTHING TO DO
Copy link
Member

Choose a reason for hiding this comment

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

this is done in pre-migration where you transform stock.scrap#move_id

@@ -0,0 +1,19 @@
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
Copy link
Member

Choose a reason for hiding this comment

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

your copyright notices look wrong


_field_renames = [
("stock.move", "stock_move", "quantity_done", "quantity"),
("stock.move.line", "stock_move_line", "qty_done", "quantity"),
Copy link
Member

Choose a reason for hiding this comment

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

it's more complex than that. as this field now as well counts what is done and what it reserved, you need to add reserved_qty if qty_done was 0 or the move's state isn't done (depends a bit on how users used v16).

I suggest to copy the column instead of renaming to allow subsequent code make its own choices here

stock / stock.move.line / picked (boolean) : NEW hasdefault: compute
stock / stock.move.line / quant_id (many2one) : NEW relation: stock.quant
stock / stock.move.line / quantity_product_uom (float) : NEW isfunction: function, stored
stock / stock.move.line / reserved_qty (float) : DEL
Copy link
Member

Choose a reason for hiding this comment

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

see above

stock / stock.picking / picking_properties (properties): NEW hasdefault: compute
stock / stock.picking / rating_ids (one2many) : NEW relation: rating.rating
stock / stock.picking / return_id (many2one) : NEW relation: stock.picking
stock / stock.picking / return_ids (one2many) : NEW relation: stock.picking
Copy link
Member

Choose a reason for hiding this comment

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

those we'll need to reconstruct from stock.move#origin_returned_move_id

stock / stock.picking.type / auto_print_reception_report (boolean): NEW
stock / stock.picking.type / auto_print_reception_report_labels (boolean): NEW
stock / stock.picking.type / auto_print_return_slip (boolean): NEW
stock / stock.picking.type / default_location_return_id (many2one): NEW relation: stock.location
Copy link
Member

Choose a reason for hiding this comment

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

this can be calculated that from the warehouse's old return picking type's default location

@hbrunn
Copy link
Member

hbrunn commented Nov 29, 2024

superseded by #4681

@hbrunn hbrunn closed this Nov 29, 2024
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.

6 participants