Odoo Hilfe

2

2
8 Answers
2
Avatar

Hiral Patel (hip)

--Hiral Patel (hip)--
973
| 2 1 7
Indien
--Hiral Patel (hip)--


Hiral Patel (hip)
06.06.13, 05:20

You have to create a many2one field like:

_columns = {
    'group_public_id': fields.many2one('res.groups', string='Authorized Group'),
}

Here res.groups is a relational table name.

And add this field to the form view in xml file and you can view the Search More.. option.

Ex:

<field name="group_public_id"/>

I have created a demo for you which may help you. Search More is displayed when there are at least 7 records in my.test1.

class my_test1(osv.osv): _name = 'my.test1' _columns = { 'name': fields.char('Test') }

class my_test(osv.osv): _name = 'my.test' _columns = { 'name': fields.char('Test'), 'test_id': fields.many2one('my.test1', string='Test Data'), }

Add following in xml file :

<record id="view_my_test_form" model="ir.ui.view"> <field name="name">my.test.form</field> <field name="model">my.test</field> <field name="arch" type="xml"> <form string="Product Form"> <field name="name"/> <field name="test_id"/> </form> </field> </record>

5 Comments
Jevgeni
06.06.13, 05:39

Thank you for your answer! :) I want to use my own many2one object than 'res.groups'.

e.g. class my_test(osv.osv): _name = 'my.test' _columns = {'name': fields.char('Test')} my_test()

Then how can I add "Search More" to this object? Thanks!

Shelton
06.06.13, 06:16

Have you added search view for that model?

Jevgeni
06.06.13, 06:29

No. Failed several times adding it before. What are the minimum requirements for search view?

Dharmesh Rathod
06.06.13, 08:02

You have to create XML record same as VIEW for SEARH VIEW and assign that ID in "search_view_id" attribute in ACTION.

Jevgeni
06.06.13, 08:41

You, sirs, are my heroes! I did not pay attention to this: "Search More is displayed when there are at least 7 records..."! Funnily enough, I spent 7 hours on this problem and all I had to do was add few more records! :)

0
Avatar

Pawan Kumar Sharma

--Pawan Kumar Sharma--
SunArc Technologies
8488
| 6 2 7
Bikaner, Indien
--Pawan Kumar Sharma--


Pawan Kumar Sharma
21.03.18, 03:23

Hello all,

Is it possible to open "search more" before 7 record. If yes, then from where?

Thanks in advance.

0
David Baramidze
14.08.16, 12:02

I spent 7 hours on this problem and all I had to do was add few more records! <-- This is Answer. Thank you! you saved my 7 hours :))

Fragen Sie
Writer
Keep Informed
0 Verfolger
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now