def test_make_supplier_quotation_with_special_characters(self): frappe.delete_doc_if_exists("Supplier", "_Test Supplier '1", force=1) supplier = frappe.new_doc("Supplier") supplier.supplier_name = "_Test Supplier '1" supplier.supplier_group = "_Test Supplier Group" supplier.insert() rfq = make_request_for_quotation(supplier_data=supplier_wt_appos) sq = make_supplier_quotation_from_rfq( rfq.name, for_supplier=supplier_wt_appos[0].get("supplier")) sq.submit() frappe.form_dict = frappe.local("form_dict") frappe.form_dict.name = rfq.name self.assertEqual( check_supplier_has_docname_access( supplier_wt_appos[0].get('supplier')), True) # reset form_dict frappe.form_dict.name = None
def test_make_supplier_quotation_with_special_characters(self): from erpnext.buying.doctype.request_for_quotation.request_for_quotation import make_supplier_quotation frappe.delete_doc_if_exists("Supplier", "_Test Supplier '1", force=1) supplier = frappe.new_doc("Supplier") supplier.supplier_name = "_Test Supplier '1" supplier.supplier_type = "_Test Supplier Type" supplier.insert() rfq = make_request_for_quotation(supplier_wt_appos) sq = make_supplier_quotation(rfq.name, supplier_wt_appos[0].get("supplier")) sq.submit() frappe.form_dict = frappe.local("form_dict") frappe.form_dict.name = rfq.name self.assertEqual( check_supplier_has_docname_access( supplier_wt_appos[0].get('supplier')), True) # reset form_dict frappe.form_dict.name = None
def test_make_supplier_quotation_with_special_characters(self): from erpnext.buying.doctype.request_for_quotation.request_for_quotation import make_supplier_quotation frappe.delete_doc_if_exists("Supplier", "_Test Supplier '1", force=1) supplier = frappe.new_doc("Supplier") supplier.supplier_name = "_Test Supplier '1" supplier.supplier_type = "_Test Supplier Type" supplier.insert() rfq = make_request_for_quotation(supplier_wt_appos) sq = make_supplier_quotation(rfq.name, supplier_wt_appos[0].get("supplier")) sq.submit() frappe.form_dict = frappe.local("form_dict") frappe.form_dict.name = rfq.name self.assertEqual( check_supplier_has_docname_access(supplier_wt_appos[0].get('supplier')), True ) # reset form_dict frappe.form_dict.name = None
- override properties from PropertySetter - sort based on prev_field - optionally, post process (add js, css, select fields), or without """ from __future__ import unicode_literals # imports import json import frappe import frappe.model import frappe.model.doc import frappe.model.doclist from frappe.utils import cint doctype_cache = frappe.local('doctype_doctype_cache') docfield_types = frappe.local('doctype_docfield_types') # doctype_cache = {} # docfield_types = None def get(doctype, processed=False, cached=True): """return doclist""" if cached: doclist = from_cache(doctype, processed) if doclist: if processed: update_language(doclist) return DocTypeDocList(doclist)
# License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint, flt, cstr, now from erpnext.stock.utils import get_valuation_method import json # future reposting class NegativeStockError(frappe.ValidationError): pass _exceptions = frappe.local('stockledger_exceptions') # _exceptions = [] def make_sl_entries(sl_entries, is_amended=None): if sl_entries: from erpnext.stock.utils import update_bin cancel = True if sl_entries[0].get("is_cancelled") == "Yes" else False if cancel: set_as_cancel(sl_entries[0].get('voucher_no'), sl_entries[0].get('voucher_type')) for sle in sl_entries: sle_id = None if sle.get('is_cancelled') == 'Yes':
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint, flt, cstr, now from erpnext.stock.utils import get_valuation_method import json # future reposting class NegativeStockError(frappe.ValidationError): pass _exceptions = frappe.local('stockledger_exceptions') # _exceptions = [] def make_sl_entries(sl_entries, is_amended=None, allow_negative_stock=False, via_landed_cost_voucher=False): if sl_entries: from erpnext.stock.utils import update_bin cancel = True if sl_entries[0].get("is_cancelled") == "Yes" else False if cancel: set_as_cancel(sl_entries[0].get('voucher_no'), sl_entries[0].get('voucher_type')) for sle in sl_entries: sle_id = None if sle.get('is_cancelled') == 'Yes': sle['actual_qty'] = -flt(sle['actual_qty']) if sle.get("actual_qty") or sle.get("voucher_type")=="Stock Reconciliation": sle_id = make_entry(sle, allow_negative_stock, via_landed_cost_voucher)
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint, flt, cstr, now from erpnext.stock.utils import get_valuation_method import json # future reposting class NegativeStockError(frappe.ValidationError): pass _exceptions = frappe.local("stockledger_exceptions") # _exceptions = [] def make_sl_entries(sl_entries, is_amended=None, allow_negative_stock=False): if sl_entries: from erpnext.stock.utils import update_bin cancel = True if sl_entries[0].get("is_cancelled") == "Yes" else False if cancel: set_as_cancel(sl_entries[0].get("voucher_no"), sl_entries[0].get("voucher_type")) for sle in sl_entries: sle_id = None if sle.get("is_cancelled") == "Yes": sle["actual_qty"] = -flt(sle["actual_qty"])
from __future__ import unicode_literals import frappe import logging jasper_session_obj = frappe.local("jasper_session_obj") jasper_session = frappe.local("jasper_session") pyjnius = False jasperserverlib = False frappe.get_logger("jasper_erpnext_report").addHandler(logging.NullHandler()) fds = frappe.local("fds") batch = frappe.local("batch") from .utils.utils import get_Frappe_Version FRAPPE_VERSION = get_Frappe_Version()
from __future__ import unicode_literals import frappe #import logging, os, sys jasper_session_obj = frappe.local("jasper_session_obj") jasper_session = frappe.local("jasper_session") pyjnius = False jasperserverlib = False #frappe.logger("jasper_erpnext_report").addHandler(logging.NullHandler()) fds = frappe.local("fds") batch = frappe.local("batch") from .utils.utils import get_Frappe_Version FRAPPE_VERSION = get_Frappe_Version()