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

[13.0] Add module stock_move_common_dest_sync_location - alpha #862

Conversation

grindtildeath
Copy link
Contributor

@grindtildeath grindtildeath commented Mar 11, 2020

@grindtildeath grindtildeath force-pushed the 13.0-add-stock_move_common_dest_sync_location branch from fd188b9 to f1feb56 Compare March 11, 2020 11:01
grindtildeath and others added 4 commits April 27, 2020 11:57
In this module: OCA#808
A computed field uses "common_dest_move_ids" as dependency:

    @api.depends(
        "picking_type_id.display_completion_info",
        "move_lines.common_dest_move_ids.state",
    )
    def _compute_completion_info(self):

Which has the following effect when the ORM triggers changes:

odoo.osv.expression: Non-stored field stock.move.common_dest_move_ids cannot be searched.

Implement a search method to prevent this.
First big change is that now, the 'sync' flag has to be set on the
"destination picking type", not the current one.

When we want to "regroup" moves from different transfer to the same
place for a packing, we want to activate this feature on the said
packing operation type.

Also, instead of changing the destination of move lines every time we change
a move line, we change it the first time a move is set to done to go
towards this location. We don't need to do it until the first line is
effectively moved.
@guewen guewen force-pushed the 13.0-add-stock_move_common_dest_sync_location branch from f1feb56 to 745b8fb Compare April 28, 2020 12:28
in stock_move_common_dest_sync_location

Some notes:

* syncing the destinations could not be done during _action_assign: if
we call _action_done on several moves at once with different locations,
we don't expect them to change of destination under the hood! So we sync
after _action_done
* For now, no code is needed in stock_dynamic_routing_common_dest_sync
to make the modules compatibles, but it contains tests with routing +
sync
@guewen guewen force-pushed the 13.0-add-stock_move_common_dest_sync_location branch from 93e448f to f5a0713 Compare April 30, 2020 13:27
Copy link
Member

@jgrandguillaume jgrandguillaume left a comment

Choose a reason for hiding this comment

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

LGTM, though it'll need more extensive testing to see how it behave. I would be in favor of merging this as alpha because it works as expected. We just don't know now if the feature will be relevant in all context.

We want the move to be as precise as the move line once selected,
so for instance if we have:

Packing Post
Packing Post/Bay 1
Packing Post/Bay 2

When the first move is done using Packing Post/Bay 1, the moves
must be updated with Packing Post/Bay 1, because if we have unavailable
moves, we ensure that their move lines will be moved to Bay 1 once
they become available.
Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

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

We shouldn't merge it. I'll soon propose a new solution to solve the issue.
I'll close this PR when I open the new one.

@guewen
Copy link
Member

guewen commented May 19, 2020

The replacement for this feature is #907

@guewen guewen closed this May 19, 2020
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.

3 participants