Merge branch 'develop' into pos-refactor

This commit is contained in:
rohitwaghchaure
2017-09-07 17:15:58 +05:30
committed by GitHub
81 changed files with 2257 additions and 493 deletions

View File

@@ -166,6 +166,12 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
__("Status"))
}
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
if(doc.docstatus==1 && !doc.subscription) {
cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(doc.doctype, doc.name)
}, __("Make"))
}
},
make_sales_invoice: function() {

View File

@@ -3251,6 +3251,67 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "subscription_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subscription Section",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "subscription",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subscription",
"length": 0,
"no_copy": 1,
"options": "Subscription",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@@ -3487,7 +3548,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-08-23 13:25:34.182268",
"modified": "2017-08-31 11:21:59.084183",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",

View File

@@ -5,7 +5,8 @@ def get_data():
'fieldname': 'delivery_note',
'non_standard_fieldnames': {
'Stock Entry': 'delivery_note_no',
'Quality Inspection': 'reference_name'
'Quality Inspection': 'reference_name',
'Subscription': 'reference_document',
},
'internal_links': {
'Sales Order': ['items', 'against_sales_order'],
@@ -23,5 +24,9 @@ def get_data():
'label': _('Returns'),
'items': ['Stock Entry']
},
{
'label': _('Subscription'),
'items': ['Subscription']
},
]
}

View File

@@ -34,4 +34,3 @@ QUnit.test("test delivery note", function(assert) {
]);
});

View File

@@ -488,6 +488,8 @@ class Item(WebsiteGenerator):
def validate_warehouse_for_reorder(self):
warehouse = []
for i in self.get("reorder_levels"):
if not i.warehouse_group:
i.warehouse_group = i.warehouse
if i.get("warehouse") and i.get("warehouse") not in warehouse:
warehouse += [i.get("warehouse")]
else:

View File

@@ -86,7 +86,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Type",
"length": 0,
@@ -144,7 +144,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
@@ -211,7 +211,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"length": 0,
@@ -369,7 +369,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Transaction Date",
"length": 0,
@@ -686,7 +686,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-06-13 14:29:18.032657",
"modified": "2017-07-26 19:43:31.823549",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request",

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Material Request", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially('Material Request', [
// insert a new Material Request
() => frappe.tests.make([
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -48,7 +48,7 @@ frappe.ui.form.on("Purchase Receipt", {
toggle_display_account_head: function(frm) {
var enabled = erpnext.is_perpetual_inventory_enabled(frm.doc.company)
frm.fields_dict["items"].grid.set_column_disp(["cost_center"], enabled);
}
},
});
erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend({
@@ -98,6 +98,13 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
if(flt(this.frm.doc.per_billed) < 100) {
cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice, __("Make"));
}
if(!this.frm.doc.subscription) {
cur_frm.add_custom_button(__('Subscription'), function() {
erpnext.utils.make_subscription(me.frm.doc.doctype, me.frm.doc.name)
}, __("Make"))
}
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}

View File

@@ -2611,6 +2611,67 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "subscription_detail",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subscription Detail",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "subscription",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subscription",
"length": 0,
"no_copy": 1,
"options": "Subscription",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,

View File

@@ -5,7 +5,8 @@ def get_data():
'fieldname': 'purchase_receipt_no',
'non_standard_fieldnames': {
'Purchase Invoice': 'purchase_receipt',
'Landed Cost Voucher': 'receipt_document'
'Landed Cost Voucher': 'receipt_document',
'Subscription': 'reference_document'
},
'internal_links': {
'Purchase Order': ['items', 'purchase_order'],
@@ -25,5 +26,9 @@ def get_data():
'label': _('Returns'),
'items': ['Stock Entry']
},
{
'label': _('Subscription'),
'items': ['Subscription']
},
]
}