Dear all,
I am using SQLEDITABLE to manage a record set. However, only the visible
ones are being edited/inserted. The not visible ones, including auth info
are not recorded.
For example, I set
> db.purchase_order_product.currency.default =1
>
> db.purchase_order_product.currency.readable=db.purchase_order_product.currency.writable=False
The field won't be shown, the value will not be inserted.
db.py
> db.define_table('purchase_order_product',
> auth.signature,
> Field('po_id', 'reference purchase_order', label=T('Purchase
> order')),
> Field('p_id', 'reference product', label=T('Proudct')),
> Field('currency', 'reference currency', label=T('Currency')),
> Field('price', 'decimal(10,3)', label=T('Purchase price')),
> Field('qty', 'integer', requires=IS_NOT_EMPTY()),
>
> format='%(purchase_order)s %(product)s'
> )
>
>
controller
> def show_products2(po_id):
> rows = db(db.purchase_order_product.po_id == po_id).select()
> return [row.id for row in rows]
>
> editable = SQLEDITABLE(db.purchase_order_product,
> record=show_products2(po_id),
> showid=True, deletable=True, url=URL('editPO', args=po_id), editable=True,
> maxrow=maxrow).process()
view
editPO/4
Any comment & idea? Thanks!
Vic
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.