fix: Move filter setup to doctype controllers

This commit is contained in:
Deepesh Garg
2020-11-25 14:49:10 +05:30
parent 92b3449789
commit 6b9dda5f3e
24 changed files with 218 additions and 101 deletions

View File

@@ -1,6 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.provide('erpnext.accounts.dimensions');
erpnext.TransactionController = erpnext.taxes_and_totals.extend({
setup: function() {
this._super();
@@ -106,6 +108,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(!item.warehouse && frm.doc.set_warehouse) {
item.warehouse = frm.doc.set_warehouse;
}
erpnext.accounts.dimensions.copy_dimension_from_first_row(frm, cdt, cdn, 'items');
}
});