Make pricing rule from Supplier and Customer Doc (#15533)

* Make pricing rule from Supplier and Customer Doc

* Make sure the "+" button also works the same way as the "Make" button
This commit is contained in:
Saif
2018-09-30 21:46:31 +05:00
committed by Rushabh Mehta
parent 6ecb2556b7
commit 90cf2ddc01
7 changed files with 52 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ frappe.ui.form.on("Supplier", {
erpnext.utils.make_bank_account(frm.doc.doctype, frm.doc.name);
}, __("Make"));
frm.add_custom_button(__('Pricing Rule'), function () {
erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name);
}, __("Make"));
// indicators
erpnext.utils.set_party_dashboard_indicators(frm);
}

View File

@@ -13,6 +13,10 @@ def get_data():
{
'label': _('Orders'),
'items': ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']
},
{
'label': _('Pricing'),
'items': ['Pricing Rule']
}
]
}