fix: Company address filter in quotation
This commit is contained in:
parent
25f9d58c34
commit
2fc04f661a
@ -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_add_rows', true);
|
||||||
frm.set_df_property('packed_items', 'cannot_delete_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) {
|
refresh: function(frm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user