This commit is contained in:
Rushabh Mehta 2012-03-01 13:59:47 +05:30
commit 4a0cc249a9
11 changed files with 65 additions and 31 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,10 @@
def execute():
"""
Adds various roles to Administrator. This patch is for making master db
ready for on premise installation
"""
import webnotes
from webnotes.model.code import get_obj
from webnotes.model.doc import Document
sc = get_obj('Setup Control', 'Setup Control')
sc.add_roles(Document('Profile', 'Administrator'))

View File

@ -40,3 +40,8 @@ def execute():
delete_doc('DocType', 'Update Delivery Date Detail')
# Reload print formats
reload_doc('accounts', 'Print Format', 'Sales Invoice Classic')
reload_doc('accounts', 'Print Format', 'Sales Invoice Modern')
reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan')

View File

@ -69,3 +69,12 @@ def replace_file_list_column_entries():
if file_list and "/" in file_list:
webnotes.conn.sql("UPDATE `%s` SET file_list='%s' WHERE name='%s'" \
% (tab, file_list.replace('/', '-'), name))
singles = webnotes.conn.sql("""SELECT doctype, value FROM `tabSingles`
WHERE field='file_list'""")
for doctype, file_list in singles:
if file_list and "/" in file_list:
webnotes.conn.sql("""UPDATE `tabSingles` SET value='%s'
WHERE doctype='%s' AND field='file_list'"""
% (file_list.replace('/', '-'), doctype))

View File

@ -157,4 +157,14 @@ patch_list = [
'patch_file': 'navupdate',
'description': 'New Navigation Pages'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'label_cleanup',
'description': 'Remove extra fields and new dynamic labels'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'add_roles_to_admin',
'description': 'Add Roles to Administrator'
},
]

View File

@ -200,7 +200,7 @@
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td><script>date.str_to_user(doc.voucher_date)</script></td>
<td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>

View File

@ -227,7 +227,7 @@
</tr>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td><script>date.str_to_user(doc.voucher_date)</script></td>
<td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>

View File

@ -222,7 +222,7 @@
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td><script>date.str_to_user(doc.voucher_date)</script></td>
<td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>

View File

@ -1717,7 +1717,7 @@ f.hide_save=function(){$dh(me.page_layout.footer.save_area);}}
_f.Frm.prototype.setup_fields_std=function(){var fl=fields_list[this.doctype];fl.sort(function(a,b){return a.idx-b.idx});if(fl[0]&&fl[0].fieldtype!="Section Break"||get_url_arg('embed')){this.layout.addrow();if(fl[0].fieldtype!="Column Break"){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}
var sec;for(var i=0;i<fl.length;i++){var f=fl[i];if(get_url_arg('embed')&&(in_list(['Section Break','Column Break'],f.fieldtype)))continue;if(f.fieldtype=='Section Break'&&fl[i+1]&&fl[i+1].fieldtype=='Section Break')continue;var fn=f.fieldname?f.fieldname:f.label;var fld=make_field(f,this.doctype,this.layout.cur_cell,this);this.fields[this.fields.length]=fld;this.fields_dict[fn]=fld;if(this.meta.section_style!='Simple')
fld.parent_section=sec;if(f.fieldtype=='Section Break'&&f.options!='Simple')
sec=fld;if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}}
sec=fld;if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')&&!f.hidden){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}}
_f.Frm.prototype.add_custom_button=function(label,fn,icon){this.frm_head.page_head.add_button(label,fn,1);}
_f.Frm.prototype.clear_custom_buttons=function(){}
_f.Frm.prototype.add_fetch=function(link_field,src_field,tar_field){if(!this.fetch_dict[link_field]){this.fetch_dict[link_field]={'columns':[],'fields':[]}}