Odoo Help

0

0
1 Answer
1
Avatar

Akhil P Sivan

--Akhil P Sivan--

4154
| 6 4 9
Kochi, الهند
--Akhil P Sivan--

Odoo Developer

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
4‏/2‏/2017 2:18 ص

Hi,

Try like this:

<record id="pos_restaurant.floor_main" model="restaurant.floor">    
    <field name="name">floor_main</field>
    <field name="background_color">rgb(136,137,242)</field>
    <field name="pos_config_id" eval="ref('point_of_sale.pos_config_main')" />
</record>

I think, the reason could be, there is no record defined with id floor_main in the module pos_restaurant. That record id comes from your custom module. So External ID not found. You should either try like above or try by replacing <field name="floor_id" eval="ref('floor_main')" /> in the table record.

4 Comments
FEDERICO LEONI
4‏/2‏/2017 7:08 ص

Adding 'pos_restaurant' to the id on 'floor_main' did the magic. However, the eval on tables xml must be

eval="ref('pos_restaurant.floor_main')

or you will get the same parse error.

Akhil P Sivan
4‏/2‏/2017 7:09 ص

I am not sure abt the other way, since both records are on same file, it should work without 'pos_restaurant' I thought. Did you try like that?

FEDERICO LEONI
4‏/2‏/2017 7:16 ص

Tried. Without the prefix the script rise the very same error:

ParseError: "<type 'exceptions.ValueError'>: "External ID not found in the system: divina_v10.floor_main" while evaluating

"ref('floor_main')"" while parsing /odoo_test2/odoo_test2-server/addons/divina_v10/data/divina_pos_data.xml:22, near

<record id="table_01" model="restaurant.table">

<field name="name">Mesa 01</field>

<field name="floor_id" eval="ref('floor_main')"/>

<field name="seats">2</field>

<field name="color">rgb(172,109,173)</field>

<field name="shape">square</field>

<field name="width">120</field>

<field name="height">120</field>

<field name="position_h">900</field>

<field name="position_v">5</field>

</record>

Akhil P Sivan
4‏/2‏/2017 7:19 ص

ok fine, good to know :)

Ask a Question
Writer
Keep Informed
1 follower(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now