Removed reportlab -> 2.0
authorpinky <>
Sun, 7 Jan 2007 21:24:58 +0000 (21:24 +0000)
committerpinky <>
Sun, 7 Jan 2007 21:24:58 +0000 (21:24 +0000)
Better report on timesheets

bzr revid: pinky-417eddbf87182d0afbcd2c887d3acf094c7b9a36

addons/account/report/invoice.rml
addons/board_project/board_project_view.xml
addons/board_sale/board_sale_view.xml
addons/l10n_ch/__terp__.py
addons/l10n_ch/bvr/bvr.rml
addons/report_timesheet/report_timesheet.py
addons/report_timesheet/report_timesheet_view.xml

index 9b639a5..b0003ba 100644 (file)
@@ -36,9 +36,6 @@
     <blockTableStyle id="Tableau3">
       <blockAlignment value="LEFT"/>
       <blockValign value="TOP"/>
-      <blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
-      <blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
-      <blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
     </blockTableStyle>
     <blockTableStyle id="Tableau4">
       <blockAlignment value="LEFT"/>
           <para style="Standard">
             <font color="white"> </font>
           </para>
-          <para style="Standard">Tel. : [[ o.address_invoice_id.phone or '' ]]</para>
+          <para style="Standard">Tél. : [[ o.address_invoice_id.phone or '' ]]</para>
           <para style="Standard">Fax : [[ o.address_invoice_id.fax or '' ]]</para>
-          <para style="Standard">VAT : [[ o.partner_id.vat or '' ]]</para>
+          <para style="Standard">TVA : [[ o.partner_id.vat or '' ]]</para>
         </td>
       </tr>
     </blockTable>
           <para style="P9">Unit Price</para>
         </td>
         <td>
-          <para style="P9">Disc. (%)</para>
+          <para style="P9">Disc.</para>
         </td>
         <td>
-          <para style="P9">Price</para>
+          <para style="P9">Net Price</para>
         </td>
       </tr>
     </blockTable>
             <para style="P12">[[ '%.2f' % l.price_unit ]]</para>
           </td>
           <td>
-            <para style="P12">[[ '%.2f' % (l.discount or 0.0) ]] </para>
+            <para style="P12">[[ '%.3f' % (l.discount or 0.0) ]] </para>
           </td>
           <td>
             <para style="P12">[[ '%.2f' %l.price_subtotal ]] [[o.currency_id.code ]]</para>
           <blockTable colWidths="214.0,95.0" style="Tableau5">
             <tr>
               <td>
