reload sales invoice print formats

This commit is contained in:
Anand Doshi 2012-05-15 18:17:52 +05:30
parent f044526b92
commit a5a747fd8d
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,16 @@
def execute():
import webnotes
import webnotes.modules
res = webnotes.conn.sql("""\
select module, name, standard from `tabPrint Format`
where name like 'Sales Invoice%'""", as_dict=1)
for r in res:
if r.get('standard')=='Yes' and \
r.get('name') in [
'Sales Invoice Classic',
'Sales Invoice Spartan',
'Sales Invoice Modern'
]:
print r.get('name')
webnotes.modules.reload_doc(r.get('module'), 'Print Format', r.get('name'))

View File

@ -347,5 +347,10 @@ patch_list = [
'patch_file': 'page_role_series_fix',
'description': 'reset series of page role at max'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'reload_sales_invoice_pf',
'description': 'Reload sales invoice print formats'
},
]