fix: use RecoverableErrors isinstance check for repost timeout status
When a Repost Item Valuation job is killed by an RQ worker timeout
(JobTimeoutException raised via SIGALRM), the existing status detection
relied solely on traceback string matching for 'timeout' or 'Deadlock'.
This is unreliable because SIGALRM can interrupt a C-extension call
(e.g. inside pypika's copy.copy()) before Python records the exception
in the traceback. In that case the traceback shows only the interrupted
frame -- not JobTimeoutException -- so the job is permanently marked
'Failed' instead of 'In Progress', preventing the scheduler from
automatically retrying it.
RecoverableErrors = (JobTimeoutException, QueryDeadlockError,
QueryTimeoutError) is already defined at the top of this file and is
already used further down in the same except block to suppress email
notifications. Extend its use to also guard the status decision.
The traceback string fallback is kept as a secondary check for
forward compatibility with other timeout signals.
Fixes: jobs permanently stuck as 'Failed' after RQ worker timeout,
requiring manual re-queue to resume reposting.
(cherry picked from commit a49e2de866)
Co-authored-by: Assem Bahnasy <bahnasyassem@gmail.com>
Co-authored-by: diptanilsaha <diptanil@frappe.io>
fix(payment_entry): convert the date args to string type before escaping in `get_outstanding_reference_documents` (#54639)
fix: dont show serial/batch button when PR is submitted (#54642)
(cherry picked from commit 060defcc2b)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
* fix: UI improvements for item form
* fix: add descriptions and tooltips to all checkboxes
* feat: show toast notification when item price is created
* fix: do not use selling rate for opening stock entry
* fix: add descriptions and tooltips to item default fields
* fix(test): give valuation rate for opening stock entry creation
* fix: moving naming series toggle before the return
* refactor: more changes in the form UI
(cherry picked from commit 43937acd8b)
fix(selling): blanket order ordered qty recalculation on sales order status change (#54593)
(cherry picked from commit d68801e73a)
Co-authored-by: Pandiyan P <pandiyanpalani37@gmail.com>
fix: duplicate entries being shown in batch exists in future transact… (#54604)
fix: duplicate entries being shown in batch exists in future transactions msg
(cherry picked from commit 54f20de7e3)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
fix: negative quantity check in validate_item_qty (#54559)
Fix negative quantity check in validate_item_qty
When saving a Blanket Order with a blank qty field in the items table, the following error is raised:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
Root cause: The validate_item_qty method compares d.qty < 0 directly. When the qty field is left empty, its value is None, and Python cannot compare None with an integer.
Fix
Wrap d.qty with flt(), which safely converts None (and any non-numeric value) to 0.0 before the comparison.
# Before
if d.qty < 0:
# After
if flt(d.qty) < 0:
(cherry picked from commit 63edd5ddc6)
Co-authored-by: Vinay Mishra <39999379+vinaymishraofficial@users.noreply.github.com>
fix: debit credit not equal in purchase transactions for multi currency (#54456)
(cherry picked from commit 601581d6f8)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>