Community mailing list archives

Re: one2many tree view

odoo dev
- 10/16/2015 07:53:03
Dear Buket,

Basically we use. 
options="{'no_create': True}"

But you try it with: options="{'no_create': ('state','!=','m')}" 
And make sure 'state' field in tree view.

On Fri, Oct 16, 2015 at 5:13 PM, Buket akın <> wrote:
I have a question. I want to allow to create a record in one2many based in state ..How can i do it ?
my code :

<field name="konfeksiyon_maliyet_ids" attrs="{'readonly': [('state', '!=', 'm')]}>

       <tree editable="bottom" options="{'create':[('state','!=','m')]}">

               <field name="adi" />

               <field name="br_ihtiyac" on_change="on_change_konfeksiyon(br_ihtiyac,br_mal_tl)"/>

              <field name="br_mal_tl" on_change="on_change_konfeksiyon(br_ihtiyac,br_mal_tl)"/>

             <field name="tutar_tl" sum="Toplam TL" />

          <field name="tutar_doviz" sum="Toplam Doviz"/>



options="{'create':[('state','!=','m')]}" is not working

Post to: