> -
>
>
>
>
>
> def schII():
> if not URL.verify(request, hmac_key=KEY): raise HTTP(403)
> amcid = request.vars.amcid
> rowsamcdet = db(db.amc_details.amc_id ==
> amcid).select(db.amc_details.amcno)
> if not rowsamcdet:
> session.flash = "No jobs to make provn"
> redirect(URL('new_contract'))
> amcnod = db(db.amc_master.id ==
> amcid).select(db.amc_master.amcno).first()
> x = db(db.cont_overheads.amc_id ==
> amcid).select(db.cont_overheads.id)
> for i in x:
> record = i['id']
> #rows = db(db.cont_overheads.id == record).select()
> fields = ['phhskn','phhskd','phhsk',
> 'phskn','phskd','phsk',
> 'phsskn','phsskd','phssk',
> 'phuskn','phuskd','phusk',
> 'alwhskn','alwhskd','alwhsk',
> 'alwskn','alwskd','alwsk',
> 'alwsskn','alwsskd','alwssk',
> 'alwuskn','alwuskd','alwusk',
> 'tax','insurance','sac','bonus',
> 'supchr','fringes']
> form =
> SQLFORM(db.cont_overheads,record,keepvalues=True,fields=fields)
> if form.process(session=None,
> formname='frmschII',dbio=False,onvalidation=schII_validation).accepted:
> form.vars.amc_id = amcid
> form.vars.update_uid = session.uname
> form.vars.amcno = amcnod['amcno']
> form.record.update_record(**dict(form.vars))
> db.executesql("exec update_load_schII_amt_awg @amcid =
> ?",placeholders=([form.vars.amc_id]))
> session.flash = 'Overheads updated.'
> redirect(URL('new_contract'))
> elif form.errors:
> print form.errors
> response.flash = 'form has errors'
> else:
> response.flash = 'please fill the form'
> # Note: no form instance is passed to the view
> ## record passed to set the id value in view.
> rows = db(db.cont_overheads.id == record).select()
> rowsconlab = db.executesql("exec usr_getconlabqty_amc_new
> @amcid=?",placeholders=([amcid]),as_dict=True)
> rowsrate = get_amc_rate(amcid)
> return
> dict(record=record,rowsconlab=rowsconlab,rows=rows,rowsrate=rowsrate)
>
>
the error occurs in the line marked red.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/dede93b9-3709-412a-9a33-dbea09285ae6o%40googlegroups.com.