brotherton-erpnext/erpnext/patches/v11_1/woocommerce_set_creation_user.py
karthikeyan5 307e6a8825 fix(woocommerce integration): defaults in settings
(cherry picked from commit f788117b3ea9be83c54e169a1535ded0722f229c)
2019-04-15 19:47:02 +05:30

8 lines
272 B
Python

from __future__ import unicode_literals
import frappe
def execute():
woocommerce_settings = frappe.get_doc("Woocommerce Settings")
if woocommerce_settings.enable_sync:
woocommerce_settings.creation_user = woocommerce_settings.modified_by
woocommerce_settings.save()