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

[18.0][MIG] stock_location_tray: Migration to 18.0 #2257

Open
wants to merge 27 commits into
base: 18.0
Choose a base branch
from

Conversation

xaviedoanhduy
Copy link

  1. changes from version 14.0 to 18.0
  • remove _get_id and _get_object_reference that were one liner to
    _xmlid_lookup in commit odoo/odoo@15692f394.
  • change the content of UserError in stock location in commit odoo/odoo@2b738dbe.
  • change the .js file extension to .esm.js to avoid the pre-commit error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'.
  • move static files from /static/js/ to /static/js/backend/ to match odoo convention (see an example in: https://github.com/odoo/odoo/tree/18.0/addons/web_editor/static/src/js/backend).
  • re-style, re-class some fields displayed on the backend form view to match changes from the current version.
  • The button to view detailed operation has been changed to use js code instead of python so the context value (show_source_location and show_destination_location) will never be passed through the action_show_details function as before. This change fixes the issue that opens the replacement window we were talking about (video demonstration below), ref
  • Similarly the detailed operation view button has also been removed from the stock move view in the commit above, ref
  • location_id is now hidden from list view and replaced with stock quant, see: odoo/odoo@19f07f0
  1. from the above changes, I chose the following approach
  • show_source_location and show_destination_location calculation approach (instead of passing context via the outdated action).
  • change the widget appearance position to always be behind the quant_id and location_dest_id fields.
  • and for ROADMAP.md seems to be fixed since the above commit (no more RPC call will not replace the current window).
  1. video comparing 2 versions 14.0 (the issue that ROADMAP.md mentioned) and it seems to have disappeared since version 17.0:
  • version_14.0.webm
  • version_18.0.webm

guewen and others added 27 commits February 4, 2025 09:51
Extracted from stock_vertical_lift
(OCA#633)

Add tray types to stock locations, automatically generates
sub-locations. Present them nicely with a custom widget.
Use the multi creation on records to create all the xmlids at once.


There is change in odoo/odoo for both 13.0 and 14.0 at
odoo/odoo@b6ba603#diff-0b83f13eeb39606e0cc2ebe1443b40c01c19bf49ec16ab100dbcb0d0f4c9e4b6R99-R106.
With the change, `UserError(_('You still have some product in locations
%s')` is always risen before the two `ValidationError(_("Tray locations
cannot be archived when they contain products.")` and
`UserError(_("Trays cannot be modified when they contain products.")` of
this module. Therefor, the OCA#987 changes tests to meet that flow change.

To prove the dead code, we have two hacks: change context to bypass
odoo/odoo checking as
OCA@79fa705#diff-ce46c42b625b31fbfc9cd2646ccfe9d647a894001a331cd54d3ce0cf04b466a3R161-R163
and
OCA@79fa705#diff-ce46c42b625b31fbfc9cd2646ccfe9d647a894001a331cd54d3ce0cf04b466a3R183-R187.
We believe that in daily use, there is no hack like that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.