← Back to team overview

clearcorp team mailing list archive

lp:~dr.clearcorp/openerp-costa-rica/6.1-fix_partner_ledger_open_invoices into lp:openerp-costa-rica/6.1

 

Diana Rodríguez Martínez has proposed merging lp:~dr.clearcorp/openerp-costa-rica/6.1-fix_partner_ledger_open_invoices into lp:openerp-costa-rica/6.1.

Requested reviews:
  CLEARCORP drivers (clearcorp-drivers)

For more details, see:
https://code.launchpad.net/~dr.clearcorp/openerp-costa-rica/6.1-fix_partner_ledger_open_invoices/+merge/156654

[FIX] Fix open invoices and partner ledger report. Fix errors when the report are printed
[FIX] Fix depends for open invoice and partner ledger report module.
[REM] Remove form l10n_cr_account_financial_report_webkit open invoices and partner ledger report.

-- 
https://code.launchpad.net/~dr.clearcorp/openerp-costa-rica/6.1-fix_partner_ledger_open_invoices/+merge/156654
Your team CLEARCORP development team is subscribed to branch lp:openerp-costa-rica/6.1.
=== modified file 'l10n_cr_account_financial_report_open_invoices/__init__.py'
--- l10n_cr_account_financial_report_open_invoices/__init__.py	2013-04-01 20:57:48 +0000
+++ l10n_cr_account_financial_report_open_invoices/__init__.py	2013-04-02 17:55:28 +0000
@@ -21,6 +21,6 @@
 ##############################################################################
 
 import account
-from . import wizard
-from . import report
+import wizard
+import report
 

=== modified file 'l10n_cr_account_financial_report_open_invoices/report/l10n_cr_account_report_open_invoices.py'
--- l10n_cr_account_financial_report_open_invoices/report/l10n_cr_account_report_open_invoices.py	2013-04-01 21:47:44 +0000
+++ l10n_cr_account_financial_report_open_invoices/report/l10n_cr_account_report_open_invoices.py	2013-04-02 17:55:28 +0000
@@ -36,7 +36,7 @@
 import addons
 
 from l10n_cr_account_financial_report_partner_ledger.report.l10n_cr_account_report_partners_ledger import l10n_cr_PartnersLedgerWebkit
-from openerp.addons.account_financial_report_webkit.report.webkit_parser_header_fix import HeaderFooterTextWebKitParser
+from report import report_sxw
 
 class l10n_cr_PartnersOpenInvoicesWebkit(l10n_cr_PartnersLedgerWebkit):
 
@@ -74,7 +74,7 @@
         else:
             return False
 
