feat: migrate to ERPNext #20

Merged
Alchez merged 8 commits from feat-migrate into main 2025-06-04 22:33:21 +00:00
Alchez commented 2025-04-25 10:37:00 +00:00 (Migrated from github.com)

Prerequisites

The patch in this PR should be run after the following are completed:

  • A fresh site has been setup on a bench with the Frappe, ERPNext, Wiki and Suppliers Portal apps installed
    • suppliers_portal should be installed after erpnext because of customizations
  • The following files (containing exported doctype records from the current database) must be setup in the site's private backups folder:
    • users.json (the 'send_welcome_email' field should be set to 0 otherwise it'll try to send welcome emails)
    • suppliers.json (remove duplicate entry for 'Superior Backflow Services, LLC')
    • invoices.json

Changes

  • Add patch to:
    • Complete setup wizard on new site with a company record called "Sea Haven Industries"
    • Setup fiscal years from 2020 to 2027
    • Setup two service items ("Repair" and "Preventive Maintence" (sic))
    • Setup missing payment terms template
    • Import users from existing data (this also adds them to the Supplier's portal users table)
    • Import suppliers from existing data (this also creates Address records)
      • For the patch specifically, user creation is skipped to avoid overwriting existing data
    • Import purchase invoices from existing data (this also creates Payment Entries)
      • @agritheory the system uses the naming series for naming each invoice, but I've also stored the actual supplier invoice number inside the document
  • Move supplier ID generation and user creation to hooks
  • Delete the following from the custom app:
    • All custom doctypes
    • "Supplier Invoices" report (can be replaced with Purchase Invoice's reportview)
    • All custom Suppliers Portal workspaces
  • Update and apply pre-commit fixes

Notes

  • Although the script imported 1527 Purchase Invoices, it also had 4 failures, all for the same error:
    • Row #1: Allocated Amount cannot be greater than outstanding amount
    • This happens because these 4 invoices each have some advance payments which is causing the outstanding amount to go below the actual paid amount.
    • I'm not sure how to resolve them, but here's the list of erroring invoice numbers: 359257, INV6009, INV6010 and INV6011.
  • Payment entries against the invoices require a "Paid From" account reference. Currently I'm relying on ERPNext's defaults (as seen via the UI when manually creating a PE from a PI), and using a bank-asset account.
## Prerequisites The patch in this PR should be run after the following are completed: - A fresh site has been setup on a bench with the Frappe, ERPNext, Wiki and Suppliers Portal apps installed - `suppliers_portal` should be installed after `erpnext` because of customizations - The following files (containing exported doctype records from the current database) must be setup in the site's private backups folder: - `users.json` (the 'send_welcome_email' field should be set to 0 otherwise it'll try to send welcome emails) - `suppliers.json` (remove duplicate entry for 'Superior Backflow Services, LLC') - `invoices.json` ## Changes - Add patch to: - Complete setup wizard on new site with a company record called "Sea Haven Industries" - Setup fiscal years from 2020 to 2027 - Setup two service items ("Repair" and "Preventive Maintence" (sic)) - Setup missing payment terms template - Import users from existing data (this also adds them to the Supplier's portal users table) - Import suppliers from existing data (this also creates Address records) - For the patch specifically, user creation is skipped to avoid overwriting existing data - Import purchase invoices from existing data (this also creates Payment Entries) - @agritheory the system uses the naming series for naming each invoice, but I've also stored the actual supplier invoice number inside the document - Move supplier ID generation and user creation to hooks - Delete the following from the custom app: - All custom doctypes - "Supplier Invoices" report (can be replaced with Purchase Invoice's reportview) - All custom Suppliers Portal workspaces - Update and apply pre-commit fixes ## Notes - Although the script imported 1527 Purchase Invoices, it also had 4 failures, all for the same error: - `Row #1: Allocated Amount cannot be greater than outstanding amount` - This happens because these 4 invoices each have some advance payments which is causing the outstanding amount to go below the actual paid amount. - I'm not sure how to resolve them, but here's the list of erroring invoice numbers: `359257`, `INV6009`, `INV6010` and `INV6011`. - Payment entries against the invoices require a "Paid From" account reference. Currently I'm relying on ERPNext's defaults (as seen via the UI when manually creating a PE from a PI), and using a bank-asset account.
Sign in to join this conversation.
No description provided.