mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
Fixed Purchase Invoice test cases
This commit is contained in:
@@ -20,7 +20,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
self.assertTrue(not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")))
|
self.assertTrue(not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")))
|
||||||
|
|
||||||
wrapper = frappe.bean(copy=test_records[0])
|
wrapper = frappe.bean(copy=test_records[0])
|
||||||
wrapper.run_method("calculate_taxes_and_totals")
|
|
||||||
wrapper.insert()
|
wrapper.insert()
|
||||||
wrapper.submit()
|
wrapper.submit()
|
||||||
wrapper.load_from_db()
|
wrapper.load_from_db()
|
||||||
@@ -47,7 +46,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
|
self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
|
||||||
|
|
||||||
pi = frappe.bean(copy=test_records[1])
|
pi = frappe.bean(copy=test_records[1])
|
||||||
pi.run_method("calculate_taxes_and_totals")
|
|
||||||
pi.insert()
|
pi.insert()
|
||||||
pi.submit()
|
pi.submit()
|
||||||
|
|
||||||
@@ -80,7 +78,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
pi.doclist[1].expense_account = "_Test Account Cost for Goods Sold - _TC"
|
pi.doclist[1].expense_account = "_Test Account Cost for Goods Sold - _TC"
|
||||||
pi.doclist.pop(2)
|
pi.doclist.pop(2)
|
||||||
pi.doclist.pop(3)
|
pi.doclist.pop(3)
|
||||||
pi.run_method("calculate_taxes_and_totals")
|
|
||||||
pi.insert()
|
pi.insert()
|
||||||
pi.submit()
|
pi.submit()
|
||||||
|
|
||||||
@@ -103,7 +100,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
def test_purchase_invoice_calculation(self):
|
def test_purchase_invoice_calculation(self):
|
||||||
wrapper = frappe.bean(copy=test_records[0])
|
wrapper = frappe.bean(copy=test_records[0])
|
||||||
wrapper.run_method("calculate_taxes_and_totals")
|
|
||||||
wrapper.insert()
|
wrapper.insert()
|
||||||
wrapper.load_from_db()
|
wrapper.load_from_db()
|
||||||
|
|
||||||
@@ -138,7 +134,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
def test_purchase_invoice_with_subcontracted_item(self):
|
def test_purchase_invoice_with_subcontracted_item(self):
|
||||||
wrapper = frappe.bean(copy=test_records[0])
|
wrapper = frappe.bean(copy=test_records[0])
|
||||||
wrapper.doclist[1].item_code = "_Test FG Item"
|
wrapper.doclist[1].item_code = "_Test FG Item"
|
||||||
wrapper.run_method("calculate_taxes_and_totals")
|
|
||||||
wrapper.insert()
|
wrapper.insert()
|
||||||
wrapper.load_from_db()
|
wrapper.load_from_db()
|
||||||
|
|
||||||
@@ -188,7 +183,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
"allocated_amount": 300,
|
"allocated_amount": 300,
|
||||||
"remarks": jv.doc.remark
|
"remarks": jv.doc.remark
|
||||||
})
|
})
|
||||||
pi.run_method("calculate_taxes_and_totals")
|
|
||||||
pi.insert()
|
pi.insert()
|
||||||
pi.submit()
|
pi.submit()
|
||||||
pi.load_from_db()
|
pi.load_from_db()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import frappe
|
|||||||
import frappe.model
|
import frappe.model
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc("stock", "doctype", "item_group")
|
frappe.reload_doc("setup", "doctype", "item_group")
|
||||||
frappe.reload_doc("stock", "doctype", "item")
|
frappe.reload_doc("stock", "doctype", "item")
|
||||||
frappe.reload_doc("setup", "doctype", "sales_partner")
|
frappe.reload_doc("setup", "doctype", "sales_partner")
|
||||||
frappe.model.rename_field("Item Group", "parent_website_sitemap", "parent_website_route")
|
frappe.model.rename_field("Item Group", "parent_website_sitemap", "parent_website_route")
|
||||||
|
|||||||
Reference in New Issue
Block a user