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:
Maxwell Morais 2018-08-23 02:38:37 -03:00 committed by Nabin Hait
parent 25712f8d65
commit 4a394bcbf4

View File

@ -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: {