Fixed merge conflict
This commit is contained in:
commit
fce14fdcf0
@ -4,7 +4,7 @@ import inspect
|
||||
import frappe
|
||||
from erpnext.hooks import regional_overrides
|
||||
|
||||
__version__ = '9.0.1'
|
||||
__version__ = '9.0.2'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
@ -8,6 +8,7 @@ from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cstr, cint
|
||||
from frappe.contacts.doctype.address.address import get_default_address
|
||||
from frappe.utils.nestedset import get_root_of
|
||||
from erpnext.setup.doctype.customer_group.customer_group import get_parent_customer_groups
|
||||
|
||||
class IncorrectCustomerGroup(frappe.ValidationError): pass
|
||||
@ -136,7 +137,7 @@ def get_tax_template(posting_date, args):
|
||||
if key=="use_for_shopping_cart":
|
||||
conditions.append("use_for_shopping_cart = {0}".format(1 if value else 0))
|
||||
if key == 'customer_group':
|
||||
if not value: value = _("All Customer Groups")
|
||||
if not value: value = get_root_of("Customer Group")
|
||||
customer_group_condition = get_customer_group_condition(value)
|
||||
conditions.append("ifnull({0}, '') in ('', {1})".format(key, customer_group_condition))
|
||||
else:
|
||||
|
@ -408,6 +408,8 @@ erpnext.patches.v8_0.update_stock_qty_value_in_bom_item
|
||||
erpnext.patches.v8_0.update_sales_cost_in_project
|
||||
erpnext.patches.v8_0.save_system_settings
|
||||
erpnext.patches.v8_1.delete_deprecated_reports
|
||||
erpnext.patches.v9_0.remove_subscription_module
|
||||
erpnext.patches.v8_7.make_subscription_from_recurring_data
|
||||
erpnext.patches.v8_1.setup_gst_india #2017-06-27
|
||||
execute:frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')
|
||||
erpnext.patches.v8_1.removed_roles_from_gst_report_non_indian_account
|
||||
@ -439,9 +441,7 @@ erpnext.patches.v8_7.set_offline_in_pos_settings #11-09-17
|
||||
erpnext.patches.v8_9.add_setup_progress_actions #08-09-2017 #26-09-2017
|
||||
erpnext.patches.v8_9.rename_company_sales_target_field
|
||||
erpnext.patches.v8_8.set_bom_rate_as_per_uom
|
||||
erpnext.patches.v8_7.make_subscription_from_recurring_data
|
||||
erpnext.patches.v8_8.add_new_fields_in_accounts_settings
|
||||
erpnext.patches.v9_0.remove_subscription_module
|
||||
erpnext.patches.v8_9.set_print_zero_amount_taxes
|
||||
erpnext.patches.v8_9.set_default_customer_group
|
||||
erpnext.patches.v8_9.remove_employee_from_salary_structure_parent
|
||||
|
@ -8,9 +8,15 @@ from frappe.utils import today
|
||||
def execute():
|
||||
frappe.reload_doc('accounts', 'doctype', 'subscription')
|
||||
frappe.reload_doc('selling', 'doctype', 'sales_order')
|
||||
frappe.reload_doc('selling', 'doctype', 'quotation')
|
||||
frappe.reload_doc('buying', 'doctype', 'purchase_order')
|
||||
frappe.reload_doc('buying', 'doctype', 'supplier_quotation')
|
||||
frappe.reload_doc('accounts', 'doctype', 'sales_invoice')
|
||||
frappe.reload_doc('accounts', 'doctype', 'purchase_invoice')
|
||||
frappe.reload_doc('stock', 'doctype', 'purchase_receipt')
|
||||
frappe.reload_doc('stock', 'doctype', 'delivery_note')
|
||||
frappe.reload_doc('accounts', 'doctype', 'journal_entry')
|
||||
frappe.reload_doc('accounts', 'doctype', 'payment_entry')
|
||||
|
||||
for doctype in ['Sales Order', 'Sales Invoice',
|
||||
'Purchase Invoice', 'Purchase Invoice']:
|
||||
|
@ -12,7 +12,7 @@ def setup(company=None, patch=True):
|
||||
make_custom_fields()
|
||||
add_permissions()
|
||||
add_custom_roles_for_reports()
|
||||
add_hsn_sac_codes()
|
||||
frappe.enqueue('erpnext.regional.india.setup.add_hsn_sac_codes')
|
||||
add_print_formats()
|
||||
if not patch:
|
||||
update_address_template()
|
||||
@ -47,12 +47,14 @@ def add_hsn_sac_codes():
|
||||
|
||||
def create_hsn_codes(data, code_field):
|
||||
for d in data:
|
||||
if not frappe.db.exists("GST HSN Code", d[code_field]):
|
||||
hsn_code = frappe.new_doc('GST HSN Code')
|
||||
hsn_code.description = d["description"]
|
||||
hsn_code.hsn_code = d[code_field]
|
||||
hsn_code.name = d[code_field]
|
||||
try:
|
||||
hsn_code.db_insert()
|
||||
except frappe.DuplicateEntryError:
|
||||
pass
|
||||
|
||||
def add_custom_roles_for_reports():
|
||||
for report_name in ('GST Sales Register', 'GST Purchase Register',
|
||||
|
@ -103,14 +103,15 @@ def split_batch(batch_no, item_code, warehouse, qty, new_batch_id = None):
|
||||
def set_batch_nos(doc, warehouse_field, throw = False):
|
||||
'''Automatically select `batch_no` for outgoing items in item table'''
|
||||
for d in doc.items:
|
||||
qty = d.get('stock_qty') or d.get('qty') or 0
|
||||
has_batch_no = frappe.db.get_value('Item', d.item_code, 'has_batch_no')
|
||||
warehouse = d.get(warehouse_field, None)
|
||||
if has_batch_no and warehouse and d.stock_qty > 0:
|
||||
if has_batch_no and warehouse and qty > 0:
|
||||
if not d.batch_no:
|
||||
d.batch_no = get_batch_no(d.item_code, warehouse, d.stock_qty, throw)
|
||||
d.batch_no = get_batch_no(d.item_code, warehouse, qty, throw)
|
||||
else:
|
||||
batch_qty = get_batch_qty(batch_no=d.batch_no, warehouse=warehouse)
|
||||
if flt(batch_qty) < flt(d.stock_qty):
|
||||
if flt(batch_qty) < flt(qty):
|
||||
frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, d.qty))
|
||||
|
||||
def get_batch_no(item_code, warehouse, qty, throw=False):
|
||||
|
Loading…
Reference in New Issue
Block a user