[cleanup] removed Shipping Address, Communication Log

This commit is contained in:
Rushabh Mehta 2013-06-11 14:23:59 +05:30
parent 64cf7932e8
commit 3c8cffb69b
32 changed files with 0 additions and 621 deletions

View File

@ -1,90 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// gantt chart for project tasks
wn.require('lib/js/lib/jQuery.Gantt/css/style.css');
wn.require('lib/js/lib/jQuery.Gantt/js/jquery.fn.gantt.min.js');
erpnext.show_task_gantt = function(parent, project) {
$(parent).css('min-height', '300px').html('<div class="alert">Loading...</div>')
var get_source = function(r) {
var source = [];
// projects
$.each(r.message, function(i,v) {
if(v.exp_start_date && v.exp_end_date) {
source.push({
name: v.project,
desc: v.subject,
values: [{
label: v.subject,
desc: v.description || v.subject,
from: '/Date("'+v.exp_start_date+'")/',
to: '/Date("'+v.exp_end_date+'")/',
customClass: {
'Open':'ganttRed',
'Pending Review':'ganttOrange',
'Working':'',
'Completed':'ganttGreen',
'Cancelled':'ganttGray'
}[v.status],
dataObj: v
}]
})
}
});
return source
}
wn.call({
method: 'projects.page.projects.projects.get_tasks',
args: {
project: project || ''
},
callback: function(r) {
$(parent).empty();
if(!r.message.length) {
$(parent).html('<div class="alert">No Tasks Yet.</div>');
} else {
var gantt_area = $('<div class="gantt">').appendTo(parent);
gantt_area.gantt({
source: get_source(r),
navigate: project ? "button" : "scroll",
scale: "weeks",
minScale: "day",
maxScale: "months",
onItemClick: function(data) {
wn.set_route('Form', 'Task', data.name);
},
onAddClick: function(dt, rowId) {
newdoc('Task');
}
});
}
$('<button class="btn"><i class="icon icon-plus"></i>\
Create a new Task</button>').click(function() {
wn.model.with_doctype('Task', function() {
var new_name = wn.model.make_new_doc_and_get_name('Task');
if(project)
locals.Task[new_name].project = project;
wn.set_route('Form', 'Task', new_name);
});
}).appendTo(parent);
}
})
}

View File

@ -1,13 +0,0 @@
[
"Selling",
"Visit",
"Notes",
"SMS",
"Phone",
"Communication Log",
"Communication type",
"Date",
"Communication by",
"Other",
"Email"
]

View File

