Skip to Content
Menu
This question has been flagged
4 Replies
3782 Views

Hi,


I try to create relations between 2 models: crm.lead and hr.job by odoo9 GUI

When i try to create any one2many field in and model i always have errors :/


So,

First i create many2one field: Enter a new picture link here...

and everything is ok, field created.


Next i create one2many field: Enter a new picture link here...

and when i try save the model i have an error:


Odoo Server Error Traceback (most recent call last):
  File "/odoo/odoo-server/openerp/http.py", line 647, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/openerp/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/odoo/odoo-server/openerp/http.py", line 320, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/odoo/odoo-server/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/odoo/odoo-server/openerp/http.py", line 313, in checked_call
    result = self.endpoint(*a, **kw)
  File "/odoo/odoo-server/openerp/http.py", line 963, in __call__
    return self.method(*args, **kw)
  File "/odoo/odoo-server/openerp/http.py", line 513, in response_wrap
    response = f(*args, **kw)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 897, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 889, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/odoo/odoo-server/openerp/addons/base/ir/ir_model.py", line 171, in write
    return super(ir_model,self).write(cr, user, ids, vals, context)
  File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/odoo/odoo-server/openerp/api.py", line 381, in old_api
    result = method(recs, *args, **kwargs)
  File "/odoo/odoo-server/openerp/models.py", line 3837, in write
    self._write(old_vals)
  File "/odoo/odoo-server/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/odoo/odoo-server/openerp/api.py", line 574, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
  File "/odoo/odoo-server/openerp/models.py", line 3995, in _write
    result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
  File "/odoo/odoo-server/openerp/osv/fields.py", line 825, in set
    id_new = obj.create(cr, user, act[2], context=context)
  File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/odoo/odoo-server/openerp/addons/base/ir/ir_model.py", line 473, in create
    if not self.search(cr, user, [('model_id','=',vals['relation']), ('name','=',vals['relation_field']), ('ttype','=','many2one')]):
  File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/odoo/odoo-server/openerp/api.py", line 354, in old_api
    result = method(recs, *args, **kwargs)
  File "/odoo/custom/addons/mass_editing/models/ir_model_fields.py", line 18, in search
    map(int, domain[2][1:-1].split(',')))]
ValueError: invalid literal for int() with base 10: 'rm.lea'


How to fix this ? 


Thank,

LukaszK

Avatar
Discard

Please use a serious website to make your pictures available. This is truly annoying and embarassing.

I have removed your links. Please edit your post and add serious links.

Author

@Ermin Trevisan what's wrong with previous links? I add direct link to images.

Unfortunately i can't edit my post i have 403 error.

New link:

many2one:

http://img4.imagetitan.com/img4/0s7W4ftAYt2qgDw/15/15_many2one_crm.lead.png

one2many:

http://img4.imagetitan.com/img4/0s7W4ftAYt2qgDw/15/15_one2manyfield.png

This links are ok ?

Author Best Answer

I find the answer.

All this problem with create one2many relations caused mass editing plugin (https://www.odoo.com/apps/modules/9.0/mass_editing/)


When i delete it, everything go back to normal :)

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 17
3393
0
Apr 16
2154
0
Nov 18
4703
3
Jul 17
2837
0
Nov 16
2858