Merge remote-tracking branch 'frappe/develop' into v5.0
Conflicts: erpnext/__version__.py erpnext/accounts/doctype/budget_distribution/test_budget_distribution.py erpnext/accounts/doctype/chart_of_accounts/charts/account_properties.py erpnext/hooks.py erpnext/patches.txt erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py erpnext/stock/get_item_details.py erpnext/translations/ar.csv erpnext/translations/bs.csv erpnext/translations/ca.csv erpnext/translations/el.csv erpnext/translations/es.csv erpnext/translations/fr.csv erpnext/translations/hr.csv erpnext/translations/id.csv erpnext/translations/is.csv erpnext/translations/ja.csv erpnext/translations/nl.csv erpnext/translations/pl.csv erpnext/translations/pt-BR.csv erpnext/translations/ru.csv erpnext/translations/tr.csv erpnext/translations/zh-cn.csv erpnext/translations/zh-tw.csv setup.py
This commit is contained in:
commit
d35354cc06
@ -1 +1,2 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
__version__ = '5.0.0-alpha'
|
__version__ = '5.0.0-alpha'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest, json, copy
|
import unittest, json, copy
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.desk.moduleview import add_setup_section
|
from frappe.desk.moduleview import add_setup_section
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
|
@ -215,6 +215,7 @@ class SellingController(StockController):
|
|||||||
'qty': d.qty,
|
'qty': d.qty,
|
||||||
'reserved_qty': reserved_qty_for_main_item,
|
'reserved_qty': reserved_qty_for_main_item,
|
||||||
'uom': d.stock_uom,
|
'uom': d.stock_uom,
|
||||||
|
'stock_uom': d.stock_uom,
|
||||||
'batch_no': cstr(d.get("batch_no")).strip(),
|
'batch_no': cstr(d.get("batch_no")).strip(),
|
||||||
'serial_no': cstr(d.get("serial_no")).strip(),
|
'serial_no': cstr(d.get("serial_no")).strip(),
|
||||||
'name': d.name
|
'name': d.name
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import frappe.permissions
|
import frappe.permissions
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
app_name = "erpnext"
|
app_name = "erpnext"
|
||||||
app_title = "ERPNext"
|
app_title = "ERPNext"
|
||||||
app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors"
|
app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
test_ignore = ["Leave Block List"]
|
test_ignore = ["Leave Block List"]
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
test_records = frappe.get_test_records('Leave Allocation')
|
test_records = frappe.get_test_records('Leave Allocation')
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -374,30 +374,23 @@ def get_bom_items_as_dict(bom, qty=1, fetch_exploded=1):
|
|||||||
item.expense_account as expense_account,
|
item.expense_account as expense_account,
|
||||||
item.buying_cost_center as cost_center
|
item.buying_cost_center as cost_center
|
||||||
from
|
from
|
||||||
`tab%(table)s` bom_item, `tabBOM` bom, `tabItem` item
|
`tab{table}` bom_item, `tabBOM` bom, `tabItem` item
|
||||||
where
|
where
|
||||||
bom_item.parent = bom.name
|
bom_item.parent = bom.name
|
||||||
and bom_item.docstatus < 2
|
and bom_item.docstatus < 2
|
||||||
and bom_item.parent = "%(bom)s"
|
and bom_item.parent = %(bom)s
|
||||||
and item.name = bom_item.item_code
|
and item.name = bom_item.item_code
|
||||||
%(conditions)s
|
{conditions}
|
||||||
group by item_code, stock_uom"""
|
group by item_code, stock_uom"""
|
||||||
|
|
||||||
if fetch_exploded:
|
if fetch_exploded:
|
||||||
items = frappe.db.sql(query % {
|
query = query.format(table="BOM Explosion Item",
|
||||||
"qty": qty,
|
conditions="""and ifnull(item.is_pro_applicable, 'No') = 'No'
|
||||||
"table": "BOM Explosion Item",
|
and ifnull(item.is_sub_contracted_item, 'No') = 'No' """)
|
||||||
"bom": bom,
|
items = frappe.db.sql(query, { "qty": qty, "bom": bom }, as_dict=True)
|
||||||
"conditions": """and ifnull(item.is_pro_applicable, 'No') = 'No'
|
|
||||||
and ifnull(item.is_sub_contracted_item, 'No') = 'No' """
|
|
||||||
}, as_dict=True)
|
|
||||||
else:
|
else:
|
||||||
items = frappe.db.sql(query % {
|
query = query.format(table="BOM Item", conditions="")
|
||||||
"qty": qty,
|
items = frappe.db.sql(query, { "qty": qty, "bom": bom }, as_dict=True)
|
||||||
"table": "BOM Item",
|
|
||||||
"bom": bom,
|
|
||||||
"conditions": ""
|
|
||||||
}, as_dict=True)
|
|
||||||
|
|
||||||
# make unique
|
# make unique
|
||||||
for item in items:
|
for item in items:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -105,6 +105,7 @@ erpnext.patches.v4_2.party_model
|
|||||||
erpnext.patches.v4_1.fix_jv_remarks
|
erpnext.patches.v4_1.fix_jv_remarks
|
||||||
erpnext.patches.v4_2.update_landed_cost_voucher
|
erpnext.patches.v4_2.update_landed_cost_voucher
|
||||||
erpnext.patches.v4_2.set_item_has_batch
|
erpnext.patches.v4_2.set_item_has_batch
|
||||||
|
erpnext.patches.v4_2.update_stock_uom_for_dn_in_sle
|
||||||
erpnext.patches.v5_0.recalculate_total_amount_in_jv
|
erpnext.patches.v5_0.recalculate_total_amount_in_jv
|
||||||
erpnext.patches.v5_0.remove_shopping_cart_app
|
erpnext.patches.v5_0.remove_shopping_cart_app
|
||||||
erpnext.patches.v5_0.update_companywise_payment_account
|
erpnext.patches.v5_0.update_companywise_payment_account
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
import frappe.model
|
import frappe.model
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.templates.pages.style_settings import default_properties
|
from frappe.templates.pages.style_settings import default_properties
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
11
erpnext/patches/v4_2/update_stock_uom_for_dn_in_sle.py
Normal file
11
erpnext/patches/v4_2/update_stock_uom_for_dn_in_sle.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.db.sql("""update `tabStock Ledger Entry` sle, tabItem item
|
||||||
|
set sle.stock_uom = item.stock_uom
|
||||||
|
where sle.voucher_type="Delivery Note" and item.name = sle.item_code
|
||||||
|
and sle.stock_uom != item.stock_uom""")
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
from frappe.installer import remove_from_installed_apps
|
from frappe.installer import remove_from_installed_apps
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe, unittest
|
import frappe, unittest
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe, json
|
import frappe, json
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
|
@ -94,6 +94,9 @@ class AuthorizationControl(TransactionBase):
|
|||||||
self.validate_auth_rule(doctype_name, auth_value, based_on, add_cond, company)
|
self.validate_auth_rule(doctype_name, auth_value, based_on, add_cond, company)
|
||||||
|
|
||||||
def validate_approving_authority(self, doctype_name,company, total, doc_obj = ''):
|
def validate_approving_authority(self, doctype_name,company, total, doc_obj = ''):
|
||||||
|
if not frappe.db.count("Authorization Rule"):
|
||||||
|
return
|
||||||
|
|
||||||
av_dis = 0
|
av_dis = 0
|
||||||
if doc_obj:
|
if doc_obj:
|
||||||
price_list_rate, base_rate = 0, 0
|
price_list_rate, base_rate = 0, 0
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
test_ignore = ["Account", "Cost Center"]
|
test_ignore = ["Account", "Cost Center"]
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
test_ignore = ["Price List"]
|
test_ignore = ["Price List"]
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
test_dependencies = ["Employee"]
|
test_dependencies = ["Employee"]
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.exceptions import ValidationError
|
from frappe.exceptions import ValidationError
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
@ -175,6 +175,12 @@ def get_basic_details(args, item):
|
|||||||
"discount_percentage": 0.0
|
"discount_percentage": 0.0
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# if default specified in item is for another company, fetch from company
|
||||||
|
for d in [["Account", "income_account", "default_income_account"], ["Account", "expense_account", "default_expense_account"],
|
||||||
|
["Cost Center", "cost_center", "cost_center"], ["Warehouse", "warehouse", ""]]:
|
||||||
|
if not out[d[1]] or args.company != frappe.db.get_value(d[0], out.get(d[1]), "company"):
|
||||||
|
out[d[1]] = frappe.db.get_value("Company", args.company, d[2]) if d[2] else None
|
||||||
|
|
||||||
for fieldname in ("item_name", "item_group", "barcode", "brand", "stock_uom"):
|
for fieldname in ("item_name", "item_group", "barcode", "brand", "stock_uom"):
|
||||||
out[fieldname] = item.get(fieldname)
|
out[fieldname] = item.get(fieldname)
|
||||||
|
|
||||||
@ -183,20 +189,17 @@ def get_basic_details(args, item):
|
|||||||
def get_default_income_account(args, item):
|
def get_default_income_account(args, item):
|
||||||
return (item.income_account
|
return (item.income_account
|
||||||
or args.income_account
|
or args.income_account
|
||||||
or frappe.db.get_value("Item Group", item.item_group, "default_income_account")
|
or frappe.db.get_value("Item Group", item.item_group, "default_income_account"))
|
||||||
or frappe.db.get_value("Company", args.company, "default_income_account"))
|
|
||||||
|
|
||||||
def get_default_expense_account(args, item):
|
def get_default_expense_account(args, item):
|
||||||
return (item.expense_account
|
return (item.expense_account
|
||||||
or args.expense_account
|
or args.expense_account
|
||||||
or frappe.db.get_value("Item Group", item.item_group, "default_expense_account")
|
or frappe.db.get_value("Item Group", item.item_group, "default_expense_account"))
|
||||||
or frappe.db.get_value("Company", args.company, "default_expense_account"))
|
|
||||||
|
|
||||||
def get_default_cost_center(args, item):
|
def get_default_cost_center(args, item):
|
||||||
return (frappe.db.get_value("Project", args.get("project_name"), "cost_center")
|
return (frappe.db.get_value("Project", args.get("project_name"), "cost_center")
|
||||||
or (item.selling_cost_center if args.get("transaction_type") == "selling" else item.buying_cost_center)
|
or (item.selling_cost_center if args.get("transaction_type") == "selling" else item.buying_cost_center)
|
||||||
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
|
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center"))
|
||||||
or frappe.db.get_value("Company", args.get("company"), "cost_center"))
|
|
||||||
|
|
||||||
def get_price_list_rate(args, item_doc, out):
|
def get_price_list_rate(args, item_doc, out):
|
||||||
meta = frappe.get_meta(args.parenttype)
|
meta = frappe.get_meta(args.parenttype)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
@ -22,7 +22,7 @@ def execute(filters=None):
|
|||||||
item_map[item]["item_group"],
|
item_map[item]["item_group"],
|
||||||
item_map[item]["brand"],
|
item_map[item]["brand"],
|
||||||
item_map[item]["description"], wh,
|
item_map[item]["description"], wh,
|
||||||
qty_dict.uom, qty_dict.opening_qty,
|
item_map[item]["stock_uom"], qty_dict.opening_qty,
|
||||||
qty_dict.opening_val, qty_dict.in_qty,
|
qty_dict.opening_val, qty_dict.in_qty,
|
||||||
qty_dict.in_val, qty_dict.out_qty,
|
qty_dict.in_val, qty_dict.out_qty,
|
||||||
qty_dict.out_val, qty_dict.bal_qty,
|
qty_dict.out_val, qty_dict.bal_qty,
|
||||||
@ -36,7 +36,7 @@ def get_columns(filters):
|
|||||||
"""return columns based on filters"""
|
"""return columns based on filters"""
|
||||||
|
|
||||||
columns = ["Item:Link/Item:100", "Item Name::150", "Item Group::100", "Brand::90", \
|
columns = ["Item:Link/Item:100", "Item Name::150", "Item Group::100", "Brand::90", \
|
||||||
"Description::140", "Warehouse:Link/Warehouse:100", "Stock UOM::90", "Opening Qty:Float:100", \
|
"Description::140", "Warehouse:Link/Warehouse:100", "Stock UOM:Link/UOM:90", "Opening Qty:Float:100", \
|
||||||
"Opening Value:Float:110", "In Qty:Float:80", "In Value:Float:80", "Out Qty:Float:80", \
|
"Opening Value:Float:110", "In Qty:Float:80", "In Value:Float:80", "Out Qty:Float:80", \
|
||||||
"Out Value:Float:80", "Balance Qty:Float:100", "Balance Value:Float:100", \
|
"Out Value:Float:80", "Balance Qty:Float:100", "Balance Value:Float:100", \
|
||||||
"Valuation Rate:Float:90", "Company:Link/Company:100"]
|
"Valuation Rate:Float:90", "Company:Link/Company:100"]
|
||||||
@ -62,7 +62,7 @@ def get_conditions(filters):
|
|||||||
def get_stock_ledger_entries(filters):
|
def get_stock_ledger_entries(filters):
|
||||||
conditions = get_conditions(filters)
|
conditions = get_conditions(filters)
|
||||||
return frappe.db.sql("""select item_code, warehouse, posting_date, actual_qty, valuation_rate,
|
return frappe.db.sql("""select item_code, warehouse, posting_date, actual_qty, valuation_rate,
|
||||||
stock_uom, company, voucher_type, qty_after_transaction, stock_value_difference
|
company, voucher_type, qty_after_transaction, stock_value_difference
|
||||||
from `tabStock Ledger Entry`
|
from `tabStock Ledger Entry`
|
||||||
where docstatus < 2 %s order by posting_date, posting_time, name""" %
|
where docstatus < 2 %s order by posting_date, posting_time, name""" %
|
||||||
conditions, as_dict=1)
|
conditions, as_dict=1)
|
||||||
@ -81,7 +81,6 @@ def get_item_warehouse_map(filters):
|
|||||||
"val_rate": 0.0, "uom": None
|
"val_rate": 0.0, "uom": None
|
||||||
}))
|
}))
|
||||||
qty_dict = iwb_map[d.company][d.item_code][d.warehouse]
|
qty_dict = iwb_map[d.company][d.item_code][d.warehouse]
|
||||||
qty_dict.uom = d.stock_uom
|
|
||||||
|
|
||||||
if d.voucher_type == "Stock Reconciliation":
|
if d.voucher_type == "Stock Reconciliation":
|
||||||
qty_diff = flt(d.qty_after_transaction) - qty_dict.bal_qty
|
qty_diff = flt(d.qty_after_transaction) - qty_dict.bal_qty
|
||||||
@ -109,7 +108,7 @@ def get_item_warehouse_map(filters):
|
|||||||
|
|
||||||
def get_item_details(filters):
|
def get_item_details(filters):
|
||||||
item_map = {}
|
item_map = {}
|
||||||
for d in frappe.db.sql("select name, item_name, item_group, brand, \
|
for d in frappe.db.sql("select name, item_name, stock_uom, item_group, brand, \
|
||||||
description from tabItem", as_dict=1):
|
description from tabItem", as_dict=1):
|
||||||
item_map.setdefault(d.name, d)
|
item_map.setdefault(d.name, d)
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
import json
|
import json
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe, unittest
|
import frappe, unittest
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user