refactor: remove add_fetch (#31315)

- Sales Team already had fetch from set up
- Set up fetch from on sales partner in sales transaction

Reason for removal: the JS code applies arbitrarily to any field called "sales_person"
This commit is contained in:
Ankush Menat 2022-06-10 13:52:17 +05:30 committed by GitHub
parent 9562c28408
commit 1646fbe478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -1790,6 +1790,8 @@
"width": "50%"
},
{
"fetch_from": "sales_partner.commission_rate",
"fetch_if_empty": 1,
"fieldname": "commission_rate",
"fieldtype": "Float",
"hide_days": 1,
@ -2038,7 +2040,7 @@
"link_fieldname": "consolidated_invoice"
}
],
"modified": "2022-03-08 16:08:53.517903",
"modified": "2022-06-10 03:52:51.409913",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@ -1359,6 +1359,8 @@
"width": "50%"
},
{
"fetch_from": "sales_partner.commission_rate",
"fetch_if_empty": 1,
"fieldname": "commission_rate",
"fieldtype": "Float",
"hide_days": 1,
@ -1547,7 +1549,7 @@
"idx": 105,
"is_submittable": 1,
"links": [],
"modified": "2022-04-26 14:38:18.350207",
"modified": "2022-06-10 03:52:22.212953",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@ -12,8 +12,6 @@ frappe.provide("erpnext.selling");
erpnext.selling.SellingController = class SellingController extends erpnext.TransactionController {
setup() {
super.setup();
this.frm.add_fetch("sales_partner", "commission_rate", "commission_rate");
this.frm.add_fetch("sales_person", "commission_rate", "commission_rate");
}
onload() {

View File

@ -1192,6 +1192,8 @@
"width": "50%"
},
{
"fetch_from": "sales_partner.commission_rate",
"fetch_if_empty": 1,
"fieldname": "commission_rate",
"fieldtype": "Float",
"label": "Commission Rate (%)",
@ -1334,7 +1336,7 @@
"idx": 146,
"is_submittable": 1,
"links": [],
"modified": "2022-04-26 14:48:08.781837",
"modified": "2022-06-10 03:52:04.197415",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",