@@ -85,6 +85,10 @@ if (core.debug) {
|
||||
},
|
||||
get_metadata: function() {
|
||||
var ds = this.dataset;
|
||||
if (!this.view.get_selected_ids().length) {
|
||||
console.warn(_t("No metadata available"));
|
||||
return
|
||||
}
|
||||
ds.call('get_metadata', [this.view.get_selected_ids()]).done(function(result) {
|
||||
new Dialog(this, {
|
||||
title: _.str.sprintf(_t("Metadata (%s)"), ds.model),
|
||||
|
||||
@@ -204,7 +204,9 @@
|
||||
</t>
|
||||
<t t-name="WebClient.DebugDropdown">
|
||||
<t t-if="active_view.type === 'form'">
|
||||
<li class="oe_metadata"><a href="#" data-action="get_metadata">View Metadata</a></li>
|
||||
<t t-if="active_view.controller.get_selected_ids().length == 1">
|
||||
<li class="oe_metadata"><a href="#" data-action="get_metadata">View Metadata</a></li>
|
||||
</t>
|
||||
<li class="oe_layout"><a href="#" data-action="toggle_layout_outline">Toggle Form Layout Outline</a></li>
|
||||
<li class="oe_defaults"><a href="#" data-action="set_defaults">Set Defaults</a></li>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user