A recent commit on ERPNext's version-14 branch, and included in v14.33.0+ is causing a Production Plan validation error when the test data is re-installed on a site. Separately, there's an error retrieving the fiscal year in defaults
The two errors:
frappe.defaults.get_defaults().get("fiscal_year") returns None, so there's an error converting the year to an int when the code creates settings.day
Production Plan validation error - the commit adds a validate_sales_order() function that fails to check if there are no sales orders attached to the PP, and will throw an 'index out of range' error as it tries to access an empty list. Since the test data creates the PP off a Material Request vs a Sales Order, it runs into the problem
I also replicated the PP validation error in the UI by creating a new PP off a Material Request.
Proposed solutions:
have a fallback of the current year if the default FY returns None (.get("fiscal year", current_year) )
re-wire test data to create the PP off Sales Order to avoid the validation error until the ERPNext branch is fixed
A recent commit on ERPNext's
version-14
branch, and included inv14.33.0
+ is causing a Production Plan validation error when the test data is re-installed on a site. Separately, there's an error retrieving the fiscal year in defaultsThe two errors:
frappe.defaults.get_defaults().get("fiscal_year")
returnsNone
, so there's an error converting the year to an int when the code createssettings.day
validate_sales_order()
function that fails to check if there are no sales orders attached to the PP, and will throw an 'index out of range' error as it tries to access an empty list. Since the test data creates the PP off a Material Request vs a Sales Order, it runs into the problemI also replicated the PP validation error in the UI by creating a new PP off a Material Request.
Proposed solutions:
None
(.get("fiscal year", current_year)
)