mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
test: update-after-submit save keeps the manufacture entry intact
(cherry picked from commit 424a1dfa87)
This commit is contained in:
@@ -1626,6 +1626,31 @@ class TestJobCard(ERPNextTestSuite):
|
||||
jc_b.reload()
|
||||
self.assertEqual(flt(jc_b.manufactured_qty), 3.0)
|
||||
|
||||
def test_update_after_submit_keeps_manufacture_entry_intact(self):
|
||||
work_order = self.make_semi_fg_work_order("PL Update")
|
||||
|
||||
jc_a = self.get_semi_fg_job_card(work_order, "PL Update Op A")
|
||||
jc_a.append(
|
||||
"time_logs",
|
||||
{"from_time": "2024-01-01 08:00:00", "to_time": "2024-01-01 09:00:00", "completed_qty": 3},
|
||||
)
|
||||
jc_a.pending_qty = 0
|
||||
jc_a.process_loss_qty = 2
|
||||
jc_a.submit()
|
||||
|
||||
entry = frappe.get_doc(jc_a.make_stock_entry_for_semi_fg_item())
|
||||
entry.submit()
|
||||
|
||||
if not frappe.db.exists("Print Heading", "_Test SFG Heading"):
|
||||
frappe.get_doc({"doctype": "Print Heading", "print_heading": "_Test SFG Heading"}).insert()
|
||||
|
||||
entry.reload()
|
||||
entry.select_print_heading = "_Test SFG Heading"
|
||||
entry.save()
|
||||
|
||||
entry.reload()
|
||||
self.assertEqual(flt(entry.process_loss_qty), 2.0)
|
||||
|
||||
def test_stale_manufacture_draft_cannot_over_produce_without_operation_bom(self):
|
||||
work_order = self.make_semi_fg_work_order("PL NoBom")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user