mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
13 lines
411 B
Python
13 lines
411 B
Python
def execute():
|
|
import webnotes
|
|
webnotes.reload_doc("selling", "doctype", "selling_settings")
|
|
ss = webnotes.bean("Selling Settings")
|
|
|
|
same_rate = webnotes.conn.sql("""select field, value from `tabSingles`
|
|
where doctype = 'Global Defaults' and field = 'maintain_same_sales_rate'"""):
|
|
if same_rate:
|
|
ss.doc.maintain_same_sales_rate = same_rate[1]
|
|
else:
|
|
ss.doc.maintain_same_sales_rate = 1
|
|
|
|
ss.save() |