@ -1,13 +0,0 @@
{
"Communication Log": "\u0633\u062c\u0644 \u0627\u0644\u0627\u062a\u0635\u0627\u0644\u0627\u062a",
"Communication by": "\u0628\u0644\u0627\u063a",
"Communication type": "\u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0646\u0648\u0639",
"Date": "\u062a\u0627\u0631\u064a\u062e",
"Email": "\u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a",
"Notes": "\u062a\u0644\u0627\u062d\u0638",
"Other": "\u0622\u062e\u0631",
"Phone": "\u0647\u0627\u062a\u0641",
"SMS": "SMS",
"Selling": "\u0628\u064a\u0639",
"Visit": "\u0632\u064a\u0627\u0631\u0629"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Communication Log",
"Communication by": "Kommunikation durch",
"Communication type": "Art der Kommunikation",
"Date": "Datum",
"Email": "E-Mail",
"Notes": "Aufzeichnungen",
"Other": "Andere",
"Phone": "Telefon",
"SMS": "SMS",
"Selling": "Verkauf",
"Visit": "Besuchen"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Comunicaci\u00f3n sesi\u00f3n",
"Communication by": "La comunicaci\u00f3n por",
"Communication type": "Tipo de comunicaci\u00f3n",
"Date": "Fecha",
"Email": "Email",
"Notes": "Notas",
"Other": "Otro",
"Phone": "Tel\u00e9fono",
"SMS": "SMS",
"Selling": "De venta",
"Visit": "Visitar"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Journal des communications",
"Communication by": "Communication",
"Communication type": "Type de communication",
"Date": "Date",
"Email": "Email",
"Notes": "Remarques",
"Other": "Autre",
"Phone": "T\u00e9l\u00e9phone",
"SMS": "SMS",
"Selling": "Vente",
"Visit": "Visiter"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "\u0938\u0902\u091a\u093e\u0930 \u092a\u094d\u0930\u0935\u0947\u0936 \u0915\u0930\u0947\u0902",
"Communication by": "\u0926\u094d\u0935\u093e\u0930\u093e \u0938\u0902\u091a\u093e\u0930",
"Communication type": "\u0938\u0902\u091a\u093e\u0930 \u092a\u094d\u0930\u0915\u093e\u0930",
"Date": "\u0924\u093e\u0930\u0940\u0916",
"Email": "\u0908\u092e\u0947\u0932",
"Notes": "\u0928\u094b\u091f\u094d\u0938",
"Other": "\u0905\u0928\u094d\u092f",
"Phone": "\u092b\u093c\u094b\u0928",
"SMS": "\u090f\u0938\u090f\u092e\u090f\u0938",
"Selling": "\u0935\u093f\u0915\u094d\u0930\u092f",
"Visit": "\u092d\u0947\u0902\u091f"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Komunikacija Prijava",
"Communication by": "Komunikacija",
"Communication type": "Komunikacija putovanja",
"Date": "Datum",
"Email": "E-mail",
"Notes": "Bilje\u0161ke",
"Other": "Drugi",
"Phone": "Telefon",
"SMS": "SMS",
"Selling": "Prodaja",
"Visit": "Posjetiti"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Communicatie Inloggen",
"Communication by": "Communicatie door",
"Communication type": "Communicatietype",
"Date": "Datum",
"Email": "E-mail",
"Notes": "Opmerkingen",
"Other": "Ander",
"Phone": "Telefoon",
"SMS": "SMS",
"Selling": "Selling",
"Visit": "Bezoeken"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Log de Comunica\u00e7\u00e3o",
"Communication by": "Comunica\u00e7\u00e3o por",
"Communication type": "Tipo de comunica\u00e7\u00e3o",
"Date": "Data",
"Email": "E-mail",
"Notes": "Notas",
"Other": "Outro",
"Phone": "Telefone",
"SMS": "SMS",
"Selling": "Vendas",
"Visit": "Visita"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "Log Comunica\u00e7\u00e3o",
"Communication by": "Comunica\u00e7\u00e3o por",
"Communication type": "Tipo de comunica\u00e7\u00e3o",
"Date": "Data",
"Email": "E-mail",
"Notes": "Notas",
"Other": "Outro",
"Phone": "Telefone",
"SMS": "SMS",
"Selling": "Vendendo",
"Visit": "Visitar"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "\u041a\u043e\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u041f\u0440\u0438\u0458\u0430\u0432\u0430",
"Communication by": "\u041a\u043e\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0458\u0430",
"Communication type": "\u041a\u043e\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0442\u0438\u043f\u0430",
"Date": "\u0414\u0430\u0442\u0443\u043c",
"Email": "\u0415-\u043c\u0430\u0438\u043b",
"Notes": "\u0411\u0435\u043b\u0435\u0448\u043a\u0435",
"Other": "\u0414\u0440\u0443\u0433\u0438",
"Phone": "\u0422\u0435\u043b\u0435\u0444\u043e\u043d",
"SMS": "\u0421\u041c\u0421",
"Selling": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430",
"Visit": "\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u0438"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd\u0baa\u0bc1 \u0baa\u0bc1\u0b95\u0bc1\u0baa\u0ba4\u0bbf\u0b95\u0bc8",
"Communication by": "\u0bae\u0bc2\u0bb2\u0bae\u0bcd \u0ba4\u0b95\u0bb5\u0bb2\u0bcd",
"Communication type": "\u0ba4\u0b95\u0bb5\u0bb2\u0bcd \u0bb5\u0b95\u0bc8",
"Date": "\u0ba4\u0bc7\u0ba4\u0bbf",
"Email": "\u0bae\u0bbf\u0ba9\u0bcd\u0ba9\u0b9e\u0bcd\u0b9a\u0bb2\u0bcd",
"Notes": "\u0b95\u0bc1\u0bb1\u0bbf\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd",
"Other": "\u0bb5\u0bc7\u0bb1\u0bc1",
"Phone": "\u0ba4\u0bc6\u0bbe\u0bb2\u0bc8\u0baa\u0bc7\u0b9a\u0bbf",
"SMS": "\u0b8e\u0bb8\u0bcd\u0b8e\u0bae\u0bcd\u0b8e\u0bb8\u0bcd",
"Selling": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8",
"Visit": "\u0bb5\u0bb0\u0bc1\u0b95\u0bc8"
}

