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

[16.0][ADD] stock_available_location_get_domain #11

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

rousseldenis
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Nov 5, 2023

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 5, 2023
@Sridharksolves
Copy link

Is this feature available for v.15 too?

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 12, 2023
@rousseldenis
Copy link
Contributor Author

Is this feature available for v.15 too?

@Sridharksolves Not yet. But if we merge this, we can backport.

Could you review this ?

Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

LGTM (Code review + Functional tests) Works in production for months

@rousseldenis
Copy link
Contributor Author

@jbaudoux

field = leaf.split(".")[0]
if field in location_fields and field != "location_id":
location_domain.append(element)
elif field == "location_id":

Choose a reason for hiding this comment

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

You miss the use case where the leaf is just "location_id"

Suggested change
elif field == "location_id":
elif leaf == "location_id":
location_domain.append(("id", element[1], element[2]))
elif field == "location_id":

location_fields = self.env["stock.location"].fields_get()
for element in quant_domain:
leaf = expression.is_leaf(element)
if leaf:

Choose a reason for hiding this comment

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

leaf can also be a boolean

Suggested change
if leaf:
if leaf and isinstance(leaf, str):

@jbaudoux jbaudoux changed the title [ADD] stock_available_location_get_domain [16.0][ADD] stock_available_location_get_domain May 22, 2024
@rousseldenis
Copy link
Contributor Author

@jbaudoux Thanks for review. I will add those cases.

Copy link

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 Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants