mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix(pricing_rule): apply_on logic dont get cleanup
This commit is contained in:
@@ -84,9 +84,15 @@ class PricingRule(Document):
|
|||||||
for f in options:
|
for f in options:
|
||||||
if not f: continue
|
if not f: continue
|
||||||
|
|
||||||
f = frappe.scrub(f)
|
scrubbed_f = frappe.scrub(f)
|
||||||
if f!=fieldname:
|
|
||||||
self.set(f, None)
|
if logic_field == 'apply_on':
|
||||||
|
apply_on_f = apply_on_dict.get(f, f)
|
||||||
|
else:
|
||||||
|
apply_on_f = scrubbed_f
|
||||||
|
|
||||||
|
if scrubbed_f != fieldname:
|
||||||
|
self.set(apply_on_f, None)
|
||||||
|
|
||||||
if self.mixed_conditions and self.get("same_item"):
|
if self.mixed_conditions and self.get("same_item"):
|
||||||
self.same_item = 0
|
self.same_item = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user