[web2py] Re: SQLFORM.grid field.represent not working with joined tables

2017-02-20 Thread Paul Ellis
I still don't know what caused this. There was obviously something missing 
in the grid. I have come back to the problem after working around it with 
js and can't replicate the issue. It is now working.

-- 
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: SQLFORM.grid field.represent not working with joined tables

2017-02-15 Thread Paul Ellis
Here is the 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.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.

Traceback (most recent call last):
  File "E:\web2py\gluon\restricted.py", line 227, in restricted
exec ccode in environment
  File "E:\web2py\applications\OfferTool\views\offer/test.html", line 79, in 

  File "E:\web2py\gluon\globals.py", line 430, in write
self.body.write(xmlescape(data))
  File "E:\web2py\gluon\html.py", line 131, in xmlescape
return data.xml()
  File "E:\web2py\gluon\html.py", line 963, in xml
(fa, co) = self._xml()
  File "E:\web2py\gluon\html.py", line 955, in _xml
self.components])
  File "E:\web2py\gluon\html.py", line 131, in xmlescape
return data.xml()
  File "E:\web2py\gluon\html.py", line 963, in xml
(fa, co) = self._xml()
  File "E:\web2py\gluon\html.py", line 955, in _xml
self.components])
  File "E:\web2py\gluon\html.py", line 131, in xmlescape
return data.xml()
  File "E:\web2py\gluon\html.py", line 963, in xml
(fa, co) = self._xml()
  File "E:\web2py\gluon\html.py", line 955, in _xml
self.components])
  File "E:\web2py\gluon\html.py", line 131, in xmlescape
return data.xml()
  File "E:\web2py\gluon\html.py", line 963, in xml
(fa, co) = self._xml()
  File "E:\web2py\gluon\html.py", line 955, in _xml
self.components])
  File "E:\web2py\gluon\html.py", line 131, in xmlescape
return data.xml()
  File "E:\web2py\gluon\html.py", line 963, in xml
(fa, co) = self._xml()
  File "E:\web2py\gluon\html.py", line 955, in _xml
self.components])
  File "E:\web2py\gluon\html.py", line 131, in xmlescape
return data.xml()
  File "E:\web2py\gluon\packages\dal\pydal\objects.py", line 2344, in xml
rv = self.db.represent('rows_xml', self)
  File "E:\web2py\gluon\packages\dal\pydal\base.py", line 1076, in represent
return self.representers[name](*args, **kwargs)
  File "E:\web2py\gluon\sqlhtml.py", line 3329, in __init__
r = represent(field, r, record)
  File "E:\web2py\gluon\sqlhtml.py", line 70, in represent
return f(value, record)
  File "E:/web2py/applications/OfferTool/controllers/offer.py" 
, line 331, in 

_id=row.product.id)
  File "E:\web2py\gluon\packages\dal\pydal\objects.py", line 90, in __getattr__
raise AttributeError
AttributeError


And I should point out that if I do something like 'row.id' which should 
cause an Attribute Error I get a much shorter Traceback.

-- 
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.