Odoo Help


Where is external_id when I create a new favorite filter?

Pascal Tremblay
on 1/14/15, 9:01 AM 1,636 views

Hello guys!

When I create a new favorite filter in this view :

A new record is created in the table ir.filters.

But no external identifier for this new favorite filter. I was sure that there is an external identifier for almost all in Odoo. But no external identifier for custom filters (favorites)?


Note :

To modify this filter via a xml file, I can't put id with external identifier. May be the id could be written in INTEGER...

        <record id="163" model="ir_filters">
            <field name="is_default">1</field>


Pascal Tremblay

--Pascal Tremblay--
| 5 2 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 1/14/15, 10:09 AM

I have used this code in my module. It creates a new record in ir.filters. This new filter appear in the « favorite » section and is selected by default.

<?xml version="1.0" encoding="UTF-8"?>

        <record id="report_lapagept.filtre_lapagept" model="ir.filters">
            <field name="name">lapagept</field>
            <field name="model_id">ir.module.module</field>
            <field name="domain">['|', '|', ['summary', 'ilike', 'lapagept'], ['shortdesc', 'ilike', 'lapagept'], ['name', 'ilike', 'lapagept']]</field>
            <field name="context">{}</field>
            <field name="is_default">1</field>
            <field name="user_id" eval="False"/>
            <field name="action_id" type="int">37</field>





| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 1/14/15, 9:10 AM

external ids are only present if record is created via import or module install... 
if you create record trough gui it does not have external id.. 
But if you need external id of that record, you need to export it to csv file firs, then you can use assigned id from csv file
(usualy in form : __export__.model_name_XX where xx is db id, but not always.., if you export o2m or m2m fields, external ids can be in form : __export__.module_name_XX_YY where XX is db id, and YY is instance  in this case, just remove _YY part and use it as external id) 

but recomended way is to create such record in xml ( and assign external id respectivly) then remove record manualy created and upgrade/install module to re-create it with propper external id

very interesting. I will do test.

Pascal Tremblay
on 1/14/15, 9:11 AM


Pascal Tremblay
on 1/14/15, 9:11 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


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

1 follower(s)


Asked: 1/14/15, 9:01 AM
Seen: 1636 times
Last updated: 3/16/15, 8:10 AM