mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
Merge branch 'wsgi' of https://github.com/webnotes/erpnext into i18n
Conflicts: accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js public/js/complete_setup.js selling/doctype/opportunity/opportunity.js selling/doctype/quotation/quotation.js
This commit is contained in:
@@ -11,14 +11,16 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
&& doc.__islocal)
|
||||
cur_frm.toggle_display("item_code", sys_defaults.item_naming_by!="Naming Series"
|
||||
&& doc.__islocal)
|
||||
|
||||
if(!doc.__islocal && doc.show_in_website) {
|
||||
cur_frm.add_custom_button("View In Website", function() {
|
||||
window.open(doc.page_name);
|
||||
}, "icon-globe");
|
||||
}
|
||||
|
||||
|
||||
if ((!doc.__islocal) && (doc.is_stock_item == 'Yes')) {
|
||||
var callback = function(r, rt) {
|
||||
var enabled = (r.message == 'exists') ? false : true;
|
||||
cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method'], enabled);
|
||||
}
|
||||
return $c_obj(make_doclist(doc.doctype, doc.name),'check_if_sle_exists','',callback);
|
||||
if (!doc.__islocal && doc.is_stock_item == 'Yes') {
|
||||
cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method'],
|
||||
doc.__sle_exists=="exists" ? false : true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ from webnotes.model.controller import DocListController
|
||||
class WarehouseNotSet(Exception): pass
|
||||
|
||||
class DocType(DocListController):
|
||||
def onload(self):
|
||||
self.doc.fields["__sle_exists"] = self.check_if_sle_exists()
|
||||
|
||||
def autoname(self):
|
||||
if webnotes.conn.get_default("item_naming_by")=="Naming Series":
|
||||
from webnotes.model.doc import make_autoname
|
||||
|
||||
@@ -31,7 +31,7 @@ test_records = [
|
||||
"is_sales_item": "Yes",
|
||||
"is_service_item": "No",
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "No",
|
||||
"is_pro_applicable": "Yes",
|
||||
"is_sub_contracted_item": "No",
|
||||
"stock_uom": "_Test UOM",
|
||||
"default_income_account": "Sales - _TC",
|
||||
@@ -45,6 +45,26 @@ test_records = [
|
||||
"material_request_type": "Purchase"
|
||||
},
|
||||
],
|
||||
[{
|
||||
"doctype": "Item",
|
||||
"item_code": "_Test Item 2",
|
||||
"item_name": "_Test Item 2",
|
||||
"description": "_Test Item 2",
|
||||
"item_group": "_Test Item Group",
|
||||
"is_stock_item": "Yes",
|
||||
"is_asset_item": "No",
|
||||
"has_batch_no": "No",
|
||||
"has_serial_no": "No",
|
||||
"is_purchase_item": "Yes",
|
||||
"is_sales_item": "Yes",
|
||||
"is_service_item": "No",
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "Yes",
|
||||
"is_sub_contracted_item": "No",
|
||||
"stock_uom": "_Test UOM",
|
||||
"default_income_account": "Sales - _TC",
|
||||
"default_warehouse": "_Test Warehouse - _TC",
|
||||
}],
|
||||
[{
|
||||
"doctype": "Item",
|
||||
"item_code": "_Test Item Home Desktop 100",
|
||||
@@ -63,6 +83,7 @@ test_records = [
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "No",
|
||||
"is_sub_contracted_item": "No",
|
||||
"is_manufactured_item": "No",
|
||||
"stock_uom": "_Test UOM"
|
||||
},
|
||||
{
|
||||
@@ -88,6 +109,7 @@ test_records = [
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "No",
|
||||
"is_sub_contracted_item": "No",
|
||||
"is_manufactured_item": "No",
|
||||
"stock_uom": "_Test UOM"
|
||||
}],
|
||||
[{
|
||||
@@ -182,8 +204,49 @@ test_records = [
|
||||
"is_sales_item": "Yes",
|
||||
"is_service_item": "No",
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "No",
|
||||
"is_pro_applicable": "Yes",
|
||||
"is_sub_contracted_item": "No",
|
||||
"stock_uom": "_Test UOM"
|
||||
}],
|
||||
[{
|
||||
"doctype": "Item",
|
||||
"item_code": "_Test Item Home Desktop Manufactured",
|
||||
"item_name": "_Test Item Home Desktop Manufactured",
|
||||
"description": "_Test Item Home Desktop Manufactured",
|
||||
"item_group": "_Test Item Group Desktops",
|
||||
"default_warehouse": "_Test Warehouse - _TC",
|
||||
"default_income_account": "Sales - _TC",
|
||||
"is_stock_item": "Yes",
|
||||
"is_asset_item": "No",
|
||||
"has_batch_no": "No",
|
||||
"has_serial_no": "No",
|
||||
"is_purchase_item": "Yes",
|
||||
"is_sales_item": "Yes",
|
||||
"is_service_item": "No",
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "Yes",
|
||||
"is_sub_contracted_item": "No",
|
||||
"is_manufactured_item": "Yes",
|
||||
"stock_uom": "_Test UOM"
|
||||
}],
|
||||
[{
|
||||
"doctype": "Item",
|
||||
"item_code": "_Test FG Item 2",
|
||||
"item_name": "_Test FG Item 2",
|
||||
"description": "_Test FG Item 2",
|
||||
"item_group": "_Test Item Group Desktops",
|
||||
"is_stock_item": "Yes",
|
||||
"default_warehouse": "_Test Warehouse - _TC",
|
||||
"default_income_account": "Sales - _TC",
|
||||
"is_asset_item": "No",
|
||||
"has_batch_no": "No",
|
||||
"has_serial_no": "No",
|
||||
"is_purchase_item": "Yes",
|
||||
"is_sales_item": "Yes",
|
||||
"is_service_item": "No",
|
||||
"inspection_required": "No",
|
||||
"is_pro_applicable": "Yes",
|
||||
"is_sub_contracted_item": "Yes",
|
||||
"stock_uom": "_Test UOM"
|
||||
}],
|
||||
]
|
||||
Reference in New Issue
Block a user