View File

@ -1,13 +0,0 @@
{
"Communication Log": "\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e23\u0e30\u0e1a\u0e1a\u0e01\u0e32\u0e23\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23",
"Communication by": "\u0e01\u0e32\u0e23\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23\u0e42\u0e14\u0e22",
"Communication type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e01\u0e32\u0e23\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23",
"Date": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
"Email": "\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e4c",
"Notes": "\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e2b\u0e15\u0e38",
"Other": "\u0e2d\u0e37\u0e48\u0e19 \u0e46",
"Phone": "\u0e42\u0e17\u0e23\u0e28\u0e31\u0e1e\u0e17\u0e4c",
"SMS": "SMS",
"Selling": "\u0e02\u0e32\u0e22",
"Visit": "\u0e40\u0e22\u0e35\u0e48\u0e22\u0e21"
}

View File

@ -65,15 +65,6 @@ class DocType(TransactionBase):
obj.doc.customer_address = c['contact_address']
# Get customer's primary shipping details
# ==============================================================
def get_shipping_details(self, obj = ''):
det = webnotes.conn.sql("select name, ship_to, shipping_address from `tabShipping Address` where customer = '%s' and docstatus != 2 and ifnull(is_primary_address, 'Yes') = 'Yes'" %(obj.doc.customer), as_dict = 1)
obj.doc.ship_det_no = det and det[0]['name'] or ''
obj.doc.ship_to = det and det[0]['ship_to'] or ''
obj.doc.shipping_address = det and det[0]['shipping_address'] or ''
# get invoice details
# ====================
def get_invoice_details(self, obj = ''):

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,13 +0,0 @@
[
"Customer",
"Trash Reason",
"Selling",
"Ship To",
"No",
"Customer Address",
"Shipping Address",
"Customer Name",
"Shipping Details",
"Yes",
"Is Primary Address"
]

View File

