3928a402d4
* feat: crm settings * feat: CRM Settings * feat: lead and opprtunity section * feat: added CRM Settings in ERPNext Settings workspace * fix: review chnages * added patch * fix: linter issues * fix: linter issues * fix: linter issues * fix: removed crm settings from selling module * fix: raw query to frappe.qb * fix: removed hardcoded value * fix: linter issue * fix: simplify CRM Settings migration patch Co-authored-by: Anupam Kumar <anupam@Anupams-MacBook-Air.local> Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
17 lines
495 B
Python
17 lines
495 B
Python
import frappe
|
|
|
|
|
|
def execute():
|
|
settings = frappe.db.get_value('Selling Settings', 'Selling Settings', [
|
|
'campaign_naming_by',
|
|
'close_opportunity_after_days',
|
|
'default_valid_till'
|
|
], as_dict=True)
|
|
|
|
frappe.reload_doc('crm', 'doctype', 'crm_settings')
|
|
frappe.db.set_value('CRM Settings', 'CRM Settings', {
|
|
'campaign_naming_by': settings.campaign_naming_by,
|
|
'close_opportunity_after_days': settings.close_opportunity_after_days,
|
|
'default_valid_till': settings.default_valid_till
|
|
})
|