Skip to Content
Menu
This question has been flagged
1 Reply
3684 Views

Try to filter:
user.company_id.id
XML Code:

    <record id='fleet_position_action' model='ir.actions.act_window'>
        <field name="name">Histoy Map</field>
        <field name="res_model">gpsmap.positions</field>
        <field name="domain">[('deviceid.company_id.id','=','user.company_id.id')]</field>
    </record>


Error code:

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3845, in _search
    self._cr.execute(query_str, where_clause_params)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.DataError: invalid input syntax for integer: "user.company_id.id"
LINE 1: ...id FROM "res_company" WHERE ("res_company"."id" = 'user.comp...

Avatar
Discard
Best Answer

Hello Eduardo


Please try this <field name="domain">[('deviceid.company_id','=',user.company_id.id)]</field> instead of <field name="domain">[('deviceid.company_id.id','=','user.company_id.id')]</field>

Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 24
6648
1
Jul 18
8632
2
Sep 23
4399
2
Dec 22
2552
1
Dec 21
2992