[ux] added folds, show actual / projected qty in pos

This commit is contained in:
Rushabh Mehta 2014-08-12 15:15:39 +05:30
parent cf8bb668b3
commit ab8bde0149
23 changed files with 933 additions and 854 deletions

View File

@ -60,17 +60,14 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
}
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.appframe.add_button(__('Chart of Accounts'),
cur_frm.add_custom_button(__('Chart of Accounts'),
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
cur_frm.appframe.add_button(__('View Ledger'), function() {
cur_frm.add_custom_button(__('View Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
@ -79,6 +76,9 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
};
frappe.set_route("query-report", "General Ledger");
}, "icon-table");
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
}
}

View File

@ -149,6 +149,12 @@
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "view_details",
"fieldtype": "Fold",
"label": "View Details",
"permlevel": 0
},
{
"fieldname": "reference",
"fieldtype": "Section Break",
@ -440,7 +446,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-07-31 05:05:03.294068",
"modified": "2014-08-11 07:29:48.343753",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Voucher",

View File

@ -533,6 +533,11 @@
"read_only": 0,
"report_hide": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "advances",
"fieldtype": "Section Break",
@ -753,7 +758,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-07-31 04:59:24.939856",
"modified": "2014-08-12 05:25:16.261614",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@ -21,9 +21,9 @@ erpnext.POS = Class.extend({
<tr>\
<th style="width: 40%">'+__("Item")+'</th>\
<th style="width: 9%"></th>\
<th style="width: 17%; text-align: right;">Qty</th>\
<th style="width: 22%; text-align: right;">Qty</th>\
<th style="width: 9%"></th>\
<th style="width: 25%; text-align: right;">Rate</th>\
<th style="width: 20%; text-align: right;">Rate</th>\
</tr>\
</thead>\
<tbody>\
@ -387,14 +387,19 @@ erpnext.POS = Class.extend({
$(repl('<tr id="%(item_code)s" data-selected="false">\
<td>%(item_code)s%(item_name)s</td>\
<td style="vertical-align:middle;" align="right">\
<td style="vertical-align:top; padding-top: 10px;" \
align="right">\
<div class="decrease-qty" style="cursor:pointer;">\
<i class="icon-minus-sign icon-large text-danger"></i>\
</div>\
</td>\
<td style="vertical-align:middle;"><input type="text" value="%(qty)s" \
class="form-control qty" style="text-align: right;"></td>\
<td style="vertical-align:middle;cursor:pointer;">\
<td style="vertical-align:middle;">\
<input type="text" value="%(qty)s" \
class="form-control qty" style="text-align: right;">\
<div class="actual-qty small text-muted">'
+__("Stock: ")+'<span class="text-success">%(actual_qty)s</span>%(projected_qty)s</div>\
</td>\
<td style="vertical-align:top; padding-top: 10px;">\
<div class="increase-qty" style="cursor:pointer;">\
<i class="icon-plus-sign icon-large text-success"></i>\
</div>\
@ -405,6 +410,9 @@ erpnext.POS = Class.extend({
item_code: d.item_code,
item_name: d.item_name===d.item_code ? "" : ("<br>" + d.item_name),
qty: d.qty,
actual_qty: d.actual_qty,
projected_qty: d.projected_qty ? (" <span title='"+__("Projected Qty")
+"'>(" + d.projected_qty + ")<span>") : "",
rate: format_currency(d.rate, me.frm.doc.currency),
amount: format_currency(d.amount, me.frm.doc.currency)
}
@ -479,7 +487,11 @@ erpnext.POS = Class.extend({
});
me.refresh_delete_btn();
this.barcode.$input.focus();
if(me.frm.doc[this.party]) {
this.barcode.$input.focus();
} else {
this.party_field.$input.focus();
}
},
increase_decrease_qty: function(tr, operation) {
var item_code = tr.attr("id");

View File

@ -443,6 +443,11 @@
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@ -645,7 +650,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-07-31 04:59:24.561351",
"modified": "2014-08-12 05:22:53.496614",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@ -85,6 +85,7 @@ class StatusUpdater(Document):
if update:
frappe.db.set_value(self.doctype, self.name, "status", self.status)
self.add_comment("Label", self.status)
def on_communication(self):
if not self.get("communications"): return

View File

@ -4,12 +4,6 @@
// For license information, please see license.txt
cur_frm.cscript = {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+__("Jobs Email Settings")+'</a><br>\
<span class="help">'+__('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
}
},
refresh: function(doc) {
cur_frm.cscript.make_listing(doc);
},
@ -21,4 +15,4 @@ cur_frm.cscript = {
recipients: doc.email_id
})
},
}
}

View File

@ -7,10 +7,9 @@
],
"js/erpnext.min.js": [
"public/js/conf.js",
"public/js/toolbar.js",
"public/js/feature_setup.js",
"public/js/utils.js",
"public/js/queries.js",
"public/js/utils/party.js"
]
}
}

