Skip to Content
Menu
This question has been flagged
1 Reply
3091 Views

I'm creating buttons in a m2o table to open the full detail form for a record in the current window rather than a popup (with attachments and such).

I would like to have the ability to scroll through all records of the domain with the usual "<" and ">" buttons, but it only displays 1/1 if I go straight to the form.

If I switch the "views" to have 'tree' and then click on one of them it works, it will show (e.g 1/7 and allow < > to go through found records). Is there a way to have it work that way going straight to the form view?

@api.multi
def open_task(self):
    return {
        'type': 'ir.actions.act_window',
        'name': 'Open Task',
        'views': [[False, 'form'], [False, 'tree']],
        'res_model': 'project.task',
        'res_id': self.id,
        'target': 'current',
        'domain': [('site_id','=',self.site_id.id)],
    }

Avatar
Discard

Hello,
I also have the same problem. I want to go directly to a form view and navigate with the < and > arrows. Did you solve the problem? I am desperately looking ... Thank you. Here is the link of my post -> https://www.odoo.com/fr_FR/forum/aide-1/odoo-return-record-lists-on-form-view-216914

Best Answer

Interesting but unfortunately there is no way :(
for the normal case, I mean a switch from list to form a view client has all records Id and you can iterate by from view even it has also limitation if a database has 2000 record but by default list only load 80 records so can only iterate 80 record using next previous button .

Avatar
Discard
Author

I see your point, but pointing to the treeview in the example above does show all results for that domain in my test case 7 tasks out of thousands in the db. (7 that were at the specific site I'm linking from) why wouldn't the formview act just like the one I get from clicking on one of the rows in the treeview? and more importantly, is there a way to make it act that way? perhaps an action I can come up with on event?

Related Posts Replies Views Activity
3
Apr 24
3739
5
Oct 22
12123
4
Mar 24
12643
2
Sep 23
4408
1
Dec 21
2993