Merge pull request #1997 from nabinhait/hotfix

Fixes
This commit is contained in:
Anand Doshi 2014-07-29 15:48:04 +05:30
commit a12312553b
4 changed files with 9 additions and 8 deletions

View File

@ -786,6 +786,7 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
@frappe.whitelist()
def make_delivery_note(source_name, target_doc=None):
def set_missing_values(source, target):
target.ignore_pricing_rule = 1
target.run_method("set_missing_values")
target.run_method("calculate_taxes_and_totals")

View File

@ -25,16 +25,16 @@ pscript['onload_Accounts Browser'] = function(wrapper){
'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
'<li>'+
__('Accounting Entries can be made against leaf nodes, called')+
'<b>' +__('Ledgers')+'</b>.'+ __('Entries against') +
'<b>' +__('Groups') + '</b>'+ __('are not allowed.')+
' <b>' +__('Ledgers')+'</b>. '+ __('Entries against ') +
'<b>' +__('Groups') + '</b> '+ __('are not allowed.')+
'</li>'+
'<li>'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
'<li>'+
'<b>'+__('To create a Bank Account:')+'</b>'+
'<b>'+__('To create a Bank Account')+'</b>: '+
__('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
'</li>'+
'<li>'+
'<b>'+__('To create a Tax Account:')+'</b>'+
'<b>'+__('To create a Tax Account') +'</b>: '+
__('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
'</li>'+
'</ol>'+

View File

@ -69,7 +69,7 @@ erpnext.patches.v4_1.fix_jv_remarks
erpnext.patches.v4_1.fix_sales_order_delivered_status
erpnext.patches.v4_1.fix_delivery_and_billing_status
execute:frappe.db.sql("update `tabAccount` set root_type='Liability' where root_type='Income' and report_type='Balance Sheet'")
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool")
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail")
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool") # 29-07-2014
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail") # 29-07-2014
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
erpnext.patches.v4_2.delete_old_print_formats #2014-07-29

View File

@ -74,14 +74,14 @@ class StockLedgerEntry(Document):
if stock_frozen_upto:
stock_auth_role = frappe.db.get_value('Stock Settings', None,'stock_auth_role')
if getdate(self.posting_date) <= getdate(stock_frozen_upto) and not stock_auth_role in frappe.user.get_roles():
frappe.throw(_("Entries before {0} are frozen").format(formatdate(stock_frozen_upto)), StockFreezeError)
frappe.throw(_("Stock transactions before {0} are frozen").format(formatdate(stock_frozen_upto)), StockFreezeError)
stock_frozen_upto_days = int(frappe.db.get_value('Stock Settings', None, 'stock_frozen_upto_days') or 0)
if stock_frozen_upto_days:
stock_auth_role = frappe.db.get_value('Stock Settings', None,'stock_auth_role')
older_than_x_days_ago = (add_days(getdate(self.posting_date), stock_frozen_upto_days) <= date.today())
if older_than_x_days_ago and not stock_auth_role in frappe.user.get_roles():
frappe.throw(_("Not allowed to update entries older than {0}").format(stock_frozen_upto_days), StockFreezeError)
frappe.throw(_("Not allowed to update stock transactions older than {0}").format(stock_frozen_upto_days), StockFreezeError)
def scrub_posting_time(self):
if not self.posting_time or self.posting_time == '00:0':