@ -1,13 +0,0 @@
{
"Customer": "\u0632\u0628\u0648\u0646",
"Customer Address": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u0645\u0644\u0627\u0621",
"Customer Name": "\u0627\u0633\u0645 \u0627\u0644\u0639\u0645\u064a\u0644",
"Is Primary Address": "\u0647\u0648 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0626\u064a\u0633\u064a",
"No": "\u0644\u0627",
"Selling": "\u0628\u064a\u0639",
"Ship To": "\u0627\u0644\u0633\u0641\u064a\u0646\u0629",
"Shipping Address": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0634\u062d\u0646",
"Shipping Details": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0634\u062d\u0646",
"Trash Reason": "\u0627\u0644\u0633\u0628\u0628 \u0627\u0644\u0642\u0645\u0627\u0645\u0629",
"Yes": "\u0646\u0639\u0645"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Kunde",
"Customer Address": "Kundenadresse",
"Customer Name": "Name des Kunden",
"Is Primary Address": "Ist Primary Address",
"No": "Auf",
"Selling": "Verkauf",
"Ship To": "Ship To",
"Shipping Address": "Versandadresse",
"Shipping Details": "Versandkosten Details",
"Trash Reason": "Trash Reason",
"Yes": "Ja"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Cliente",
"Customer Address": "Direcci\u00f3n del cliente",
"Customer Name": "Nombre del cliente",
"Is Primary Address": "Es la direcci\u00f3n primaria",
"No": "No",
"Selling": "De venta",
"Ship To": "Enviamos",
"Shipping Address": "Direcci\u00f3n de env\u00edo",
"Shipping Details": "Detalles del env\u00edo",
"Trash Reason": "Trash Raz\u00f3n",
"Yes": "S\u00ed"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Client",
"Customer Address": "Adresse du client",
"Customer Name": "Nom du client",
"Is Primary Address": "Est-Adresse principale",
"No": "Aucun",
"Selling": "Vente",
"Ship To": "Exp\u00e9dier \u00e0",
"Shipping Address": "Adresse de livraison",
"Shipping Details": "D\u00e9tails d&#39;Envoi",
"Trash Reason": "Raison Corbeille",
"Yes": "Oui"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "\u0917\u094d\u0930\u093e\u0939\u0915",
"Customer Address": "\u0917\u094d\u0930\u093e\u0939\u0915 \u092a\u0924\u093e",
"Customer Name": "\u0917\u094d\u0930\u093e\u0939\u0915 \u0915\u093e \u0928\u093e\u092e",
"Is Primary Address": "\u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915 \u092a\u0924\u093e",
"No": "\u0928\u0939\u0940\u0902",
"Selling": "\u0935\u093f\u0915\u094d\u0930\u092f",
"Ship To": "\u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0936\u093f\u092a",
"Shipping Address": "\u0936\u093f\u092a\u093f\u0902\u0917 \u092a\u0924\u093e",
"Shipping Details": "\u0936\u093f\u092a\u093f\u0902\u0917 \u0935\u093f\u0935\u0930\u0923",
"Trash Reason": "\u091f\u094d\u0930\u0948\u0936 \u0915\u093e\u0930\u0923",
"Yes": "\u0939\u093e\u0902"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Kupac",
"Customer Address": "Kupac Adresa",
"Customer Name": "Naziv klijenta",
"Is Primary Address": "Je Osnovna adresa",
"No": "Ne",
"Selling": "Prodaja",
"Ship To": "Brod za",
"Shipping Address": "Dostava Adresa",
"Shipping Details": "Dostava Detalji",
"Trash Reason": "Otpad Razlog",
"Yes": "Da"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Klant",
"Customer Address": "Klant Adres",
"Customer Name": "Klantnaam",
"Is Primary Address": "Is Primair adres",
"No": "Geen",
"Selling": "Selling",
"Ship To": "Verzendadres",
"Shipping Address": "Verzendadres",
"Shipping Details": "Verzendgegevens",
"Trash Reason": "Trash Reden",
"Yes": "Ja"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Cliente",
"Customer Address": "Endere\u00e7o do cliente",
"Customer Name": "Nome do cliente",
"Is Primary Address": "\u00c9 o endere\u00e7o principal",
"No": "N\u00e3o",
"Selling": "Vendas",
"Ship To": "Enviar Para",
"Shipping Address": "Endere\u00e7o de envio",
"Shipping Details": "Detalhes do envio",
"Trash Reason": "Raz\u00e3o de p\u00f4r no lixo",
"Yes": "Sim"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "Cliente",
"Customer Address": "Endere\u00e7o do cliente",
"Customer Name": "Nome do cliente",
"Is Primary Address": "\u00c9 o endere\u00e7o prim\u00e1rio",
"No": "N\u00e3o",
"Selling": "Vendendo",
"Ship To": "Enviar Para",
"Shipping Address": "Endere\u00e7o para envio",
"Shipping Details": "Detalhes de envio",
"Trash Reason": "Raz\u00e3o lixo",
"Yes": "Sim"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "\u041a\u0443\u043f\u0430\u0446",
"Customer Address": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0410\u0434\u0440\u0435\u0441\u0430",
"Customer Name": "\u0418\u043c\u0435 \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0430",
"Is Primary Address": "\u0408\u0435 \u043f\u0440\u0438\u043c\u0430\u0440\u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0430",
"No": "\u041d\u0435",
"Selling": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430",
"Ship To": "\u0411\u0440\u043e\u0434 \u0431\u0438",
"Shipping Address": "\u0410\u0434\u0440\u0435\u0441\u0430 \u0438\u0441\u043f\u043e\u0440\u0443\u043a\u0435",
"Shipping Details": "\u0414\u043e\u0441\u0442\u0430\u0432\u0430 \u0414\u0435\u0442\u0430\u0459\u0438",
"Trash Reason": "\u0421\u043c\u0435\u045b\u0435 \u0420\u0430\u0437\u043b\u043e\u0433",
"Yes": "\u0414\u0430"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd",
"Customer Address": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0bae\u0bc1\u0b95\u0bb5\u0bb0\u0bbf",
"Customer Name": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
"Is Primary Address": "\u0bae\u0bc1\u0ba4\u0ba9\u0bcd\u0bae\u0bc8 \u0bae\u0bc1\u0b95\u0bb5\u0bb0\u0bbf \u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
"No": "\u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
"Selling": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8",
"Ship To": "\u0b95\u0baa\u0bcd\u0baa\u0bb2\u0bcd",
"Shipping Address": "\u0b95\u0baa\u0bcd\u0baa\u0bb2\u0bcd \u0bae\u0bc1\u0b95\u0bb5\u0bb0\u0bbf",
"Shipping Details": "\u0b95\u0baa\u0bcd\u0baa\u0bb2\u0bcd \u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd",
"Trash Reason": "\u0b95\u0bc1\u0baa\u0bcd\u0baa\u0bc8 \u0b95\u0bbe\u0bb0\u0ba3\u0bae\u0bcd",
"Yes": "\u0b86\u0bae\u0bcd"
}