-                <para style="P18">Total (excl. taxes):</para>
+                <para style="P18">Subtotal :</para>
               </td>
               <td>
                 <para style="P19">[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</para>
             </tr>
             <tr>
               <td>
-                <para style="P18">Taxes:</para>
+                <para style="P18">Taxes :</para>
               </td>
               <td>
                 <para style="P19">[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</para>
             </tr>
             <tr>
               <td>
-                <para style="P20">Total <font face="Times-Roman">(incl. taxes):</font></para>
+                <para style="P20">Total :</para>
               </td>
               <td>
                 <para style="P21">[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</para>
index a73f46d..7804c87 100644 (file)
@@ -26,7 +26,7 @@
                        <field name="name">My open tasks</field>
                        <field name="res_model">project.task</field>
                        <field name="view_type">form</field>
-                       <field name="view_mode">tree,graph</field>
+                       <field name="view_mode">tree,form</field>
                        <field name="domain">[('user_id','=',uid),('state','=','open')]</field>
                        <field name="view_id" ref="view_task_tree" />
                </record>
@@ -34,7 +34,7 @@
                        <field name="name">My task's deadlines</field>
                        <field name="res_model">project.task</field>
                        <field name="view_type">form</field>
-                       <field name="view_mode">tree,graph</field>
+                       <field name="view_mode">tree,form</field>
                        <field name="domain">[('user_id','=',uid),('state','=','open'),('date_deadline','&lt;&gt;',False)]</field>
                        <field name="view_id" ref="view_task_tree" />
                </record>
index b2b7834..511568e 100644 (file)
                        sequence="1"
                        id="menu_board_sales_manager"/>
 
-               //
-               // Administrator shortcut
-               // Demo user startup menu
-               //
-               <record model="ir.ui.view_sc" id="sc_sale_dash">
-                       <field name="name">Sales dashboard</field>
-                       <field name="user_id" ref="base.user_admin"/>
-                       <field name="resource">ir.ui.menu</field>
-                       <field name="sequence">1</field>
-                       <field name="res_id" ref="menu_board_sales_manager"/>
-               </record>
-               <record model="res.users" id="base.user_demo">
-                       <field name="action_id" ref="open_board_sales_manager"/>
-               </record>
-
        </data>
 </terp>
index 4ae117b..65c2ed5 100755 (executable)
@@ -15,6 +15,7 @@
                "dta/dta_view.xml","dta/dta_wizard.xml",
                "v11/v11_wizard.xml","v11/v11_view.xml",
                "account_vat.xml","base_config.xml","account_config.xml",
+               "bvr/bvr_report.xml",
                "company_view.xml"
        ],
        "active": False,
index 0dd6d27..ee59715 100644 (file)
@@ -2,8 +2,8 @@
 <document filename="test.pdf">
   <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
     <pageTemplate id="first">
-      <frame id="Frame1" x1="33.0" y1="32" width="527.0" height="210.0"/>
       <frame id="first" x1="34.0" y1="28.0" width="527" height="706"/>
+      <frame id="Frame1" x1="33.0" y1="32" width="527.0" height="210.0"/>
     </pageTemplate>
   </template>
   <stylesheet>
index 1216726..7def167 100644 (file)
@@ -65,10 +65,10 @@ class report_timesheet_account(osv.osv):
        _columns = {
                'name': fields.date('Month', readonly=True),
                'user_id':fields.many2one('res.users', 'User', readonly=True, relate=True),
-               'account_id':fields.many2one('account.analytic.account', 'User', readonly=True, relate=True),
+               'account_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, relate=True),
                'quantity': fields.float('Quantity', readonly=True),
        }
-       _order = 'name desc,user_id desc'
+       _order = 'name desc,account_id desc,user_id desc'
        def init(self, cr):
                cr.execute("""
                        create or replace view report_timesheet_account as (
index e4dbb57..e0f433d 100644 (file)
@@ -62,7 +62,7 @@
                <field name="name">report_timesheet.user.tree.all</field>
                <field name="res_model">report_timesheet.user</field>
                <field name="view_type">form</field>
-               <field name="view_mode">tree,graph</field>
+               <field name="view_mode">graph,tree</field>
        </record>
        <menuitem 
                name="Human Resources/Reporting/All Months/Timesheet by user"
                <field name="name">report_timesheet.invoice.tree.all</field>
                <field name="res_model">report_timesheet.invoice</field>
                <field name="view_type">form</field>
-               <field name="view_mode">tree,graph</field>
+               <field name="view_mode">graph,tree</field>
        </record>
        <menuitem 
                name="Human Resources/Reporting/All Months/Timesheet by invoice"
                <field name="name">report_timesheet.invoice.tree</field>
                <field name="res_model">report_timesheet.invoice</field>
                <field name="view_type">form</field>
-               <field name="view_mode">tree,graph</field>
+               <field name="view_mode">graph,tree</field>
                <field name="domain">[('manager_id','=',uid)]</field>
        </record>
        <menuitem 
                action="action_timesheet_invoice_stat_my"
                id="menu_report_timesheet_invoice_my"/>
 
+       #
+       # Statistics report on timesheets per account
+       #
+
+       <record model="ir.ui.view" id="view_timesheet_account_tree">
+               <field name="name">report_timesheet.account.tree</field>
+               <field name="model">report_timesheet.account</field>
+               <field name="type">tree</field>
+               <field name="arch" type="xml">
+                       <tree string="Timesheet per account">
+                               <field name="name"/>
+                               <field name="account_id"/>
+                               <field name="user_id"/>
+                               <field name="quantity"/>
+                       </tree>
+               </field>
+       </record>
+       <record model="ir.ui.view" id="view_timesheet_account_graph">
+               <field name="name">report_timesheet.account.graph</field>
+               <field name="model">report_timesheet.account</field>
+               <field name="type">graph</field>
+               <field name="arch" type="xml">
+                       <graph string="Timesheet per account">
+                               <field name="account_id" group="True"/>
+                               <field name="quantity" operator="+"/>
+                       </graph>
+               </field>
+       </record>
+
+
+
+       <record model="ir.ui.view" id="view_timesheet_account_form">
+               <field name="name">report_timesheet.timesheet.account.form</field>
+               <field name="model">report_timesheet.account</field>
+               <field name="type">form</field>
+               <field name="arch" type="xml">
+                       <form string="Timesheet by account">
+                               <field name="name" select="1"/>
+                               <field name="account_id" select="1"/>
+                               <field name="user_id" select="1"/>
+                               <field name="quantity"/>
+                       </form>
+               </field>
+       </record>
+
+       <record model="ir.actions.act_window" id="action_timesheet_account_stat_all">
+               <field name="name">report_timesheet.account.tree.all</field>
+               <field name="res_model">report_timesheet.account</field>
+               <field name="view_type">form</field>
+               <field name="view_mode">graph,tree</field>
+       </record>
+       <menuitem 
+               name="Human Resources/Reporting/All Months/Timesheet by account"
+               action="action_timesheet_account_stat_all"
+               id="menu_report_timesheet_account_all"/>
+
+       <record model="ir.actions.act_window" id="action_timesheet_account_stat_my">
+               <field name="name">report_timesheet.account.tree</field>
+               <field name="res_model">report_timesheet.account</field>
+               <field name="view_type">form</field>
+               <field name="view_mode">graph,tree</field>
+               <field name="domain">[('user_id','=',uid)]</field>
+       </record>
+       <menuitem 
+               name="Human Resources/Reporting/This Month/My timesheets by account"
+               action="action_timesheet_account_stat_my"
+               id="menu_report_timesheet_account_my"/>
+
+
 </data>
 </terp>