Community mailing list archives

community@mail.odoo.com

Re: one2many tree view

by
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 <buketakinn@gmail.com> wrote:
hi,
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"/>

     </tree>

</field>



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

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe