Skip to content

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

Closed
acpMicrocom wants to merge 1 commit into
OCA:17.0from
microcom:17.0_ou_stock
Closed

[17.0][OU-ADD] stock: migrate to 17.0#4557
acpMicrocom wants to merge 1 commit into
OCA:17.0from
microcom:17.0_ou_stock

Conversation

@acpMicrocom

Copy link
Copy Markdown

No description provided.

@legalsylvain

legalsylvain commented Sep 19, 2024

Copy link
Copy Markdown
Contributor

/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

rvalyi commented Oct 18, 2024

Copy link
Copy Markdown
Member

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

@rvalyi rvalyi left a comment

Copy link
Copy Markdown
Member

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"

@hbrunn hbrunn left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

hbrunn commented Nov 29, 2024

Copy link
Copy Markdown
Member

superseded by #4681

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