fix(pricing rule): consider child tables in condition (backport #33469) (#33470)

fix(pricing rule): consider child tables in condition (#33469)

(cherry picked from commit cabaed9ed2)

Co-authored-by: Dany Robert <rtdany10@gmail.com>
This commit is contained in:
mergify[bot]
2022-12-29 09:33:59 +05:30
committed by GitHub
parent 1b7be86a0a
commit 3bceb47542

View File

@@ -246,10 +246,15 @@ def get_other_conditions(conditions, values, args):
if args.get("doctype") in [ if args.get("doctype") in [
"Quotation", "Quotation",
"Quotation Item",
"Sales Order", "Sales Order",
"Sales Order Item",
"Delivery Note", "Delivery Note",
"Delivery Note Item",
"Sales Invoice", "Sales Invoice",
"Sales Invoice Item",
"POS Invoice", "POS Invoice",
"POS Invoice Item",
]: ]:
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1""" conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
else: else: