Fix shipping_address for DropShipping (#15202)
This stretch of javascript go against the address definition for DropShipping. When we create an PO from SO with dropshipping items, the backend code update fine the shipping address, but this stretch of code, replace the customer address to the Company address. To reproduce that behavior, pick one sales order with Drop Shipping Items, make and purchase order, and take a look into the delivery address.
This commit is contained in:
parent
25712f8d65
commit
4a394bcbf4
@ -171,7 +171,7 @@ erpnext.utils.validate_mandatory = function(frm, label, value, trigger_on) {
|
||||
}
|
||||
|
||||
erpnext.utils.get_shipping_address = function(frm, callback){
|
||||
if (frm.doc.company) {
|
||||
if (frm.doc.company && !frm.doc.shipping_address) {
|
||||
frappe.call({
|
||||
method: "frappe.contacts.doctype.address.address.get_shipping_address",
|
||||
args: {
|
||||
@ -192,4 +192,4 @@ erpnext.utils.get_shipping_address = function(frm, callback){
|
||||
} else {
|
||||
frappe.msgprint(__("Select company first"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user