mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -14,14 +14,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Please edit this list and import only required elements
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.model.doc import Document
|
||||
from webnotes import session, form, msgprint, errprint
|
||||
from webnotes import msgprint
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
wn.require("public/app/js/communication.js");
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
|
||||
cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
|
||||
@@ -26,7 +23,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function() {
|
||||
cur_frm.communication_view = new erpnext.CommunicationView({
|
||||
cur_frm.communication_view = new wn.views.CommunicationList({
|
||||
list: wn.model.get("Communication", {"contact": doc.name}),
|
||||
parent: cur_frm.fields_dict.communication_html.wrapper,
|
||||
doc: doc,
|
||||
|
||||
@@ -14,12 +14,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Please edit this list and import only required elements
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.model.doc import Document
|
||||
from webnotes import session, form, msgprint, errprint
|
||||
|
||||
from utilities.transaction_base import TransactionBase
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ wn.doclistviews['Contact'] = wn.views.ListView.extend({
|
||||
data.fullname = (data.first_name || '') +
|
||||
(data.last_name ? ' ' + data.last_name : '');
|
||||
if(!data.fullname) data.fullname = data.name;
|
||||
data.fullname = repl("<a href='#!Form/Contact/%(name)s'>%(fullname)s\
|
||||
data.fullname = repl("<a href='#!Form/Contact/%(name)s'>%(name)s\
|
||||
</a>", data);
|
||||
|
||||
// prepare description
|
||||
|
||||
@@ -14,24 +14,16 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Please edit this list and import only required elements
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
|
||||
from webnotes.utils import cstr
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.doc import Document, addchild, getchildren, make_autoname
|
||||
from webnotes.model.wrapper import getlist, copy_doclist
|
||||
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
|
||||
from webnotes import session, form, msgprint, errprint
|
||||
from webnotes.model.doc import Document
|
||||
from webnotes.model.wrapper import copy_doclist
|
||||
|
||||
set = webnotes.conn.set
|
||||
sql = webnotes.conn.sql
|
||||
get_value = webnotes.conn.get_value
|
||||
in_transaction = webnotes.conn.in_transaction
|
||||
convert_to_lists = webnotes.conn.convert_to_lists
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class DocType:
|
||||
|
||||
@@ -24,7 +24,6 @@ class DocType:
|
||||
Generate update quereies for rename
|
||||
"""
|
||||
import webnotes.model
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
# rename the document
|
||||
webnotes.model.rename(self.doc.select_doctype, self.doc.document_to_rename, self.doc.new_name)
|
||||
|
||||
@@ -14,20 +14,17 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Please edit this list and import only required elements
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import cint, flt, load_json, nowdate, cstr
|
||||
from webnotes.utils import load_json, nowdate, cstr
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes.model.doc import Document
|
||||
from webnotes import session, msgprint
|
||||
from webnotes import msgprint
|
||||
from webnotes.model.wrapper import getlist, copy_doclist
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
get_value = webnotes.conn.get_value
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
|
||||
@@ -14,24 +14,16 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Please edit this list and import only required elements
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
|
||||
from webnotes.utils import now
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.doc import Document, addchild, getchildren, make_autoname
|
||||
from webnotes.model.wrapper import getlist, copy_doclist
|
||||
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
|
||||
from webnotes import session, form, msgprint, errprint
|
||||
from webnotes.model.wrapper import copy_doclist
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
set = webnotes.conn.set
|
||||
sql = webnotes.conn.sql
|
||||
get_value = webnotes.conn.get_value
|
||||
in_transaction = webnotes.conn.in_transaction
|
||||
convert_to_lists = webnotes.conn.convert_to_lists
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class DocType:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import load_json, cint, cstr
|
||||
from webnotes.utils import load_json
|
||||
import json
|
||||
|
||||
@webnotes.whitelist()
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from webnotes.utils import load_json, cint, cstr, flt, get_defaults
|
||||
from webnotes.model.doc import Document, addchild, getchildren
|
||||
from webnotes.model.wrapper import getlist, copy_doclist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint
|
||||
from webnotes.utils import load_json, cstr, flt, get_defaults
|
||||
from webnotes.model.doc import addchild
|
||||
from webnotes.model.wrapper import copy_doclist
|
||||
|
||||
class TransactionBase:
|
||||
|
||||
@@ -238,10 +236,12 @@ class TransactionBase:
|
||||
return dcc
|
||||
|
||||
|
||||
def get_formatted_message(self, args):
|
||||
""" get formatted message for auto notification"""
|
||||
return get_obj('Notification Control').get_formatted_message(args)
|
||||
|
||||
def load_notification_message(self):
|
||||
dt = self.doc.doctype.lower().replace(" ", "_")
|
||||
if int(webnotes.conn.get_value("Notification Control", None, dt) or 0):
|
||||
self.doc.fields["__notification_message"] = \
|
||||
webnotes.conn.get_value("Notification Control", None, dt + "_message")
|
||||
|
||||
def add_communication_list(self):
|
||||
# remove communications if present
|
||||
self.doclist = webnotes.doclist(self.doclist).get({
|
||||
|
||||
Reference in New Issue
Block a user