[FIX] fixing report headers
authorFabien Pinckaers <fp@tinyerp.com>
Tue, 24 Aug 2010 12:37:11 +0000 (14:37 +0200)
committerFabien Pinckaers <fp@tinyerp.com>
Tue, 24 Aug 2010 12:37:11 +0000 (14:37 +0200)
bzr revid: fp@tinyerp.com-20100824123711-wp7hwd89yeqgpjaa

20 files changed:
addons/account/project/report/analytic_balance.py
addons/account/project/report/analytic_check.py
addons/account/project/report/analytic_journal.py
addons/account/project/report/cost_ledger.py
addons/account/project/report/inverted_analytic_balance.py
addons/account/project/report/quantity_cost_ledger.py
addons/account/report/account_aged_partner_balance.py
addons/account/report/account_balance.py
addons/account/report/account_balance_landscape.py
addons/account/report/account_balance_sheet.py
addons/account/report/account_general_ledger.py
addons/account/report/account_profit_loss.py
addons/account/report/account_tax_code.py
addons/account/report/compare_account_balance.py
addons/account/report/rml_parse.py
addons/account/report/tax_report.py
addons/account/report/voucher_print.py
addons/purchase_requisition/purchase_requisition.py
addons/purchase_requisition/purchase_requisition_view.xml
addons/sale/report/sale_order.py

index 8815369..2de6ada 100644 (file)
@@ -154,7 +154,7 @@ class account_analytic_balance(report_sxw.rml_parse):
 
 report_sxw.report_sxw('report.account.analytic.account.balance',
         'account.analytic.account', 'addons/account/project/report/analytic_balance.rml',
-        parser=account_analytic_balance, header=False)
+        parser=account_analytic_balance, header="internal")
 
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 3075a78..a35f2ec 100644 (file)
@@ -95,6 +95,6 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
     def _delta_cred(self, date1, date2):
         return (self._gen_cred(date1,date2)-self._ana_cred(date1,date2))
 
-report_sxw.report_sxw('report.account.analytic.account.analytic.check', 'account.analytic.account', 'addons/account/project/report/analytic_check.rml',parser=account_analytic_analytic_check, header=False)
+report_sxw.report_sxw('report.account.analytic.account.analytic.check', 'account.analytic.account', 'addons/account/project/report/analytic_check.rml',parser=account_analytic_analytic_check, header="internal")
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index e3da763..88d5610 100644 (file)
@@ -57,7 +57,7 @@ class account_analytic_journal(report_sxw.rml_parse):
         res = self.cr.dictfetchone()
         return res['sum'] or 0
 
-report_sxw.report_sxw('report.account.analytic.journal', 'account.analytic.journal', 'addons/account/project/report/analytic_journal.rml',parser=account_analytic_journal,header=False)
+report_sxw.report_sxw('report.account.analytic.journal', 'account.analytic.journal', 'addons/account/project/report/analytic_journal.rml',parser=account_analytic_journal,header="internal")
 
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 4317831..c711eeb 100644 (file)
@@ -108,7 +108,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
         credit = self._sum_credit(accounts, date1, date2) or 0.0
         return (debit-credit)
 
-report_sxw.report_sxw('report.account.analytic.account.cost_ledger', 'account.analytic.account', 'addons/account/project/report/cost_ledger.rml',parser=account_analytic_cost_ledger, header=False)
+report_sxw.report_sxw('report.account.analytic.account.cost_ledger', 'account.analytic.account', 'addons/account/project/report/cost_ledger.rml',parser=account_analytic_cost_ledger, header="internal")
 
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index f313a9c..6ba8e72 100644 (file)
@@ -120,7 +120,7 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
                 WHERE account_id IN %s AND date>=%s AND date<=%s", (tuple(ids),date1, date2,))
         return self.cr.fetchone()[0] or 0.0
 
-report_sxw.report_sxw('report.account.analytic.account.inverted.balance', 'account.analytic.account', 'addons/account/project/report/inverted_analytic_balance.rml',parser=account_inverted_analytic_balance, header=False)
+report_sxw.report_sxw('report.account.analytic.account.inverted.balance', 'account.analytic.account', 'addons/account/project/report/inverted_analytic_balance.rml',parser=account_inverted_analytic_balance, header="internal")
 
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 37b0982..c593d05 100644 (file)
@@ -120,6 +120,6 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
 report_sxw.report_sxw('report.account.analytic.account.quantity_cost_ledger',
         'account.analytic.account',
         'addons/account/project/report/quantity_cost_ledger.rml',
-        parser=account_analytic_quantity_cost_ledger, header=False)
+        parser=account_analytic_quantity_cost_ledger, header="internal")
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 8e07f3a..1883f48 100644 (file)
@@ -216,7 +216,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
                return ''
 
 report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
-               'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header=False)
+               'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header="internal landscape")
 
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 512da18..d688741 100644 (file)
@@ -119,6 +119,6 @@ class account_balance(report_sxw.rml_parse, common_report_header):
                 result_acc.append(res)
         return result_acc
 