-HeaderFooterTextWebKitParser('report.account_financial_report_webkit.account.account_report_open_invoices_webkit',
+report_sxw.report_sxw('report.account_financial_report_open_invoices_webkit',
                              'account.account',
-                             'addons/l10n_cr_account_financial_report_webkit/report/l10n_cr_account_financial_report_open_invoices.mako',
+                             'addons/l10n_cr_account_financial_report_open_invoices/report/l10n_cr_account_report_open_invoices.mako',
                              parser=l10n_cr_PartnersOpenInvoicesWebkit)

=== modified file 'l10n_cr_account_financial_report_open_invoices/report/report.xml'
--- l10n_cr_account_financial_report_open_invoices/report/report.xml	2013-04-01 20:57:48 +0000
+++ l10n_cr_account_financial_report_open_invoices/report/report.xml	2013-04-02 17:55:28 +0000
@@ -4,7 +4,7 @@
             
     <record id="account_financial_report_webkit.account_report_open_invoices_webkit" model="ir.actions.report.xml">
              <field name="report_type">webkit</field>
-             <field name="report_name">account_financial_report_webkit.account.account_report_open_invoices_webkit</field>
+             <field name="report_name">account_financial_report_open_invoices_webkit</field>
              <field eval="[(6,0,[])]" name="groups_id"/>
              <field eval="0" name="multi"/>
              <field eval="0" name="auto"/>

=== modified file 'l10n_cr_account_financial_report_open_invoices/wizard/l10n_cr_account_report_open_invoices_wizard.py'
--- l10n_cr_account_financial_report_open_invoices/wizard/l10n_cr_account_report_open_invoices_wizard.py	2013-04-01 20:57:48 +0000
+++ l10n_cr_account_financial_report_open_invoices/wizard/l10n_cr_account_report_open_invoices_wizard.py	2013-04-02 17:55:28 +0000
@@ -47,6 +47,6 @@
         # we update form with display account value
         data = self.pre_print_report(cursor, uid, ids, data, context=context)
         return {'type': 'ir.actions.report.xml',
-                'report_name': 'account_financial_report_webkit.account.account_report_open_invoices_webkit',
+                'report_name': 'account_financial_report_open_invoices_webkit',
                 'datas': data}
 

=== modified file 'l10n_cr_account_financial_report_partner_ledger/__init__.py'
--- l10n_cr_account_financial_report_partner_ledger/__init__.py	2013-04-01 20:03:26 +0000
+++ l10n_cr_account_financial_report_partner_ledger/__init__.py	2013-04-02 17:55:28 +0000
@@ -23,4 +23,4 @@
 import account
 import wizard 
 import report
-import account_account
+

=== modified file 'l10n_cr_account_financial_report_partner_ledger/__openerp__.py'
--- l10n_cr_account_financial_report_partner_ledger/__openerp__.py	2013-04-01 20:57:48 +0000
+++ l10n_cr_account_financial_report_partner_ledger/__openerp__.py	2013-04-02 17:55:28 +0000
@@ -28,13 +28,12 @@
     'category': 'Finance',
     'website': "http://clearcorp.co.cr";,
     'images': [],
-    'depends': ['account','account_financial_report_webkit' ],
+    'depends': ['account','account_financial_report_webkit'],
     'init_xml': [],
     'demo_xml' : [],
     'update_xml': ['report/report.xml',
                    'wizard/l10n_cr_partners_ledger_wizard_view.xml',
                    'report_menus.xml',
-                   'account_view.xml',
                    ],
     'test': [],
     'active': False,

=== removed file 'l10n_cr_account_financial_report_partner_ledger/account_account.py'
--- l10n_cr_account_financial_report_partner_ledger/account_account.py	2013-04-01 20:03:26 +0000
+++ l10n_cr_account_financial_report_partner_ledger/account_account.py	1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-#-*- coding:utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
-#    d$
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import netsvc
-from osv import fields, orm
-import tools
-from tools.translate import _
-
-class AccountAccount(orm.Model):
-    _inherit = "account.account"
-        
-    _columns = {
-        'report_currency_id': fields.many2one('res.currency', 'Report Currency', help="Currency to show in the reports."),
-    }
\ No newline at end of file

=== removed file 'l10n_cr_account_financial_report_partner_ledger/account_view.xml'
--- l10n_cr_account_financial_report_partner_ledger/account_view.xml	2013-04-01 20:03:26 +0000
+++ l10n_cr_account_financial_report_partner_ledger/account_view.xml	1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
-    <data>
-        <!-- Accounts -->
-        <record id="l10n_cr_account_financial_report_view_account_form" model="ir.ui.view">
-            <field name="name">l10n.cr.account.financial.report.view.account.form</field>
-            <field name="model">account.account</field>
-            <field name="type">form</field>
-            <field name="inherit_id" ref="account.view_account_form"/>
-            <field name="arch" type="xml">
-                <data>                
-                    <field name = "currency_mode" position = "after">
-                        <field name="report_currency_id" attrs="{'required':[('type','in', ('payable', 'receivable', 'liquidity'))]}"/>
-                    </field>
-                </data>
-            </field>
-        </record>
-        <!-- End Accounts -->
-    </data>
-</openerp>

=== modified file 'l10n_cr_account_financial_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.py'
--- l10n_cr_account_financial_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.py	2013-04-01 21:47:44 +0000
+++ l10n_cr_account_financial_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.py	2013-04-02 17:55:28 +0000
@@ -29,7 +29,7 @@
 from datetime import datetime
 
 from openerp.addons.account_financial_report_webkit.report.partners_ledger import PartnersLedgerWebkit
-from openerp.addons.account_financial_report_webkit.report.webkit_parser_header_fix import HeaderFooterTextWebKitParser
+from report import report_sxw
 
 class l10n_cr_PartnersLedgerWebkit(PartnersLedgerWebkit):
 
@@ -68,8 +68,7 @@
             temp_tup = (currency_name, accounts_curr_list[i])
             accounts_by_curr.append(temp_tup)
             i += 1
-            print (temp_tup)
-            
+
         return accounts_by_curr
 
     def get_amount(self,cr, uid, account_move_line, currency):
@@ -178,7 +177,7 @@
         
         return initial_balance
 
-HeaderFooterTextWebKitParser('report.account_financial_report_webkit.account.account_report_partners_ledger_webkit',
+report_sxw.report_sxw('report.account_financial_report_partners_ledger_webkit',
                              'account.account',
-                             'addons/l10n_cr_account_financial_report_webkit/report/l10n_cr_account_financial_report_partners_ledger.mako',
+                             'addons/l10n_cr_account_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.mako',
                              parser=l10n_cr_PartnersLedgerWebkit)
\ No newline at end of file

=== modified file 'l10n_cr_account_financial_report_partner_ledger/report/report.xml'
--- l10n_cr_account_financial_report_partner_ledger/report/report.xml	2013-04-01 20:57:48 +0000
+++ l10n_cr_account_financial_report_partner_ledger/report/report.xml	2013-04-02 17:55:28 +0000
@@ -1,21 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-            
-                <!-- we do not use report tag has we can not set header ref -->
-       <record id="account_financial_report_webkit.account_report_partners_ledger_webkit" model="ir.actions.report.xml">
-            <field name="report_type">webkit</field>
-            <field name="report_name">account_financial_report_webkit.account.account_report_partners_ledger_webkit</field>
-            <field eval="[(6,0,[])]" name="groups_id"/>
-            <field eval="0" name="multi"/>
-            <field eval="0" name="auto"/>
-            <field eval="1" name="header"/>
-            <field name="model">account.account</field>
-            <field name="type">ir.actions.report.xml</field>
-            <field name="name">Partner Ledger Webkit</field>
-            <field name="report_rml">l10n_cr_account_financial_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.mako</field>
-            <field name="report_file">l10n_cr_account_financial_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.mako</field>
-        </record>
-                            
+
+        <report auto="False"
+        id="account_financial_report_webkit.account_report_partners_ledger_webkit"
+        model="account.account"
+        name="account_financial_report_partners_ledger_webkit"
+        file="l10n_cr_account_financial_report_partner_ledger/report/l10n_cr_account_report_partners_ledger.mako"
+        string="Partner Ledger"
+        report_type="webkit" />
+                             
     </data>
 </openerp>

=== modified file 'l10n_cr_account_financial_report_partner_ledger/wizard/l10n_cr_partners_ledger_wizard.py'
--- l10n_cr_account_financial_report_partner_ledger/wizard/l10n_cr_partners_ledger_wizard.py	2013-04-01 20:03:26 +0000
+++ l10n_cr_account_financial_report_partner_ledger/wizard/l10n_cr_partners_ledger_wizard.py	2013-04-02 17:55:28 +0000
@@ -38,6 +38,6 @@
         # we update form with display account value
         data = self.pre_print_report(cursor, uid, ids, data, context=context)
         return {'type': 'ir.actions.report.xml',
-                'report_name': 'account_financial_report_webkit.account.account_report_partners_ledger_webkit',
+                'report_name': 'account_financial_report_partners_ledger_webkit',
                 'datas': data}
 

=== modified file 'l10n_cr_account_financial_report_partner_ledger/wizard/l10n_cr_partners_ledger_wizard_view.xml'
--- l10n_cr_account_financial_report_partner_ledger/wizard/l10n_cr_partners_ledger_wizard_view.xml	2013-04-01 20:03:26 +0000
+++ l10n_cr_account_financial_report_partner_ledger/wizard/l10n_cr_partners_ledger_wizard_view.xml	2013-04-02 17:55:28 +0000
@@ -12,6 +12,15 @@
                     <page string="Layout Options" name="layout_options" position = "replace">
                             <field name="amount_currency" invisible = "True"/>
                     </page>
+                    <field name="period_from" position="attributes">
+                        <attribute name="domain">[('fiscalyear_id', '=', fiscalyear_id)]</attribute>
+                    </field>
+                    <field name="period_to" position="attributes">
+                        <attribute name="domain">[('fiscalyear_id', '=', fiscalyear_id)]</attribute>
+                    </field>
+                    <field name="fiscalyear_id" position="attributes">
+                        <attribute name="required">True</attribute>
+                    </field>
                 </data>
             </field>
         </record>

=== modified file 'l10n_cr_account_financial_report_webkit/report/report.xml'
--- l10n_cr_account_financial_report_webkit/report/report.xml	2013-02-06 22:22:56 +0000
+++ l10n_cr_account_financial_report_webkit/report/report.xml	2013-04-02 17:55:28 +0000
@@ -1,39 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-            
-                <!-- we do not use report tag has we can not set header ref -->
-       <record id="account_financial_report_webkit.account_report_partners_ledger_webkit" model="ir.actions.report.xml">
-            <field name="report_type">webkit</field>
-            <field name="report_name">account_financial_report_webkit.account.account_report_partners_ledger_webkit</field>
-            <field eval="[(6,0,[])]" name="groups_id"/>
-            <field eval="0" name="multi"/>
-            <field eval="0" name="auto"/>
-            <field eval="1" name="header"/>
-            <field name="model">account.account</field>
-            <field name="type">ir.actions.report.xml</field>
-            <field name="name">Partner Ledger Webkit</field>
-            <field name="report_rml">l10n_cr_account_financial_report_webkit/report/l10n_cr_account_report_partners_ledger.mako</field>
-            <field name="report_file">l10n_cr_account_financial_report_webkit/report/l10n_cr_account_report_partners_ledger.mako</field>
-            <field name="webkit_header" ref="financial_landscape_header"/>
-        </record>
-
-
-        <record id="account_financial_report_webkit.account_report_open_invoices_webkit" model="ir.actions.report.xml">
-             <field name="report_type">webkit</field>
-             <field name="report_name">account_financial_report_webkit.account.account_report_open_invoices_webkit</field>
-             <field eval="[(6,0,[])]" name="groups_id"/>
-             <field eval="0" name="multi"/>
-             <field eval="0" name="auto"/>
-             <field eval="1" name="header"/>
-             <field name="model">account.account</field>
-             <field name="type">ir.actions.report.xml</field>
-             <field name="name">Open Invoices Report</field>
-             <field name="report_rml">l10n_cr_account_financial_report_webkit/report/l10n_cr_account_report_open_invoices.mako</field>
-             <field name="report_file">l10n_cr_account_financial_report_webkit/report/l10n_cr_account_report_open_invoices.mako</field>
-             <field name="webkit_header" ref="financial_landscape_header"/>
-         </record>
-
+     
         <report auto="False" id="l10n_cr_partner_balance" model="res.partner" 
             name="l10n.cr.partner.balance.layout_ccorp"  file="l10n_cr_account_financial_report_webkit/report/l10n_cr_account_report_partner_balance.mako" string="Statement of Account" report_type="webkit"/>
 


Follow ups