mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
chore: fix flacky test and remove redundant code
(cherry picked from commit de8c3ba968)
# Conflicts:
# erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py
This commit is contained in:
@@ -1073,8 +1073,15 @@ def create_pos_invoice(**args):
|
|||||||
return pos_inv
|
return pos_inv
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
def make_batch_item(item_name):
|
def make_batch_item(item_name):
|
||||||
from erpnext.stock.doctype.item.test_item import make_item
|
from erpnext.stock.doctype.item.test_item import make_item
|
||||||
|
|
||||||
if not frappe.db.exists(item_name):
|
if not frappe.db.exists(item_name):
|
||||||
return make_item(item_name, dict(has_batch_no=1, create_new_batch=1, is_stock_item=1))
|
return make_item(item_name, dict(has_batch_no=1, create_new_batch=1, is_stock_item=1))
|
||||||
|
=======
|
||||||
|
def set_allow_partial_payment(pos_profile, value):
|
||||||
|
pos_profile.reload()
|
||||||
|
pos_profile.allow_partial_payment = value
|
||||||
|
pos_profile.save()
|
||||||
|
>>>>>>> de8c3ba968 (chore: fix flacky test and remove redundant code)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class TestBatch(FrappeTestCase):
|
|||||||
def make_batch_item(cls, item_name=None):
|
def make_batch_item(cls, item_name=None):
|
||||||
from erpnext.stock.doctype.item.test_item import make_item
|
from erpnext.stock.doctype.item.test_item import make_item
|
||||||
|
|
||||||
if not frappe.db.exists(item_name):
|
if not frappe.db.exists("Item", item_name):
|
||||||
return make_item(item_name, dict(has_batch_no=1, create_new_batch=1, is_stock_item=1))
|
return make_item(item_name, dict(has_batch_no=1, create_new_batch=1, is_stock_item=1))
|
||||||
|
|
||||||
def test_purchase_receipt(self, batch_qty=100):
|
def test_purchase_receipt(self, batch_qty=100):
|
||||||
|
|||||||
Reference in New Issue
Block a user