These are the traps that the other reference pages do not cover at the point of use.
Orders
- A COD order stays a draft. Commera saves a cash on delivery order as a draft Sales Order.
/commerahas no button to submit it: staff open the order in Desk (View in ERP) and submit it there. If your action has aconditionthat needs a submitted order, the action stays hidden until then. Say so in your plugin's own help text. - Every store order has a delivery date. Commera sets Delivery Date on the order and on each line at placement, from the transaction date. ERPNext needs it to make a drop-ship Purchase Order from the order.
- Drop-ship lines are not fulfilled by the store. A line with Supplier delivers to Customer set is left out of the dashboard's Fulfil action. Your plugin, or the supplier, ships it. Use
record_shipmentto show the shipment on the order. - Some items sell without stock. An Item with Delivered by Supplier (Drop Ship) set, or with Maintain Stock cleared, is always in stock on the storefront.
get_itemsstill returns the warehouse quantity inavailable_qty, which can be 0 for these items.
Outbound API calls
- Frappe logs every failed request.
frappe.integrations.utils.make_get_requestandmake_post_requestwrite an Error Log before they raise, for every failed request: a 4xx or 5xx answer, a connection error or a reply that is not JSON. An expected 401 that your code handles, for example before it gets a new token, still adds an Error Log row. - No timeout argument. These helpers take no
timeout=keyword. Do not pass one.
Dashboard
- The starter page stays until you delete it.
bench commera initwrites a starter page undercommera/pages/and aget_summarymethod inapi.py. Delete both when you add your own page, or the sidebar shows two rows.
New plugins
bench new-appnames the module after the title. If you type the title "Printer", the module folder ismy_app/printer/. A filemy_app/printer.pythen cannot be imported, because the package shadows it. Pick a title that differs from your Python file names.
Next steps
Last updated 3 days ago
Was this helpful?