blob: 9246b5ef85dd94eba37f5273e957c3c816bd8867 [file] [log] [blame]
Rushabh Mehta8fa3e6c2013-01-24 13:09:39 +05301# -*- coding: utf-8 -*-
2
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05303# ERPNext - web based ERP (http://erpnext.com)
4# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
Rushabh Mehta2eef40b2012-07-16 14:16:57 +053019# default settings that can be made for a profile.
Anand Doshi486f9df2012-07-19 13:40:31 +053020from __future__ import unicode_literals
Pratik Vyasc1e6e4c2011-06-08 14:37:15 +053021
Anand Doshi19df1882013-02-17 00:26:59 +053022import webnotes
23
Rushabh Mehta8fa3e6c2013-01-24 13:09:39 +053024lang_names = {
25 "हिंदी": "hi",
billyfordson9b352302013-02-27 17:36:23 +010026 "deutsch": "de",
Rushabh Mehta317177a2013-01-24 18:18:39 +053027 "english": "en",
Rushabh Mehta27254d92013-01-24 15:55:08 +053028 "español": "es",
29 "français": "fr",
Rushabh Mehta317177a2013-01-24 18:18:39 +053030 "português": "pt",
Rushabh Mehta9e029492013-02-25 11:05:27 +053031 "português brasileiro": "pt-BR",
Rushabh Mehta8e3affb2013-01-25 11:58:18 +053032 "nederlands": "nl",
Rushabh Mehtacda5d422013-01-28 14:21:40 +053033 "српски":"sr",
34 "தமிழ்": "ta",
Rushabh Mehta0b491b42013-08-16 14:28:47 +053035 "hrvatski": "hr",
36 "italiano": "it",
Rushabh Mehtadcb1b652013-02-21 17:05:01 +053037 "ไทย": "th",
Rushabh Mehta317177a2013-01-24 18:18:39 +053038 "العربية":"ar"
Rushabh Mehta8fa3e6c2013-01-24 13:09:39 +053039}
40
Rushabh Mehta0b491b42013-08-16 14:28:47 +053041lang_list = ["ar", "de", "en", "es", "fr", "hi", "hr", "it", "nl", "pt-BR", "pt", "th", "sr", "ta"]
Rushabh Mehta8fa3e6c2013-01-24 13:09:39 +053042
Rushabh Mehta2eef40b2012-07-16 14:16:57 +053043product_name = "ERPNext"
44profile_defaults = {
45 "Company": "company",
46 "Territory": "territory"
47}
Rushabh Mehta4b9827a2013-02-12 19:20:39 +053048
49application_home_page = "desktop"
50
Pratik Vyasc1e6e4c2011-06-08 14:37:15 +053051# add startup propertes
Rushabh Mehtae5984872012-08-03 14:15:07 +053052mail_footer = """<div style="padding: 7px; text-align: right; color: #888"><small>Sent via
53 <a style="color: #888" href="https://erpnext.com">ERPNext</a></div>"""
54
55def get_monthly_bulk_mail_limit():
56 import webnotes
57 # if global settings, then 500 or unlimited
58 if webnotes.conn.get_value('Email Settings', None, 'outgoing_mail_server'):
59 return 999999
60 else:
Rushabh Mehta49dc5da2012-08-03 16:02:24 +053061 return 500
Anand Doshi13dc9f32013-02-13 23:42:48 +053062
63def get_url():
64 from webnotes.utils import get_request_site_address
65 url = get_request_site_address()
66 if not url or "localhost" in url:
67 subdomain = webnotes.conn.get_value("Website Settings", "Website Settings",
68 "subdomain")
69 if subdomain:
70 if "http" not in subdomain:
71 url = "http://" + subdomain
billyfordson9b352302013-02-27 17:36:23 +010072 return url