From 3b1ebe0b24fef1eb0d86b7ec545a2316e68ecba6 Mon Sep 17 00:00:00 2001 From: Brahma K Date: Wed, 27 Jul 2011 13:04:11 +0530 Subject: [PATCH 1/2] Patch to give permission to Accounts Manager to Lease Agreement --- .../lease_agreement/lease_agreement.txt | 33 +++++++++++++++---- patches/patch.py | 5 +++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/accounts/doctype/lease_agreement/lease_agreement.txt b/accounts/doctype/lease_agreement/lease_agreement.txt index 6fe06bf2f4..1d35a10eb7 100644 --- a/accounts/doctype/lease_agreement/lease_agreement.txt +++ b/accounts/doctype/lease_agreement/lease_agreement.txt @@ -5,21 +5,21 @@ { 'creation': '2011-07-22 17:47:57', 'docstatus': 0, - 'modified': '2011-07-25 06:36:04', + 'modified': '2011-07-27 12:54:48', 'modified_by': 'Administrator', 'owner': 'Administrator' }, # These values are common for all DocType { - '_last_update': '1311348373', + '_last_update': '1311555967', 'colour': 'White:FFF', 'doctype': 'DocType', 'module': 'Accounts', 'name': '__common__', 'section_style': 'Simple', 'show_in_menu': 0, - 'version': 19 + 'version': 20 }, # These values are common for all DocField @@ -38,8 +38,7 @@ 'parent': 'Lease Agreement', 'parentfield': 'permissions', 'parenttype': 'DocType', - 'read': 1, - 'role': 'Accounts User' + 'read': 1 }, # DocType, Lease Agreement @@ -55,6 +54,7 @@ 'doctype': 'DocPerm', 'idx': 1, 'permlevel': 0, + 'role': 'Accounts User', 'submit': 1, 'write': 1 }, @@ -63,7 +63,28 @@ { 'doctype': 'DocPerm', 'idx': 2, - 'permlevel': 1 + 'permlevel': 1, + 'role': 'Accounts User' + }, + + # DocPerm + { + 'cancel': 1, + 'create': 1, + 'doctype': 'DocPerm', + 'idx': 3, + 'permlevel': 0, + 'role': 'Accounts Manager', + 'submit': 1, + 'write': 1 + }, + + # DocPerm + { + 'doctype': 'DocPerm', + 'idx': 4, + 'permlevel': 1, + 'role': 'Accounts Manager' }, # DocField diff --git a/patches/patch.py b/patches/patch.py index bd726e53ea..0ceb2a7b6d 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1341,3 +1341,8 @@ def execute(patch_no): reload_doc('accounts', 'search_criteria', 'lease_yearly_future_installment_inflows') reload_doc('accounts', 'Module Def', 'Accounts') + elif patch_no == 331: + p = get_obj('Patch Util') + # permission + p.add_permission('Lease Agreement', 'Accounts Manager', 0, read = 1, write=1,submit=1, cancel=1,amend=1) + p.add_permission('Lease Agreement', 'Accounts Manager', 1, read = 1) From 3085b1022412ab466af5fd394437681cfd1a138e Mon Sep 17 00:00:00 2001 From: Brahma K Date: Wed, 27 Jul 2011 13:08:11 +0530 Subject: [PATCH 2/2] Upload Account Transactions .txt added --- .../upload_accounts_transactions.txt | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 setup/doctype/upload_accounts_transactions/upload_accounts_transactions.txt diff --git a/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.txt b/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.txt new file mode 100644 index 0000000000..d637a886a6 --- /dev/null +++ b/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.txt @@ -0,0 +1,126 @@ +# DocType, Upload Accounts Transactions +[ + + # These values are common in all dictionaries + { + 'creation': '2011-07-18 14:56:48', + 'docstatus': 0, + 'modified': '2011-07-19 12:19:13', + 'modified_by': 'Administrator', + 'owner': 'Administrator' + }, + + # These values are common for all DocType + { + '_last_update': '1310985428', + 'allow_attach': 1, + 'colour': 'White:FFF', + 'doctype': 'DocType', + 'issingle': 1, + 'max_attachments': 1, + 'module': 'Setup', + 'name': '__common__', + 'section_style': 'Simple', + 'show_in_menu': 1, + 'version': 5 + }, + + # These values are common for all DocField + { + 'doctype': 'DocField', + 'name': '__common__', + 'parent': 'Upload Accounts Transactions', + 'parentfield': 'fields', + 'parenttype': 'DocType', + 'permlevel': 0 + }, + + # These values are common for all DocPerm + { + 'cancel': 1, + 'create': 1, + 'doctype': 'DocPerm', + 'execute': 1, + 'idx': 1, + 'name': '__common__', + 'parent': 'Upload Accounts Transactions', + 'parentfield': 'permissions', + 'parenttype': 'DocType', + 'permlevel': 0, + 'read': 1, + 'role': 'Accounts Manager', + 'submit': 1, + 'write': 1 + }, + + # DocType, Upload Accounts Transactions + { + 'doctype': 'DocType', + 'name': 'Upload Accounts Transactions' + }, + + # DocPerm + { + 'doctype': 'DocPerm' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'HTML', + 'idx': 1, + 'label': 'Usage', + 'options': '
\nUpload Account Transactions Help\n

To update the account transactions, upload a CSV file with five columns Date, Transaction Number, Account Name, Credit and Debit amount and click on the "Upload Account Transactions" button. The system will add the transactions.\n

' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'fiscal_year', + 'fieldtype': 'Link', + 'idx': 2, + 'label': 'Fiscal Year', + 'options': 'Fiscal Year', + 'reqd': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'company', + 'fieldtype': 'Link', + 'idx': 3, + 'label': 'Company', + 'options': 'Company', + 'reqd': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'default_cost_center', + 'fieldtype': 'Link', + 'idx': 4, + 'label': 'Default Cost Center', + 'options': 'Cost Center', + 'reqd': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'file_list', + 'fieldtype': 'Small Text', + 'hidden': 1, + 'idx': 5, + 'label': 'File List' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Button', + 'idx': 6, + 'label': 'Upload Accounts Transactions' + } +] \ No newline at end of file