-report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="external")
+report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index e8b8502..04f7cc8 100644 (file)
@@ -395,6 +395,6 @@ class account_balance_landscape(rml_parse.rml_parse):
     def total_cr(self):
         return self.cr_total
 
-report_sxw.report_sxw('report.account.account.balance.landscape', 'account.account', 'addons/account/report/account_balance_landscape.rml', parser=account_balance_landscape, header=False)
+report_sxw.report_sxw('report.account.account.balance.landscape', 'account.account', 'addons/account/report/account_balance_landscape.rml', parser=account_balance_landscape, header="internal landscape")
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
 
index e76c845..084a7de 100644 (file)
@@ -196,10 +196,10 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
 
 report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',
     'addons/account/report/account_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
-    header='internal')
+    header='internal landscape')
 
 report_sxw.report_sxw('report.account.balancesheet', 'account.account',
     'addons/account/report/account_balance_sheet.rml',parser=report_balancesheet_horizontal,
     header='internal')
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 2c4bad0..2cf9a48 100644 (file)
@@ -240,6 +240,6 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
         return 'Date'
 
 report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal')
-report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal')
+report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal landscape')
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index c1c74a1..a7c732c 100644 (file)
@@ -170,9 +170,9 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
         return self.result.get(group, [])
 
 report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',
-    'addons/account/report/account_profit_horizontal.rml',parser=report_pl_account_horizontal, header='internal')
+    'addons/account/report/account_profit_horizontal.rml',parser=report_pl_account_horizontal, header='internal landscape')
 
 report_sxw.report_sxw('report.pl.account', 'account.account',
     'addons/account/report/account_profit_loss.rml',parser=report_pl_account_horizontal, header='internal')
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 9a72c83..2f123fd 100644 (file)
@@ -63,6 +63,6 @@ class account_tax_code_report(rml_parse.rml_parse):
                        .browse(self.cr, self.uid, line_ids))
 
 report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code',
-    'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header=False)
+    'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header="internal")
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index b29b2ea..b3b4231 100644 (file)
@@ -392,6 +392,6 @@ class account_balance(report_sxw.rml_parse):
     def total_cr(self):
         return self.cr_total
 
-report_sxw.report_sxw('report.account.balance.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=False)
+report_sxw.report_sxw('report.account.balance.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
 
index 2c1f4a6..cc8299b 100644 (file)
@@ -150,15 +150,3 @@ class rml_parse(report_sxw.rml_parse):
         else:
             return Stringer
 
-    def _add_header(self, node, header=1):
-        if header==2:
-            print 'header 2'
-            rml_head =  self.rml_header2
-        else:
-            print 'header 3'
-            rml_head =  self.rml_header2
-        rml_head =  rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
-        return True
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 5e5f68a..15607a7 100644 (file)
@@ -217,6 +217,6 @@ class tax_report(rml_parse.rml_parse):
 
 
 report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code',
-       'addons/account/report/tax_report.rml', parser=tax_report, header=True)
+       'addons/account/report/tax_report.rml', parser=tax_report, header="internal")
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 829f0f7..7501bab 100644 (file)
@@ -58,5 +58,5 @@ report_sxw.report_sxw(
     'report.account.move.voucher',
     'account.move',
     'addons/account/report/voucher_print.rml',
-    parser=report_voucher_move,header=False
+    parser=report_voucher_move,header="external"
 )
index 287dd16..4e7ebb1 100644 (file)
@@ -21,6 +21,7 @@
 ##############################################################################
 
 import time
+import netsvc
 
 from osv import fields,osv
 from tools.translate import _
@@ -184,4 +185,4 @@ class procurement_order(osv.osv):
 
 procurement_order()
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 0a43650..8a9c437 100644 (file)
             <field name="arch" type="xml">
                 <search string="Search Purchase Requisition">
                  <group col='10' colspan='4'>
-                    <filter icon="terp-camera_test" string="Current" domain="[('state','=','draft,in_progress')]" separator="1" help="Current Purchaes Requisition"/>
-                    <filter icon="terp-check" string="Done" domain="[('state','=','done')]" separator="1" help="Current Purchaes Requisition"/>
+                    <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Purchase Requisition"/>
+                    <filter icon="terp-camera_test" string="In Progress" domain="[('state','=','in_progress')]" help="Purchase Requisition in negociation"/>
+                    <filter icon="terp-check" string="Done" domain="[('state','=','done')]" help="Current Purchase Requisition"/>
                     <separator orientation="vertical"/>
-                    <field name="name" string="Requisition Reference"/>
+                    <field name="name"/>
                     <field name="user_id" />
                     <field name="exclusive" />
                 </group>
index cc1d89f..88a2d32 100644 (file)
@@ -30,7 +30,7 @@ class order(report_sxw.rml_parse):
             'time': time,
         })
 
-report_sxw.report_sxw('report.sale.order','sale.order','addons/sale/report/sale_order.rml',parser=order)
+report_sxw.report_sxw('report.sale.order','sale.order','addons/sale/report/sale_order.rml',parser=order, header="external")
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: