Prechádzať zdrojové kódy

[FIX] correccion en la vista

Rodney Elpidio Enciso Arias 7 rokov pred
rodič
commit
8d9cb22db6
3 zmenil súbory, kde vykonal 14 pridanie a 13 odobranie
  1. 13 12
      models/audit_log.py
  2. BIN
      models/audit_log.pyc
  3. 1 1
      views/menu.xml

+ 13 - 12
models/audit_log.py

@@ -104,18 +104,19 @@ class AuditLog(models.Model):
 
     @api.one
     def _render_html(self):
-        thead = ''
-        for head in (_('Nombre'), _('Valor Anterior'), _('Nuevo Valor')):
-            thead += '<th>%s</th>' % head
-        thead = '<thead><tr class="oe_list_header_columns">%s</tr></thead>' % thead
-        tbody = ''
-        for line in self._get_content():
-            row = ''
-            for item in line:
-                row += '<td>%s</td>' % item
-            tbody += '<tr>%s</tr>' % row
-        tbody = '<tbody>%s</tbody>' % tbody
-        self.data_html = '<table class="oe_list_content">%s%s</table>' % (thead, tbody)
+        if self.method == 'write':
+            thead = ''
+            for head in (_('Nombre'), _('Valor Anterior'), _('Nuevo Valor')):
+                thead += '<th>%s</th>' % head
+            thead = '<thead><tr class="oe_list_header_columns">%s</tr></thead>' % thead
+            tbody = ''
+            for line in self._get_content():
+                row = ''
+                for item in line:
+                    row += '<td>%s</td>' % item
+                tbody += '<tr>%s</tr>' % row
+            tbody = '<tbody>%s</tbody>' % tbody
+            self.data_html = '<table class="oe_list_content">%s%s</table>' % (thead, tbody)
 
     @api.multi
     def unlink(self):

BIN
models/audit_log.pyc


+ 1 - 1
views/menu.xml

@@ -6,7 +6,7 @@
 
         <menuitem id="submenu_audit" name="Auditoria" sequence="1" parent="menu_audit"/>
 
-        <menuitem id="menu_action_audit_rule_tree" action="action_audit_rule_tree" parent="submenu_audit"/>
+        <menuitem id="menu_action_audit_rule_tree" action="action_audit_rule_tree" parent="submenu_audit" groups="base.group_no_one"/>
 
         <menuitem id="menu_action_audit_log_tree" action="action_audit_log_tree" parent="submenu_audit"/>