Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4102 Widoki

Hi All

I am receiving this error on when trying to create an invoice or preview the invoice in developer mode. I added a single field via Database Structure | Fields. It's a simple text field for an additional comment. Please guide me as I am still learning this side of Odoo: Thanks!



Odoo Server Error

Traceback (most recent call last):

File "/opt/odoo/openerp/http.py", line 530, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/opt/odoo/openerp/http.py", line 567, in dispatch

result = self._call_function(**self.params)

File "/opt/odoo/openerp/http.py", line 303, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/opt/odoo/openerp/service/model.py", line 113, in wrapper

return f(dbname, *args, **kwargs)

File "/opt/odoo/openerp/http.py", line 300, in checked_call

return self.endpoint(*a, **kw)

File "/opt/odoo/openerp/http.py", line 796, in __call__

return self.method(*args, **kw)

File "/opt/odoo/openerp/http.py", line 396, in response_wrap

response = f(*args, **kw)

File "/opt/odoo/addons/web/controllers/main.py", line 949, in call_kw

return self._call_kw(model, method, args, kwargs)

File "/opt/odoo/addons/web/controllers/main.py", line 941, in _call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/api.py", line 336, in old_api

result = method(recs, *args, **kwargs)

File "/opt/odoo/openerp/models.py", line 1321, in default_get

defaults[name] = field.default(self)

File "/opt/odoo/openerp/fields.py", line 378, in <lambda>

func(recs), recs, validate=False,

File "/opt/odoo/openerp/fields.py", line 374, in <lambda>

func = lambda recs: value(recs._model, recs._cr, recs._uid, recs._context)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/api.py", line 336, in old_api

result = method(recs, *args, **kwargs)

File "/opt/odoo/openerp/fields.py", line 362, in <lambda>

lambda recs: self.convert_to_write(value(recs))

File "/opt/odoo/openerp/fields.py", line 1480, in convert_to_write

return value.id

AttributeError: 'int' object has no attribute 'id'

Awatar
Odrzuć
Autor Najlepsza odpowiedź

If anyone else needs the answer, i found that after adding the field to my model I needed to restart the server

Awatar
Odrzuć
Najlepsza odpowiedź

Hello Dale,
a little bit more detail would help. 

Have you added the Field to the Invoice Object itself?
Do you get the error when you create an Invoice or when you try to print it? 
Have you changed the Report? if so, post your customization.
 
regards,
Sven



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lut 25
1146
0
sty 25
981
1
gru 24
1278
1
cze 22
5243
1
lut 19
4833