Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4628 Visualizzazioni

<field name = "timesheet_ids" context = "{'default_project_id': project_id}">

                   <tree editable = "top" string = "Timesheet Activities" default_order = "desc date" limit = "20">

                            <field name = "date" />

                            <field name = "user_id" invisible = "1" />

                            <field name = "employee_id" required = "1" />

                            <field name = "name" />

                            <field name = "unit_amount" string = "Duration" widget = "float_time" />

                            <field name = "project_id" invisible = "1" />

                        </ Tree>

                    </ Field>


above this code is working for only editable and default_order attribute. I need to use limit attribute but it could not working. Why removed limit attribute in odoo v11.

Avatar
Abbandona
Risposta migliore

Limit attribute for list view in odoo v11 is deprecated. so we cant able to use it anymore. 

Avatar
Abbandona
Risposta migliore

Hello Nidhi,

I tried with xpath and it worked for me.

<xpath expr="//field[@name='timesheet_ids']/tree" position="attributes">
    <attribute name="editable">top</attribute>
    <attribute name="limit">3</attribute>
    <attribute name="default_order">date desc</attribute>
</xpath>

Hope it helps.

Regards,
Mayank Gosai

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 18
8903
0
ott 17
5109
4
ott 17
4522
2
apr 23
10893
1
feb 20
7889