Search This Blog

Sunday 26 May 2013

Importance of space while applying Group Acess on menu item in OpenERP

How to apply more than one groups to menu item on Openerp.

E.g.

Xml file :

<menuitem id="sub_menu_id" parent="main_menu" name="Reports" groups="base.group_hr_manager,user_define_group" />

Here I have given two groups to the Menu item. so this menu only visible to those user who has access of this two groups.


Note :  (Improtance of space).

When you apply more than two groups on specific menu than don't give space between two groups just separate it with comma ','  other wise there will be an error raise No such external ID.

Wrong Ways.

 <menuitem id="sub_menu_id" parent="main_menu" name="Reports" groups="base.group_hr_manager, user_define_group" />



Monday 13 May 2013

HTMl page-break solution for webkit report in OpenERP

HTML page break solution for webkit report in OpenERP


    table {
               page-break-inside:auto
    }


    table tr {
                page-break-inside:avoid; page-break-after:auto;
  }


Eg:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test</title>
<style type="text/css">
    table { page-break-inside:auto }
    tr    { page-break-inside:avoid; page-break-after:auto }
    thead { display:table-header-group }
    tfoot { display:table-footer-group }
</style>
</head>
<body>
    <table>
        <thead>
            <tr><th>heading</th></tr>
        </thead>
        <tfoot>
            <tr><td>notes</td></tr>
        </tfoot>
        <tr>
            <td>x</td>
        </tr>
        <tr>
            <td>x</td>
        </tr>
        <!-- Number ofrows -->
        <tr>
            <td>x</td>
        </tr>
    </tbody>
    </table>
</body>
</html>

 Applied this code in your CSS File or inside the <style> tag.