View File

@ -1,13 +0,0 @@
{
"Customer": "\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
"Customer Address": "\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e02\u0e2d\u0e07\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
"Customer Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
"Is Primary Address": "\u0e40\u0e1b\u0e47\u0e19\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2b\u0e25\u0e31\u0e01",
"No": "\u0e44\u0e21\u0e48",
"Selling": "\u0e02\u0e32\u0e22",
"Ship To": "\u0e40\u0e23\u0e37\u0e2d",
"Shipping Address": "\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e08\u0e31\u0e14\u0e2a\u0e48\u0e07",
"Shipping Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e2a\u0e48\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
"Trash Reason": "\u0e40\u0e2b\u0e15\u0e38\u0e1c\u0e25\u0e16\u0e31\u0e07\u0e02\u0e22\u0e30",
"Yes": "\u0e43\u0e0a\u0e48"
}

View File

@ -1,22 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Get Customer Details
// =====================================================================
cur_frm.add_fetch('customer','customer_name','customer_name');
cur_frm.add_fetch('customer','address','customer_address');
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;

View File

@ -1,42 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
sql = webnotes.conn.sql
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
# on update
# ----------
def on_update(self):
self.update_primary_shipping_address()
self.get_customer_details()
# set is_primary_address for other shipping addresses belonging to same customer
# -------------------------------------------------------------------------------
def update_primary_shipping_address(self):
if self.doc.is_primary_address == 'Yes':
sql("update `tabShipping Address` set is_primary_address = 'No' where customer = %s and is_primary_address = 'Yes' and name != %s",(self.doc.customer, self.doc.name))
# Get Customer Details
# ---------------------
def get_customer_details(self):
det = sql("select customer_name, address from tabCustomer where name = '%s'" % (self.doc.customer))
self.doc.customer_name = det and det[0][0] or ''
self.doc.customer_address = det and det[0][1] or ''

View File

@ -1,119 +0,0 @@
[
{
"creation": "2013-01-10 16:34:22",
"docstatus": 0,
"modified": "2013-01-22 14:57:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"autoname": "SA.#####",
"doctype": "DocType",
"document_type": "Master",
"module": "Selling",
"name": "__common__",
"search_fields": "customer, ship_to, shipping_address"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Shipping Address",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Shipping Address",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"submit": 0,
"write": 1
},
{
"doctype": "DocType",
"name": "Shipping Address"
},
{
"doctype": "DocField",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"width": "50%"
},
{
"doctype": "DocField",
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
"options": "Customer",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "customer_name",
"fieldtype": "Data",
"label": "Customer Name",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "customer_address",
"fieldtype": "Text",
"label": "Customer Address",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "ship_to",
"fieldtype": "Data",
"label": "Ship To",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "shipping_address",
"fieldtype": "Text",
"label": "Shipping Address",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "column_break1",
"fieldtype": "Column Break",
"width": "50%"
},
{
"doctype": "DocField",
"fieldname": "is_primary_address",
"fieldtype": "Select",
"label": "Is Primary Address",
"options": "Yes\nNo"
},
{
"doctype": "DocField",
"fieldname": "shipping_details",
"fieldtype": "Text Editor",
"label": "Shipping Details"
},
{
"doctype": "DocField",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"read_only": 1
},
{
"doctype": "DocPerm",
"role": "Sales Master Manager"
},
{
"doctype": "DocPerm",
"role": "Sales Manager"
}
]