Select first record when refreshing attachment preview
Since ab82d479eca1 no record is set when displaying screen. Closes #12756 (grafted from e40c63e467b0f878b54594729c7e07458f12ad71) --HG-- branch : 7.0
This commit is contained in:
+7
-1
@@ -1309,7 +1309,13 @@
|
||||
if (!Sao.common.compare(this.attachment_screen.domain, domain) ||
|
||||
force) {
|
||||
this.attachment_screen.domain = domain;
|
||||
this.attachment_screen.search_filter();
|
||||
this.attachment_screen.search_filter().then(() => {
|
||||
const group = this.attachment_screen.group;
|
||||
if (group.length) {
|
||||
this.attachment_screen.current_record = group[0];
|
||||
this.attachment_screen.display();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
note: function() {
|
||||
|
||||
@@ -240,6 +240,10 @@ class Form(TabContent):
|
||||
if self.attachment_screen.domain != domain or force:
|
||||
self.attachment_screen.domain = domain
|
||||
self.attachment_screen.search_filter()
|
||||
group = self.attachment_screen.group
|
||||
if group:
|
||||
self.attachment_screen.current_record = group[0]
|
||||
self.attachment_screen.display()
|
||||
|
||||
def sig_note(self, widget=None):
|
||||
record = self.screen.current_record
|
||||
|
||||
Reference in New Issue
Block a user