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

Update product.py #8877

Merged
merged 1 commit into from
May 17, 2017
Merged

Update product.py #8877

merged 1 commit into from
May 17, 2017

Conversation

DeveloperMetal
Copy link

Hi!

If template_item_code is None on line 68-69 the query will return ALL "Item Price" records irrespective of item_code, potentially causing the wrong price list rate to be used.

Noticed this behavior when fetching product price for a group of items without "variant_of" data.

However, I am not entirely sure if this is the expected behavior of frappe.get_all when a filter dictionary field is set to None. Should it cause underlying sql query to ignore the field(as if not set) or set it to "NULL" in the query?

Hi!

If template_item_code is None on line 71-72 the query will return ALL "Item Price" records irrespective of item_code, potentially causing the wrong price list rate to be used.

Noticed this behavior when fetching product price for a group of items without "variant_of" data.
@nabinhait nabinhait merged commit 0952df2 into frappe:develop May 17, 2017
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.

2 participants