Skip to content

Commit

Permalink
feat: Delivery Note button
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikas8600 committed Apr 19, 2023
1 parent 22b7b6e commit ef11120
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ecommerce_integrations/unicommerce/delivery_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
"RETURN_ACKNOWLEDGED",
"MERGED",
]

import time

@frappe.whitelist()
def prepare_delivery_note():
try:
time.sleep(15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ frappe.ui.form.on("Unicommerce Settings", {
__("Sync Now")
);
});

frm.add_custom_button(__("Delivery Note"), () => {
frappe.call({
method:
"ecommerce_integrations.unicommerce.delivery_note.prepare_delivery_note",
callback: (r) => {
frappe.msgprint("Intiated Delivery Note.")
},
});
},
__("Sync Now")
);

},

onload: function (frm) {
Expand Down

0 comments on commit ef11120

Please sign in to comment.