OpenERP how to set the tree view limit

1535 ワード

return {

            'name':u' ',

            'view_type':'form',

            'view_mode':'tree,form',

            'res_model':'rainsoft.account.stock.line',

            'type':'ir.actions.act_window',

            'context':{

                'location': location.id,

                'date_start':period.date_start,

                'date_stop':period.date_stop,

                'period':period.id,

            },

	    'limit':10000,


add limit:10000 to your actioon which render the tree view.
or in xml file:
 <record id="action_rainsoft_account_stock" model="ir.actions.act_window">

            <field name="name">Account Stock Query</field>

            <field name="res_model">rainsoft.account.stock</field>

            <field name="type">ir.actions.act_window</field>

            <field name="view_type">form</field>

            <field name="view_mode">tree,form</field>

            <field name="view_id" ref="rainsoft_account_stock_form_view"/>

            <field name="context">{}</field>

            <field name="target">new</field>

            <field name="limit">10000</field>

        </record>