View File

@ -14,8 +14,8 @@
/* toolbar */
.toolbar-splash {
width: 32px;
height: 32px;
width: 32px;
height: 32px;
margin: -10px auto;
}
@ -32,5 +32,6 @@
margin-left: -30px;
margin-top: -10px;
padding: 20px 10px;
font-family: Monospace;
}
border-right: 1px solid #c7c7c7;
border-bottom: 1px solid #c7c7c7;
}

View File

@ -57,8 +57,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
this.set_dynamic_labels();
// Show POS button only if it is enabled from features setup
if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request")
if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request") {
this.make_pos_btn();
}
},
make_pos_btn: function() {
@ -77,6 +78,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
erpnext.open_as_pos = false;
}
this.$pos_btn && this.$pos_btn.remove();
this.$pos_btn = this.frm.appframe.add_primary_action(btn_label, function() {
me.toggle_pos();
}, icon, "btn-default");

View File

@ -20,11 +20,6 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
cur_frm.fields_dict.contact_by.get_query = function(doc, cdt, cdn) {
return { query:"frappe.core.doctype.user.user.user_query" } }
}
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Sales Email Settings">'+__('Sales Email Settings')+'</a><br>\
<span class="help">'+__('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
}
},
refresh: function() {

View File

@ -185,6 +185,12 @@
"oldfieldtype": "Table",
"permlevel": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"label": "fold",
"permlevel": 0
},
{
"fieldname": "contact_info",
"fieldtype": "Section Break",
@ -362,7 +368,7 @@
],
"icon": "icon-user",
"idx": 1,
"modified": "2014-05-27 03:49:12.570184",
"modified": "2014-08-12 05:22:18.801092",
"modified_by": "Administrator",
"module": "Selling",
"name": "Lead",

View File

@ -154,6 +154,11 @@
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"depends_on": "eval:doc.lead || doc.customer",
"fieldname": "contact_info",
@ -411,7 +416,7 @@
"icon": "icon-info-sign",
"idx": 1,
"is_submittable": 1,
"modified": "2014-07-30 03:37:31.687489",
"modified": "2014-08-12 05:21:51.282397",
"modified_by": "Administrator",
"module": "Selling",
"name": "Opportunity",

View File

@ -538,6 +538,12 @@
"read_only": 1,
"width": "200px"
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"label": "Fold",
"permlevel": 0
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@ -827,7 +833,7 @@
"idx": 1,
"is_submittable": 1,
"max_attachments": 1,
"modified": "2014-07-31 06:34:26.339765",
"modified": "2014-08-12 05:04:36.157045",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",

View File

