Skip to content

[16.0][ADD] stock_move_zone_location_source#1377

Open
rousseldenis wants to merge 5 commits intoOCA:16.0from
acsone:16.0-add-stock-picking-type-origin-dro
Open

[16.0][ADD] stock_move_zone_location_source#1377
rousseldenis wants to merge 5 commits intoOCA:16.0from
acsone:16.0-add-stock-picking-type-origin-dro

Conversation

@rousseldenis
Copy link
Copy Markdown
Contributor

No description provided.

@rousseldenis rousseldenis force-pushed the 16.0-add-stock-picking-type-origin-dro branch from b6e6f46 to fe8696f Compare September 8, 2023 13:13
@rousseldenis rousseldenis added this to the 16.0 milestone Sep 21, 2023
As Odoo does not reflect the leaf location from where the product
is eventually taken from on the stock move level, take the zone location source
from the move line.
@rousseldenis rousseldenis force-pushed the 16.0-add-stock-picking-type-origin-dro branch from 90d87e3 to af10c68 Compare September 21, 2023 10:09
Comment on lines +22 to +25
# Reset value if is_zone field is set to False
self.filtered(lambda location: location.is_zone).update(
{"is_considered_as_source": False}
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In fact, you reset value when is_zone is set to True. You inverted the filter domain

@jbaudoux
Copy link
Copy Markdown
Contributor

From your explanation, you try to build a reporting based on a package type category and not from where it has been picked.
You have a package type on a delivery package and you can also set a package type on a product (https://github.com/OCA/wms/blob/16.0/stock_storage_type/models/product_template.py)
In your approach, you cannot have multiple picking zones for a same product/package category (e.g. food)

@rousseldenis
Copy link
Copy Markdown
Contributor Author

From your explanation, you try to build a reporting based on a package type category and not from where it has been picked. You have a package type on a delivery package and you can also set a package type on a product (https://github.com/OCA/wms/blob/16.0/stock_storage_type/models/product_template.py) In your approach, you cannot have multiple picking zones for a same product/package category (e.g. food)

@jbaudoux Nope. Nothing to do with a package type category.

This is only to find the REAL origin (for a particular move) of a product move. This will retrieve only the location origin.

To find it, we look behind and take the first location we find in the chain that has these characteristics:

  • It is a zone location
  • It is marked 'Considered as source'

So, if the product comes at T time from Food A zone, it will be marked coming from there. If product configuration has changed and comes from Food B zone, the next shipping will mention that one.

@jbaudoux
Copy link
Copy Markdown
Contributor

Yes I understand what your module is doing. But I don't think the report you build should be based on this module.

Because the information serves a report that is for the transporter. And I think he doesn't care from where in your stock the product is coming. He needs to know what type of package/product to load in the truck and unload at customer. E.g. 2 boxes of drugs, 3 bags of food and 1 box of hardware. He is interested by the package type as this is what he handles.

Just a design remark ;)

FranzPoize pushed a commit to akretion/stock-logistics-workflow that referenced this pull request Oct 18, 2023
Signed-off-by luisg123v
@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 17, 2024
@github-actions github-actions bot closed this Apr 21, 2024
@rousseldenis rousseldenis reopened this Jul 4, 2024
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 7, 2024
@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 10, 2024
@github-actions github-actions bot closed this Dec 15, 2024
@rousseldenis rousseldenis reopened this Feb 14, 2026
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 15, 2026
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.

4 participants