chore: Add Prices, Stock and E-com Settings access from Website Item
This commit is contained in:
parent
d4301d6d2f
commit
065623ce25
@ -2,7 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Website Item', {
|
||||
onload: function(frm) {
|
||||
onload: (frm) => {
|
||||
// should never check Private
|
||||
frm.fields_dict["website_image"].df.is_private = 0;
|
||||
|
||||
@ -13,18 +13,35 @@ frappe.ui.form.on('Website Item', {
|
||||
});
|
||||
},
|
||||
|
||||
image: function() {
|
||||
refresh: (frm) => {
|
||||
frm.add_custom_button(__("Prices"), function() {
|
||||
frappe.set_route("List", "Item Price", {"item_code": frm.doc.item_code});
|
||||
}, __("View"));
|
||||
|
||||
frm.add_custom_button(__("Stock"), function() {
|
||||
frappe.route_options = {
|
||||
"item_code": frm.doc.item_code
|
||||
};
|
||||
frappe.set_route("query-report", "Stock Balance");
|
||||
}, __("View"));
|
||||
|
||||
frm.add_custom_button(__("E Commerce Settings"), function() {
|
||||
frappe.set_route("Form", "E Commerce Settings");
|
||||
}, __("View"));
|
||||
},
|
||||
|
||||
image: () => {
|
||||
refresh_field("image_view");
|
||||
},
|
||||
|
||||
copy_from_item_group: function(frm) {
|
||||
copy_from_item_group: (frm) => {
|
||||
return frm.call({
|
||||
doc: frm.doc,
|
||||
method: "copy_specification_from_item_group"
|
||||
});
|
||||
},
|
||||
|
||||
set_meta_tags(frm) {
|
||||
set_meta_tags: (frm) => {
|
||||
frappe.utils.set_meta_tag(frm.doc.route);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user