@ -315,28 +315,6 @@
"print_hide": 0,
"reqd": 1
},
{
"description": "Display all the individual items delivered with the main items",
"fieldname": "packing_list",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Packing List",
"oldfieldtype": "Section Break",
"options": "icon-suitcase",
"permlevel": 0,
"print_hide": 1
},
{
"fieldname": "packing_details",
"fieldtype": "Table",
"label": "Packing Details",
"oldfieldname": "packing_details",
"oldfieldtype": "Table",
"options": "Packed Item",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "section_break_31",
"fieldtype": "Section Break",
@ -556,6 +534,34 @@
"read_only": 1,
"width": "200px"
},
{
"fieldname": "view_details",
"fieldtype": "Fold",
"label": "View Details",
"permlevel": 0
},
{
"description": "Display all the individual items delivered with the main items",
"fieldname": "packing_list",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Packing List",
"oldfieldtype": "Section Break",
"options": "icon-suitcase",
"permlevel": 0,
"print_hide": 1
},
{
"fieldname": "packing_details",
"fieldtype": "Table",
"label": "Packing Details",
"oldfieldname": "packing_details",
"oldfieldtype": "Table",
"options": "Packed Item",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@ -889,7 +895,7 @@
"idx": 1,
"is_submittable": 1,
"issingle": 0,
"modified": "2014-07-31 06:34:14.727868",
"modified": "2014-08-11 07:28:11.362232",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@ -572,6 +572,11 @@
"read_only": 1,
"width": "150px"
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@ -1009,7 +1014,7 @@
"idx": 1,
"in_create": 0,
"is_submittable": 1,
"modified": "2014-07-31 06:34:59.028308",
"modified": "2014-08-12 05:23:55.104153",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",

View File

@ -89,6 +89,12 @@
"options": "Material Request Item",
"permlevel": 0
},
{
"fieldname": "view_details",
"fieldtype": "Fold",
"label": "View Details",
"permlevel": 0
},
{
"fieldname": "more_info",
"fieldtype": "Section Break",
@ -230,7 +236,7 @@
"icon": "icon-ticket",
"idx": 1,
"is_submittable": 1,
"modified": "2014-06-23 07:55:49.393708",
"modified": "2014-08-11 07:11:55.802625",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request",

View File

@ -430,6 +430,11 @@
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@ -762,7 +767,7 @@
"icon": "icon-truck",
"idx": 1,
"is_submittable": 1,
"modified": "2014-07-31 04:59:25.379024",
"modified": "2014-08-12 05:23:28.960161",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",

File diff suppressed because it is too large Load Diff

View File

@ -9,13 +9,6 @@ frappe.provide("erpnext.support");
cur_frm.add_fetch("customer", "customer_name", "customer_name")
$.extend(cur_frm.cscript, {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Support Email Settings/Support Email Settings">'+__("Support Email Settings")+'</a><br>\
<span class="help">'+__("Integrate incoming support emails to Support Ticket")+'</span></p>';
}
},
refresh: function(doc) {
erpnext.toggle_naming_series();
cur_frm.cscript.make_listing(doc);

View File

@ -1,290 +1,295 @@
{
"allow_attach": 1,
"autoname": "naming_series:",
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"doctype": "DocType",
"allow_attach": 1,
"autoname": "naming_series:",
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "subject_section",
"fieldtype": "Section Break",
"label": "Subject",
"options": "icon-flag",
"fieldname": "subject_section",
"fieldtype": "Section Break",
"label": "Subject",
"options": "icon-flag",
"permlevel": 0
},
},
{
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"label": "Series",
"no_copy": 1,
"options": "SUP-",
"permlevel": 0,
"print_hide": 1,
"reqd": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"label": "Series",
"no_copy": 1,
"options": "SUP-",
"permlevel": 0,
"print_hide": 1,
"reqd": 0,
"search_index": 0
},
},
{
"fieldname": "subject",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Subject",
"permlevel": 0,
"report_hide": 0,
"reqd": 1,
"fieldname": "subject",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Subject",
"permlevel": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0
},
},
{
"fieldname": "cb00",
"fieldtype": "Column Break",
"fieldname": "cb00",
"fieldtype": "Column Break",
"permlevel": 0
},
},
{
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 0,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
"options": "Open\nReplied\nHold\nClosed",
"permlevel": 0,
"read_only": 0,
"reqd": 0,
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 0,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
"options": "Open\nReplied\nHold\nClosed",
"permlevel": 0,
"read_only": 0,
"reqd": 0,
"search_index": 1
},
},
{
"depends_on": "eval:doc.__islocal",
"fieldname": "raised_by",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Raised By (Email)",
"oldfieldname": "raised_by",
"oldfieldtype": "Data",
"permlevel": 0,
"depends_on": "eval:doc.__islocal",
"fieldname": "raised_by",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Raised By (Email)",
"oldfieldname": "raised_by",
"oldfieldtype": "Data",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "sb00",
"fieldtype": "Section Break",
"label": "Messages",
"options": "icon-comments",
"fieldname": "sb00",
"fieldtype": "Section Break",
"label": "Messages",
"options": "icon-comments",
"permlevel": 0
},
},
{
"depends_on": "eval:doc.__islocal",
"fieldname": "description",
"fieldtype": "Text",
"label": "Description",
"oldfieldname": "problem_description",
"oldfieldtype": "Text",
"permlevel": 0,
"depends_on": "eval:doc.__islocal",
"fieldname": "description",
"fieldtype": "Text",
"label": "Description",
"oldfieldname": "problem_description",
"oldfieldtype": "Text",
"permlevel": 0,
"reqd": 0
},
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "thread_html",
"fieldtype": "HTML",
"label": "Thread HTML",
"permlevel": 0,
"depends_on": "eval:!doc.__islocal",
"fieldname": "thread_html",
"fieldtype": "HTML",
"label": "Thread HTML",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "additional_info",
"fieldtype": "Section Break",
"label": "Reference",
"options": "icon-pushpin",
"permlevel": 0,
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "additional_info",
"fieldtype": "Section Break",
"label": "Reference",
"options": "icon-pushpin",
"permlevel": 0,
"read_only": 1
},
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 1,
"depends_on": "eval:!doc.__islocal",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 1,
"width": "50%"
},
},
{
"fieldname": "lead",
"fieldtype": "Link",
"label": "Lead",
"options": "Lead",
"fieldname": "lead",
"fieldtype": "Link",
"label": "Lead",
"options": "Lead",
"permlevel": 0
},
},
{
"fieldname": "contact",
"fieldtype": "Link",
"label": "Contact",
"options": "Contact",
"fieldname": "contact",
"fieldtype": "Link",
"label": "Contact",
"options": "Contact",
"permlevel": 0
},
},
{
"fieldname": "customer",
"fieldtype": "Link",
"in_filter": 1,
"label": "Customer",
"oldfieldname": "customer",
"oldfieldtype": "Link",
"options": "Customer",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"reqd": 0,
"fieldname": "customer",
"fieldtype": "Link",
"in_filter": 1,
"label": "Customer",
"oldfieldname": "customer",
"oldfieldtype": "Link",
"options": "Customer",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"reqd": 0,
"search_index": 1
},
},
{
"fieldname": "customer_name",
"fieldtype": "Data",
"in_filter": 1,
"label": "Customer Name",
"oldfieldname": "customer_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 0,
"fieldname": "customer_name",
"fieldtype": "Data",
"in_filter": 1,
"label": "Customer Name",
"oldfieldname": "customer_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 0,
"search_index": 0
},
},
{
"default": "Today",
"fieldname": "opening_date",
"fieldtype": "Date",
"label": "Opening Date",
"no_copy": 1,
"oldfieldname": "opening_date",
"oldfieldtype": "Date",
"permlevel": 0,
"default": "Today",
"fieldname": "opening_date",
"fieldtype": "Date",
"label": "Opening Date",
"no_copy": 1,
"oldfieldname": "opening_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "opening_time",
"fieldtype": "Time",
"label": "Opening Time",
"no_copy": 1,
"oldfieldname": "opening_time",
"oldfieldtype": "Time",
"permlevel": 0,
"fieldname": "opening_time",
"fieldtype": "Time",
"label": "Opening Time",
"no_copy": 1,
"oldfieldname": "opening_time",
"oldfieldtype": "Time",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"reqd": 0
},
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"depends_on": "eval:!doc.__islocal",
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "first_responded_on",
"fieldtype": "Datetime",
"label": "First Responded On",
"fieldname": "first_responded_on",
"fieldtype": "Datetime",
"label": "First Responded On",
"permlevel": 0
},
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "resolution_date",
"fieldtype": "Datetime",
"in_filter": 0,
"label": "Resolution Date",
"no_copy": 1,
"oldfieldname": "resolution_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 1,
"depends_on": "eval:!doc.__islocal",
"fieldname": "resolution_date",
"fieldtype": "Datetime",
"in_filter": 0,
"label": "Resolution Date",
"no_copy": 1,
"oldfieldname": "resolution_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "resolution_details",
"fieldtype": "Small Text",
"label": "Resolution Details",
"no_copy": 1,
"oldfieldname": "resolution_details",
"oldfieldtype": "Text",
"permlevel": 0,
"depends_on": "eval:!doc.__islocal",
"fieldname": "resolution_details",
"fieldtype": "Small Text",
"label": "Resolution Details",
"no_copy": 1,
"oldfieldname": "resolution_details",
"oldfieldtype": "Text",
"permlevel": 0,
"read_only": 0
},
},
{
"fieldname": "content_type",
"fieldtype": "Data",
"hidden": 1,
"label": "Content Type",
"fieldname": "content_type",
"fieldtype": "Data",
"hidden": 1,
"label": "Content Type",
"permlevel": 0
},
},
{
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0,
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0,
"print_hide": 1
}
],
"icon": "icon-ticket",
"idx": 1,
"modified": "2014-06-03 10:49:47.781578",
"modified_by": "Administrator",
"module": "Support",
"name": "Support Ticket",
"owner": "Administrator",
],
"icon": "icon-ticket",
"idx": 1,
"modified": "2014-08-12 05:25:45.420934",
"modified_by": "Administrator",
"module": "Support",
"name": "Support Ticket",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Guest",
"submit": 0,
"amend": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Guest",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"apply_user_permissions": 1,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Customer",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Customer",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"apply_user_permissions": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Support Team",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Support Team",
"submit": 0,
"write": 1
}
],
"search_fields": "status,customer,subject,raised_by",
],
"search_fields": "status,customer,subject,raised_by",
"title_field": "subject"
}
}

View File

@ -0,0 +1,6 @@
[
{
"doctype": "Support Ticket",
"name": "_Test Support Ticket 1"
}
]

View File

@ -0,0 +1,10 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('Support Ticket')
class TestSupportTicket(unittest.TestCase):
pass