Skip to content

Instantly share code, notes, and snippets.

@nbessi
nbessi / gist:5643542
Created May 24, 2013 13:34
You can use ir.values in OpenERP to force an action on a hierarchical tree view when you click on a row
<!-- Opening task when double clicking on project -->
<record id="dblc_proj" model="ir.actions.act_window">
<field name="res_model">project.task</field>
<field name="name">Project's tasks</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph,gantt,kanban</field>
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
<field name="context">{'project_id':active_id, 'active_test':False}</field>
</record>
@nbessi
nbessi / toggle_menu.js
Created June 30, 2015 12:43
Toggle left panel in Odoo 8 and add a widget button in menubar
openerp.web.Menu.include({
/**
* Enable left menu to be toggled
*/
show_nav_bar: function() {
@nbessi
nbessi / template_org.el
Created April 7, 2016 11:58
org-mode latex syling
(require 'ox-latex)
(unless (boundp 'org-latex-classes)
(setq org-latex-classes nil))
(add-to-list 'org-latex-classes
'("doc_vaud"
"\\documentclass[french,fleqn,10pt,hidelinks]{article}
\\usepackage[utf8]{inputenc}
\\usepackage{titling}
\\usepackage{babel}