Merge pull request #20 from tobrahma/master

Lease Agreement Permissions update for Accounts Manager
This commit is contained in:
Nabin Hait 2011-07-27 00:42:41 -07:00
commit 3a5a9e3748
3 changed files with 158 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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': '<div class="help_box">\n<b>Upload Account Transactions Help</b>\n<p>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</div>'
},
# 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'
}
]