fix: PO/PINV - Check if doctype has company_address field before setting the value (#27441) (#27576)

Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 666eaae6ce976c5d820b3b9f91d23a0ed28a263a)

Co-authored-by: vama <vamagithub@gmail.com>
This commit is contained in:
Frappe PR Bot 2021-09-18 13:34:27 +05:30 committed by GitHub
parent bf2a590332
commit 4f7af79c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -884,7 +884,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
if (r.message) {
me.frm.set_value("billing_address", r.message);
} else {
me.frm.set_value("company_address", "");
if (frappe.meta.get_docfield(me.frm.doctype, 'company_address')) {
me.frm.set_value("company_address", "");
}
}
}
});