[web2py] Grid edit behavior when no changes are made

2017-08-02 Thread Seth J
Quick question, guys.  I've noticed that when record is edited in a grid 
and no changes are made to it when hitting 'Submit' no entry is made into a 
corresponding archive table.  However, fields "modified on" and "modified 
by" are adjusted according to a user who submitted a change.  Is there way 
to either not change the latter fields or put an entry in an archive table 
reflecting previous state?  
It becomes a little bit misleading and hard to proof that people have not 
made any changes to the record when their name appears as an editor of the 
field.  Thanks!

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[web2py] grid edit

2017-05-23 Thread T.R.Rajkumar
I call this 127.0.0.1:8000/web_ocms/amc/newamcmaster/edit/amc_master/3 by 
clicking the edit button of the recor in the grid, and the edit form for 
the record is displayed. After editing when I submit error ticket is issued 
stating id column cannot be updated. Pl. help. Thanks for your time.
The ticket is

Error ticket for "web_ocms" Ticket ID 

127.0.0.1.2017-05-23.17-15-24.8a493eb8-5c35-4dd1-8ade-97ef1e190c7c
 ('42000', "[42000] [Microsoft][ODBC SQL 
Server Driver][SQL Server]Cannot update identity column 'id'. (8102) 
(SQLExecDirectW)") Version 
web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 
Python Python 2.7.5: D:\Python\python.exe (prefix: D:\Python) Traceback 

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.

Traceback (most recent call last):
  File "D:\web2py\gluon\restricted.py", line 227, in restricted
exec ccode in environment
  File "D:/web2py/applications/web_ocms/controllers/amc.py" 
, line 
49, in 
  File "D:\web2py\gluon\globals.py", line 417, in 
self._caller = lambda f: f()
  File "D:/web2py/applications/web_ocms/models/db.py" 
, line 140, in 
wrapper
return callee()
  File "D:/web2py/applications/web_ocms/controllers/amc.py" 
, line 
42, in newamcmaster
grid = 
SQLFORM.grid(db.amc_master,user_signature=False,fields=list_of_fields,oncreate=create_new_amc)
  File "D:\web2py\gluon\sqlhtml.py", line 2352, in grid
next=referrer)
  File "D:\web2py\gluon\html.py", line 2298, in process
self.validate(**kwargs)
  File "D:\web2py\gluon\html.py", line 2236, in validate
if self.accepts(**kwargs):
  File "D:\web2py\gluon\sqlhtml.py", line 1744, in accepts
self.id_field_name]).update(**fields)
  File "D:\web2py\gluon\packages\dal\pydal\objects.py", line 2054, in update
ret = db._adapter.update("%s" % table._tablename, self.query, fields)
  File "D:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 1031, in 
update
raise e
ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL 
Server]Cannot update identity column 'id'. (8102) (SQLExecDirectW)")

Error snapshot [image: help] 

 

(('42000', "[42000] [Microsoft][ODBC SQL 
Server Driver][SQL Server]Cannot update identity column 'id'. (8102) 
(SQLExecDirectW)")) 

inspect attributes 
Frames 
   
   - 
   
   *File D:\web2py\gluon\restricted.py in restricted at line 227* code 
   arguments variables 
   - 
   
   *File D:\web2py\applications\web_ocms\controllers\amc.py in  at 
   line 49* code arguments variables 
   - 
   
   *File D:\web2py\gluon\globals.py in  at line 417* code arguments 
   variables 
   - 
   
   *File D:\web2py\applications\web_ocms\models\db.py in wrapper at line 
   140* code arguments variables 
   - 
   
   *File D:\web2py\applications\web_ocms\controllers\amc.py in newamcmaster 
   at line 42* code arguments variables 
   - 
   
   *File D:\web2py\gluon\sqlhtml.py in grid at line 2352* code arguments 
   variables 
   - 
   
   *File D:\web2py\gluon\html.py in process at line 2298* code arguments 
   variables 
   - 
   
   *File D:\web2py\gluon\html.py in validate at line 2236* code arguments 
   variables 
   - 
   
   *File D:\web2py\gluon\sqlhtml.py in accepts at line 1744* code arguments 
   variables 
   - 
   
   *File D:\web2py\gluon\packages\dal\pydal\objects.py in update at line 
   2054* code arguments variables 
   - 
   
   *File D:\web2py\gluon\packages\dal\pydal\adapters\base.py in update at 
   line 1031* code arguments variables 
   Function argument list 
   
   (self=, 
   tablename='amc_master', query=, 
   fields=[(, None), (, 'bid'), (, None), 
   (, None), (, None), 
   (, None), (, None), 
   (, None), (, None), 
   (, 3L), (, None), 
   (, None), (, None), 
   (, datetime.datetime(2017, 5, 23, 16, 59, 23)), 
   (, None), (, None), 
   (, None), (, None), 
   (, None), (, None), 
   ...])
   Code listing 
   
   1026.
   1027.
   1028.
   1029.
   1030.
   1031.
   
   1032.
   1033.
   1034.
   1035.
   
   except Exception:
   e = sys.exc_info()[1]
   table = self.db[tablename]
   if hasattr(table,'_on_update_error'):
   return table._on_update_error(table,query,fields,e)
   raise e
   
   try:
   return self.cursor.rowcount
   except:
   return None
   
   Variables 
   e
   
   
   ProgrammingError('42000', "[42000] [Microsoft][O...e identity column 
   'id'. (8102) (SQLExecDirectW)")
   
   
   
   
   

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com

[web2py] Re: web2py grid edit

2015-06-30 Thread Ben Lawrence
Also, if you look in your admin screen there are plug-ins available. One of 
them is plugin_SQLFORM_INLINE


On Tuesday, June 30, 2015 at 10:29:40 AM UTC-7, Alessio Varalta wrote:
>
> Hi, i have a problem. I have a grid form but i want that the user can 
> modify the field without the section edit..So i want load a grid where the 
> user can modify the field and after click on a save button a save all 
> parameters
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py grid edit

2015-06-30 Thread villas
Maybe Tim Richardson's ideas will help from web2pyslices 
...
http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript
http://www.web2pyslices.com/slice/show/1714/jqgrid-viewing-and-updating-data

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[web2py] web2py grid edit

2015-06-30 Thread Alessio Varalta
Hi, i have a problem. I have a grid form but i want that the user can 
modify the field without the section edit..So i want load a grid where the 
user can modify the field and after click on a save button a save all 
parameters

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[web2py] grid edit custom label for fields

2011-12-16 Thread brushek
Hello web2py users ;),

I'm using SQLFORM.grid to create form. I wuold like to change labels
in edit form from fields name to (for example) images. How to this ?

regards

brushek