Odoo Help

0

time.strftime() as value for a search domain ?

By
Yann
on 11/27/14, 7:45 AM 914 views

Hi,

I want to create a record in ir.model.data for a created period. The "code" of the period depends on the current year so i try this code :

<record model="ir.model.data" id="fiscalyear_test">
        <field name="name" eval="str(time.strftime('%Y'))" />        
        <field name="module">account</field>
        <field name="model">account.fiscalyear</field>
        <field name="res_id" model="account.fiscalyear" search="[('code', '=',str(time.strftime('%Y')))]"/>         
        </record>

The search parameter seems not to accept this type of value. Could you help me please ?

 

 

 

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 11/27/14, 7:45 AM
Seen: 914 times
Last updated: 3/16/15, 8:10 AM