Merge pull request #6819 from rohitwaghchaure/hotfix_issues
cleanup and fixes
This commit is contained in:
commit
cdc895734f
@ -483,20 +483,22 @@ frappe.ui.form.on('Sales Invoice', {
|
|||||||
frappe.ui.form.on('Sales Invoice Timesheet', {
|
frappe.ui.form.on('Sales Invoice Timesheet', {
|
||||||
time_sheet: function(frm, cdt, cdn){
|
time_sheet: function(frm, cdt, cdn){
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
frappe.call({
|
if(d.time_sheet) {
|
||||||
method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_data",
|
frappe.call({
|
||||||
args: {
|
method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_data",
|
||||||
'name': d.time_sheet,
|
args: {
|
||||||
'project': frm.doc.project || null
|
'name': d.time_sheet,
|
||||||
},
|
'project': frm.doc.project || null
|
||||||
callback: function(r, rt) {
|
},
|
||||||
if(r.message){
|
callback: function(r, rt) {
|
||||||
data = r.message;
|
if(r.message){
|
||||||
frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
|
data = r.message;
|
||||||
frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
|
frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
|
||||||
frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);
|
frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
|
||||||
|
frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -340,6 +340,8 @@ erpnext.patches.v7_0.update_status_of_zero_amount_sales_order
|
|||||||
erpnext.patches.v7_1.add_field_for_task_dependent
|
erpnext.patches.v7_1.add_field_for_task_dependent
|
||||||
erpnext.patches.v7_0.repost_bin_qty_and_item_projected_qty
|
erpnext.patches.v7_0.repost_bin_qty_and_item_projected_qty
|
||||||
erpnext.patches.v7_1.set_prefered_contact_email
|
erpnext.patches.v7_1.set_prefered_contact_email
|
||||||
execute:frappe.db.sql("update `tabSingles` set value = 1 where field = 'unlink_payment_on_cancellation_of_invoice' and doctype = 'Accounts Settings'")
|
execute:frappe.reload_doc('accounts', 'doctype', 'accounts_settings')
|
||||||
|
execute:frappe.db.set_value("Accounts Settings", "Accounts Settings", "unlink_payment_on_cancellation_of_invoice", 0)
|
||||||
execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')")
|
execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')")
|
||||||
erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock #2016-11-01
|
erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock #2016-11-01
|
||||||
|
erpnext.patches.v7_1.add_account_user_role_for_timesheet
|
31
erpnext/patches/v7_1/add_account_user_role_for_timesheet.py
Normal file
31
erpnext/patches/v7_1/add_account_user_role_for_timesheet.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
if not frappe.db.get_value('DocPerm', {'parent': 'Timesheet', 'role': 'Accounts User', 'permlevel': 1}):
|
||||||
|
doc = frappe.get_doc('DocType', 'Timesheet')
|
||||||
|
doc.append('permissions', {
|
||||||
|
'role': "Accounts User",
|
||||||
|
'permlevel': 0,
|
||||||
|
'read': 1,
|
||||||
|
'write': 1,
|
||||||
|
'create': 1,
|
||||||
|
'delete': 1,
|
||||||
|
'submit': 1,
|
||||||
|
'cancel': 1,
|
||||||
|
'amend': 1,
|
||||||
|
'report': 1,
|
||||||
|
'email': 1
|
||||||
|
})
|
||||||
|
|
||||||
|
doc.append('permissions', {
|
||||||
|
'role': "Accounts User",
|
||||||
|
'permlevel': 1,
|
||||||
|
'read': 1,
|
||||||
|
'write': 1
|
||||||
|
})
|
||||||
|
|
||||||
|
doc.save(ignore_permissions=True)
|
@ -847,7 +847,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-11-03 16:06:32.259060",
|
"modified": "2016-11-04 18:27:08.484033",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Timesheet",
|
"name": "Timesheet",
|
||||||
@ -916,48 +916,6 @@
|
|||||||
"submit": 1,
|
"submit": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"amend": 1,
|
|
||||||
"apply_user_permissions": 0,
|
|
||||||
"cancel": 1,
|
|
||||||
"create": 1,
|
|
||||||
"delete": 1,
|
|
||||||
"email": 1,
|
|
||||||
"export": 1,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Accounts User",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 1,
|
|
||||||
"write": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amend": 0,
|
|
||||||
"apply_user_permissions": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 1,
|
|
||||||
"export": 1,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 1,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Accounts User",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
"apply_user_permissions": 0,
|
||||||
@ -978,6 +936,48 @@
|
|||||||
"share": 0,
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amend": 1,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 1,
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"is_custom": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 1,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"is_custom": 0,
|
||||||
|
"permlevel": 1,
|
||||||
|
"print": 0,
|
||||||
|
"read": 1,
|
||||||
|
"report": 0,
|
||||||
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
|
@ -323,17 +323,6 @@ def make_sales_invoice(source_name, target=None):
|
|||||||
def make_salary_slip(source_name, target_doc=None):
|
def make_salary_slip(source_name, target_doc=None):
|
||||||
target = frappe.new_doc("Salary Slip")
|
target = frappe.new_doc("Salary Slip")
|
||||||
set_missing_values(source_name, target)
|
set_missing_values(source_name, target)
|
||||||
|
|
||||||
target.append("timesheets", get_mapped_doc("Timesheet", source_name, {
|
|
||||||
"Timesheet": {
|
|
||||||
"doctype": "Salary Slip Timesheet",
|
|
||||||
"field_map": {
|
|
||||||
"total_hours": "working_hours",
|
|
||||||
"name": "time_sheet"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
target.run_method("get_emp_and_leave_details")
|
target.run_method("get_emp_and_leave_details")
|
||||||
|
|
||||||
return target
|
return target
|
||||||
|
@ -372,7 +372,7 @@
|
|||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Customer's Purchase Order",
|
"label": "Customer's Purchase Order",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"oldfieldname": "po_no",
|
"oldfieldname": "po_no",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -403,7 +403,7 @@
|
|||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Customer's Purchase Order Date",
|
"label": "Customer's Purchase Order Date",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"oldfieldname": "po_date",
|
"oldfieldname": "po_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -3226,7 +3226,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-11-03 16:07:46.757630",
|
"modified": "2016-11-05 08:09:08.921026",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user