@@ -512,7 +512,18 @@ def _get_domain(self, cr, uid, ids, field_name, arg, context=None):
512
512
513
513
_columns = {
514
514
'branch_id' : fields .many2one ('runbot.branch' , 'Branch' , required = True , ondelete = 'cascade' , select = 1 ),
515
- 'repo_id' : fields .related ('branch_id' , 'repo_id' , type = "many2one" , relation = "runbot.repo" , string = "Repository" , readonly = True , store = True , ondelete = 'cascade' , select = 1 ),
515
+ 'repo_id' : fields .related (
516
+ 'branch_id' , 'repo_id' , type = "many2one" , relation = "runbot.repo" ,
517
+ string = "Repository" , readonly = True , ondelete = 'cascade' , select = 1 ,
518
+ store = {
519
+ 'runbot.build' : (lambda s , c , u , ids , ctx : ids , ['branch_id' ], 20 ),
520
+ 'runbot.branch' : (
521
+ lambda self , cr , uid , ids , ctx : self .pool ['runbot.build' ].search (
522
+ cr , uid , [('branch_id' , 'in' , ids )]),
523
+ ['repo_id' ],
524
+ 10 ,
525
+ ),
526
+ }),
516
527
'name' : fields .char ('Revno' , required = True , select = 1 ),
517
528
'host' : fields .char ('Host' ),
518
529
'port' : fields .integer ('Port' ),
0 commit comments