Odoo Help

1

fields.selection not run

By
Joaquin
on 6/6/13, 3:54 PM 1,813 views

I have a definition in my custom module:
'colFechaLlegada':fields.selection(_get_alfabet,'Fecha de Llegada', size=3, readonly=False),

And i have the defiition of funcion:
def _get_alfabet(self, cr, uid, context=None):
cCols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numero = 25
return [(str(r+1), cCols[r:r+1]) for r in range(numero+1)]

I upgrade my module and i have this error:

OpenERP-Client Version : 6.1.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "c:\Work\OE7\Server\server.\openerp\wsgi\core.py", line 79, in xmlrpc_return
File "c:\Work\OE7\Server\server.\openerp\netsvc.py", line 360, in dispatch_rpc
File "c:\Work\OE7\Server\server.\openerp\service\web_services.py", line 586, in dispatch
File "c:\Work\OE7\Server\server.\openerp\osv\osv.py", line 129, in wrapper
File "c:\Work\OE7\Server\server.\openerp\osv\osv.py", line 195, in execute
File "c:\Work\OE7\Server\server.\openerp\osv\osv.py", line 183, in execute_cr
File "c:\Work\OE7\Server\server.\openerp\osv\orm.py", line 2153, in fields_view_get
File "c:\Work\OE7\Server\server.\openerp\osv\orm.py", line 1793, in __view_look_dom_arch
File "c:\Work\OE7\Server\server.\openerp\osv\orm.py", line 1742, in __view_look_dom
File "c:\Work\OE7\Server\server.\openerp\osv\orm.py", line 1742, in __view_look_dom File "c:\Work\OE7\Server\server.\openerp\osv\orm.py", line 1742, in __view_look_dom File "c:\Work\OE7\Server\server.\openerp\osv\orm.py", line 1684, in __view_look_dom AttributeError: 'NoneType' object has no attribute '_name_search'

Any can i help me please?

Solved the problem. There was an error in: colspan="1" widget="selection" name="colFechaLlegada" context="{'colFechaLlegada': <field self}"/> The Widget was wrong, and should look like: colspan="1" widget="colFechaLlegada" name="colFechaLlegada" context="{'colFechaLlegada': <field self}"/> Thanks for the help and collaboration.

Joaquin
on 6/7/13, 7:57 AM
0
Joaquin
On 6/6/13, 4:35 PM

Hello.
Thanks for the reply.
That error comes always in the GTK.
Only upgrade my module.
It is an error in the function or access or the time to declare the SELECTED. If I replace the one FIELD.CHAR FIELD.SELECTEDpor, no problem since no functions are called. I'm in a SERVER OpenERP 6.1, and client is 6.1.1 GTK

0
patrick
On 6/6/13, 4:09 PM

In your stacktrace I see 6.1.1 and 7.0. So it looks like there is a mix up, either because of an upgrade by you, or somehow upstream (the Bazaar location, given the line: Last revision No. & ID :Bazaar Package not Found !)

Did you do an upgrade of OpenERP, or just your module?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 6/6/13, 3:54 PM
Seen: 1813 times
Last updated: 11/8/16, 11:28 PM