Merge branch 'develop'
This commit is contained in:
commit
dc24d0151c
@ -1 +1,2 @@
|
|||||||
__version__ = '4.22.1'
|
from __future__ import unicode_literals
|
||||||
|
__version__ = '4.22.2'
|
||||||
|
@ -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
|
||||||
test_records = frappe.get_test_records('Budget Distribution')
|
test_records = frappe.get_test_records('Budget Distribution')
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
account_properties = {
|
account_properties = {
|
||||||
"Deutscher Kontenplan SKR03": {
|
"Deutscher Kontenplan SKR03": {
|
||||||
"Bilanzkonten": {
|
"Bilanzkonten": {
|
||||||
|
@ -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
|
||||||
|
@ -59,6 +59,7 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
if cint(self.update_stock):
|
if cint(self.update_stock):
|
||||||
self.validate_item_code()
|
self.validate_item_code()
|
||||||
|
self.validate_warehouse()
|
||||||
self.update_current_stock()
|
self.update_current_stock()
|
||||||
self.validate_delivery_note()
|
self.validate_delivery_note()
|
||||||
|
|
||||||
@ -350,6 +351,11 @@ class SalesInvoice(SellingController):
|
|||||||
if not d.item_code:
|
if not d.item_code:
|
||||||
msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
|
msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
|
||||||
|
|
||||||
|
def validate_warehouse(self):
|
||||||
|
for d in self.get('entries'):
|
||||||
|
if not d.warehouse:
|
||||||
|
frappe.throw(_("Warehouse required at Row No {0}").format(d.idx))
|
||||||
|
|
||||||
def validate_delivery_note(self):
|
def validate_delivery_note(self):
|
||||||
for d in self.get("entries"):
|
for d in self.get("entries"):
|
||||||
if d.delivery_note:
|
if d.delivery_note:
|
||||||
|
@ -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
|
||||||
|
@ -161,7 +161,8 @@ def add_total_row(out, balance_must_be, period_list):
|
|||||||
def get_accounts(company, root_type):
|
def get_accounts(company, root_type):
|
||||||
# root lft, rgt
|
# root lft, rgt
|
||||||
root_account = frappe.db.sql("""select lft, rgt from `tabAccount`
|
root_account = frappe.db.sql("""select lft, rgt from `tabAccount`
|
||||||
where company=%s and root_type=%s order by lft limit 1""",
|
where company=%s and root_type=%s and ifnull(parent_account, '') = ''
|
||||||
|
order by lft limit 1""",
|
||||||
(company, root_type), as_dict=True)
|
(company, root_type), as_dict=True)
|
||||||
|
|
||||||
if not root_account:
|
if not root_account:
|
||||||
|
@ -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.widgets.moduleview import add_setup_section
|
from frappe.widgets.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():
|
||||||
|
@ -391,6 +391,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,10 +1,11 @@
|
|||||||
|
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"
|
||||||
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
|
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
|
||||||
app_icon = "icon-th"
|
app_icon = "icon-th"
|
||||||
app_color = "#e74c3c"
|
app_color = "#e74c3c"
|
||||||
app_version = "4.22.1"
|
app_version = "4.22.2"
|
||||||
|
|
||||||
error_report_email = "support@erpnext.com"
|
error_report_email = "support@erpnext.com"
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -395,30 +395,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
|
||||||
|
@ -93,3 +93,4 @@ erpnext.patches.v4_2.recalculate_bom_costs
|
|||||||
erpnext.patches.v4_2.discount_amount
|
erpnext.patches.v4_2.discount_amount
|
||||||
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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
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
|
# 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 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, 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
|
||||||
|
@ -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
|
||||||
|
|
||||||
# pre loaded
|
# pre loaded
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -52,7 +52,7 @@ class StockLedgerEntry(Document):
|
|||||||
frappe.throw(_("Actual Qty is mandatory"))
|
frappe.throw(_("Actual Qty is mandatory"))
|
||||||
|
|
||||||
def validate_item(self):
|
def validate_item(self):
|
||||||
item_det = frappe.db.sql("""select name, has_batch_no, docstatus, is_stock_item
|
item_det = frappe.db.sql("""select name, has_batch_no, docstatus, is_stock_item, stock_uom
|
||||||
from tabItem where name=%s""", self.item_code, as_dict=True)[0]
|
from tabItem where name=%s""", self.item_code, as_dict=True)[0]
|
||||||
|
|
||||||
if item_det.is_stock_item != 'Yes':
|
if item_det.is_stock_item != 'Yes':
|
||||||
|
@ -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
|
||||||
|
@ -171,7 +171,8 @@ def get_basic_details(args, item_doc):
|
|||||||
# if default specified in item is for another company, fetch from company
|
# 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"],
|
for d in [["Account", "income_account", "default_income_account"], ["Account", "expense_account", "default_expense_account"],
|
||||||
["Cost Center", "cost_center", "cost_center"], ["Warehouse", "warehouse", ""]]:
|
["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"):
|
company = frappe.db.get_value(d[0], out.get(d[1]), "company")
|
||||||
|
if not out[d[1]] or (company and args.company != company):
|
||||||
out[d[1]] = frappe.db.get_value("Company", args.company, d[2]) if d[2] else None
|
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"):
|
||||||
|
@ -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"]
|
||||||
@ -59,7 +59,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)
|
||||||
@ -78,7 +78,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
|
||||||
@ -106,7 +105,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
|
# 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
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
2
setup.py
2
setup.py
@ -1,7 +1,7 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
import os
|
import os
|
||||||
|
|
||||||
version = "4.22.1"
|
version = "4.22.2"
|
||||||
|
|
||||||
with open("requirements.txt", "r") as f:
|
with open("requirements.txt", "r") as f:
|
||||||
install_requires = f.readlines()
|
install_requires = f.readlines()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user