fix: Company address filter in quotation

This commit is contained in:
Deepesh Garg 2022-06-10 19:23:17 +05:30
parent 25f9d58c34
commit 2fc04f661a

View File

@ -20,6 +20,20 @@ frappe.ui.form.on('Quotation', {
frm.set_df_property('packed_items', 'cannot_add_rows', true);
frm.set_df_property('packed_items', 'cannot_delete_rows', true);
frm.set_query('company_address', function(doc) {
if(!doc.company) {
frappe.throw(__('Please set Company'));
}
return {
query: 'frappe.contacts.doctype.address.address.address_query',
filters: {
link_doctype: 'Company',
link_name: doc.company
}
};
});
},
refresh: function(frm) {