Merge lp:~rr.clearcorp/openerp-costa-rica/7.0-l10n_cr_exchange_rates into lp:openerp-costa-rica/6.1
- 7.0-l10n_cr_exchange_rates
- Merge into 6.1
Status: | Needs review |
---|---|
Proposed branch: | lp:~rr.clearcorp/openerp-costa-rica/7.0-l10n_cr_exchange_rates |
Merge into: | lp:openerp-costa-rica/6.1 |
Diff against target: |
14569 lines (+11082/-1925) (has conflicts) 146 files modified
l10n_cr_account_banking_cr_bac/__init__.py (+0/-23) l10n_cr_account_banking_cr_bac/__openerp__.py (+42/-0) l10n_cr_account_banking_cr_bac/bac_mt940.py (+283/-0) l10n_cr_account_banking_cr_bac/mt940_parser.py (+0/-153) l10n_cr_account_banking_cr_bcr/__init__.py (+0/-24) l10n_cr_account_banking_cr_bcr/__openerp__.py (+39/-0) l10n_cr_account_banking_cr_bcr/bcr_format.py (+181/-0) l10n_cr_account_banking_cr_bcr/bcr_parser.py (+572/-0) l10n_cr_account_banking_cr_bncr/__init__.py (+24/-0) l10n_cr_account_banking_cr_bncr/__openerp__.py (+39/-0) l10n_cr_account_banking_cr_bncr/bncr_format.py (+189/-0) l10n_cr_account_banking_cr_bncr/bncr_parser.py (+274/-0) l10n_cr_account_banking_cr_davivienda/__openerp__.py (+8/-1) l10n_cr_account_banking_cr_davivienda/davivienda_format.py (+6/-2) l10n_cr_account_banking_cr_davivienda/davivienda_parser.py (+10/-1) l10n_cr_account_banking_reports/__init__.py (+0/-25) l10n_cr_account_banking_reports/__openerp__.py (+0/-43) l10n_cr_account_banking_reports/i18n/es_CR.po (+0/-231) l10n_cr_account_banking_reports/report/__init__.py (+0/-1) l10n_cr_account_banking_reports/report/conciliation_bank.mako (+0/-213) l10n_cr_account_banking_reports/report/report.xml (+0/-20) l10n_cr_account_banking_reports/report_menus.xml (+0/-10) l10n_cr_account_banking_reports/wizard/__init__.py (+0/-23) l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.py (+0/-63) l10n_cr_account_banking_reports/wizard/wizard.xml (+0/-4) l10n_cr_account_conciliation_bank_report/__init__.py (+25/-0) l10n_cr_account_conciliation_bank_report/__openerp__.py (+58/-0) l10n_cr_account_conciliation_bank_report/i18n/es_CR.po (+396/-0) l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.py (+39/-0) l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.xml (+18/-0) l10n_cr_account_conciliation_bank_report/report/__init__.py (+23/-0) l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako (+237/-0) l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py (+412/-0) l10n_cr_account_conciliation_bank_report/report/report.xml (+18/-0) l10n_cr_account_conciliation_bank_report/report_menus.xml (+11/-0) l10n_cr_account_conciliation_bank_report/wizard/__init__.py (+23/-0) l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.py (+94/-0) l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.xml (+92/-0) l10n_cr_account_invoice_D-151/__init__.py (+26/-0) l10n_cr_account_invoice_D-151/__openerp__.py (+41/-0) l10n_cr_account_invoice_D-151/i18n/es_CR.po (+91/-0) l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.py (+72/-0) l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.xml (+32/-0) l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.py (+61/-0) l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.xml (+31/-0) l10n_cr_account_profit_statement_report/__init__.py (+25/-0) l10n_cr_account_profit_statement_report/__openerp__.py (+47/-0) l10n_cr_account_profit_statement_report/i18n/es_CR.po (+285/-0) l10n_cr_account_profit_statement_report/l10n_cr_account_profit_statement_report.py (+38/-0) l10n_cr_account_profit_statement_report/l10n_cr_account_profit_statement_report.xml (+18/-0) l10n_cr_account_profit_statement_report/report/__init__.py (+23/-0) l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako (+116/-0) l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.py (+639/-0) l10n_cr_account_profit_statement_report/report/report.xml (+16/-0) l10n_cr_account_profit_statement_report/report_menus.xml (+10/-0) l10n_cr_account_profit_statement_report/wizard/__init__.py (+23/-0) l10n_cr_account_profit_statement_report/wizard/l10n_cr_account_profit_statement_wizard.py (+67/-0) l10n_cr_account_profit_statement_report/wizard/l10n_cr_account_profit_statement_wizard_view.xml (+80/-0) l10n_cr_account_situation_balance_report/__init__.py (+24/-0) l10n_cr_account_situation_balance_report/__openerp__.py (+44/-0) l10n_cr_account_situation_balance_report/i18n/es_CR.po (+239/-0) l10n_cr_account_situation_balance_report/report/__init__.py (+23/-0) l10n_cr_account_situation_balance_report/report/l10n_cr_account_financial_report_situation_balance_report.mako (+103/-0) l10n_cr_account_situation_balance_report/report/l10n_cr_account_financial_report_situation_balance_report.py (+475/-0) l10n_cr_account_situation_balance_report/report/report.xml (+16/-0) l10n_cr_account_situation_balance_report/report_menus.xml (+10/-0) l10n_cr_account_situation_balance_report/wizard/__init__.py (+23/-0) l10n_cr_account_situation_balance_report/wizard/l10n_cr_account_situation_balance_wizard.py (+48/-0) l10n_cr_account_situation_balance_report/wizard/l10n_cr_account_situation_balance_wizard_view.xml (+76/-0) l10n_cr_account_statement_change_equity_report/__init__.py (+24/-0) l10n_cr_account_statement_change_equity_report/__openerp__.py (+46/-0) l10n_cr_account_statement_change_equity_report/i18n/es_CR.po (+236/-0) l10n_cr_account_statement_change_equity_report/report/__init__.py (+23/-0) l10n_cr_account_statement_change_equity_report/report/l10n_cr_account_statement_change_equity_report.mako (+104/-0) l10n_cr_account_statement_change_equity_report/report/l10n_cr_account_statement_change_equity_report.py (+506/-0) l10n_cr_account_statement_change_equity_report/report/report.xml (+17/-0) l10n_cr_account_statement_change_equity_report/report_menus.xml (+10/-0) l10n_cr_account_statement_change_equity_report/wizard/__init__.py (+23/-0) l10n_cr_account_statement_change_equity_report/wizard/l10n_cr_account_statement_change_equity_wizard.py (+44/-0) l10n_cr_account_statement_change_equity_report/wizard/l10n_cr_account_statement_change_equity_wizard_view.xml (+72/-0) l10n_cr_account_trial_balance_report/__init__.py (+24/-0) l10n_cr_account_trial_balance_report/__openerp__.py (+44/-0) l10n_cr_account_trial_balance_report/i18n/es_CR.po (+293/-0) l10n_cr_account_trial_balance_report/report/__init__.py (+23/-0) l10n_cr_account_trial_balance_report/report/l10n_cr_account_financial_report_trial_balance_report.mako (+138/-0) l10n_cr_account_trial_balance_report/report/l10n_cr_account_financial_report_trial_balance_report.py (+608/-0) l10n_cr_account_trial_balance_report/report/report.xml (+16/-0) l10n_cr_account_trial_balance_report/report_menus.xml (+10/-0) l10n_cr_account_trial_balance_report/wizard/__init__.py (+23/-0) l10n_cr_account_trial_balance_report/wizard/l10n_cr_account_trial_balance_wizard.py (+40/-0) l10n_cr_account_trial_balance_report/wizard/l10n_cr_account_trial_balance_wizard_view.xml (+82/-0) l10n_cr_account_voucher_check_bcr/__init__.py (+22/-0) l10n_cr_account_voucher_check_bcr/__openerp__.py (+22/-32) l10n_cr_account_voucher_check_bcr/data/l10n_cr_account_voucher_check_bcr_webkit_header.xml (+186/-0) l10n_cr_account_voucher_check_bcr/l10n_cr_account_voucher_check_bcr_report.xml (+7/-185) l10n_cr_account_voucher_check_bcr/l10n_cr_account_voucher_check_bcr_view.xml (+43/-0) l10n_cr_account_voucher_check_bcr/report/__init__.py (+21/-34) l10n_cr_account_voucher_check_bcr/report/l10n_cr_account_voucher_check_bcr.py (+19/-33) l10n_cr_account_voucher_check_bcr/report/l10n_cr_account_voucher_check_bcr_amount_to_text.py (+0/-130) l10n_cr_account_voucher_check_bcr/report/l10n_cr_account_voucher_check_bcr_check_voucher.py (+0/-100) l10n_cr_exchange_rates/__init__.py (+24/-0) l10n_cr_exchange_rates/__openerp__.py (+51/-0) l10n_cr_exchange_rates/i18n/es_CR.po (+142/-0) l10n_cr_exchange_rates/l10n_cr_exchange_rates.py (+260/-0) l10n_cr_exchange_rates/l10n_cr_exchange_rates_view.xml (+62/-0) l10n_cr_exchange_rates/wizard/__init__.py (+23/-0) l10n_cr_exchange_rates/wizard/l10n_cr_exchange_rates_wizard.py (+64/-0) l10n_cr_exchange_rates/wizard/l10n_cr_exchange_rates_wizard.xml (+44/-0) l10n_cr_hr_holidays/__init__.py (+23/-0) l10n_cr_hr_holidays/__openerp__.py (+49/-0) l10n_cr_hr_holidays/i18n/es_CR.po (+37/-0) l10n_cr_hr_holidays/i18n/l10n_cr_hr_holidays.po (+37/-0) l10n_cr_hr_holidays/l10n_cr_hr_holidays.py (+39/-0) l10n_cr_hr_holidays/l10n_cr_hr_holidays_view.xml (+20/-0) l10n_cr_hr_holidays/leaves_per_period_scheduled_task.xml (+17/-0) l10n_cr_hr_ins_csv_generator/__init__.py (+24/-0) l10n_cr_hr_ins_csv_generator/__openerp__.py (+52/-0) l10n_cr_hr_ins_csv_generator/i18n/es_CR.po (+213/-0) l10n_cr_hr_ins_csv_generator/l10n_cr_hr_ins_csv_generator.py (+55/-0) l10n_cr_hr_ins_csv_generator/tools/__init__.py (+23/-0) l10n_cr_hr_ins_csv_generator/tools/custom_encoder.py (+87/-0) l10n_cr_hr_ins_csv_generator/view/l10n_cr_hr_ins_csv_generator_view.xml (+43/-0) l10n_cr_hr_ins_csv_generator/wizard/__init__.py (+23/-0) l10n_cr_hr_ins_csv_generator/wizard/l10n_cr_hr_ins_csv_generator_wizard.py (+65/-0) l10n_cr_hr_ins_csv_generator/wizard/l10n_cr_hr_ins_csv_generator_wizard_menu.xml (+11/-0) l10n_cr_hr_ins_csv_generator/wizard/l10n_cr_hr_ins_csv_generator_wizard_view.xml (+41/-0) l10n_cr_hr_payroll/__init__.py (+3/-3) l10n_cr_hr_payroll/__openerp__.py (+6/-8) l10n_cr_hr_payroll/i18n/es_CR.po (+187/-241) l10n_cr_hr_payroll/l10n_cr_hr_payroll.py (+16/-2) l10n_cr_hr_payroll/l10n_cr_hr_payroll_view.xml (+2/-4) l10n_cr_hr_payroll/payroll_report.xml (+0/-8) l10n_cr_hr_payroll/report/__init__.py (+4/-1) l10n_cr_hr_payroll/report/payroll_report.mako (+117/-138) l10n_cr_hr_payroll/report/payroll_report_for_month.mako (+71/-93) l10n_cr_hr_payroll/report/payroll_report_for_month.py (+17/-28) l10n_cr_hr_payroll/report/report.xml (+28/-18) l10n_cr_hr_payroll/report/report_employee_by_periods.mako (+116/-0) l10n_cr_hr_payroll/report/report_employee_by_periods.py (+167/-0) l10n_cr_hr_payroll/report_menus.xml (+6/-2) l10n_cr_hr_payroll/security/ir.model.access.csv (+3/-0) l10n_cr_hr_payroll/wizard/__init__.py (+4/-1) l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py (+36/-9) l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard_view.xml (+17/-18) l10n_cr_hr_payroll/wizard/report_employee_by_periods_wizard.py (+55/-0) l10n_cr_hr_payroll/wizard/report_employee_by_periods_wizard_view.xml (+37/-0) Path conflict: <deleted> / TODO-7.0/l10n_cr_accounting_report_library Conflict: can't delete l10n_cr_account_banking_cr_bac.moved because it is not empty. Not deleting. Conflict adding file l10n_cr_account_banking_cr_bac. Moved existing file to l10n_cr_account_banking_cr_bac.moved. Conflict because l10n_cr_account_banking_cr_bac.moved is not versioned, but has versioned children. Versioned directory. Conflict: can't delete l10n_cr_account_banking_cr_bcr.moved because it is not empty. Not deleting. Conflict adding file l10n_cr_account_banking_cr_bcr. Moved existing file to l10n_cr_account_banking_cr_bcr.moved. Conflict because l10n_cr_account_banking_cr_bcr.moved is not versioned, but has versioned children. Versioned directory. Conflict adding file l10n_cr_account_banking_cr_bncr. Moved existing file to l10n_cr_account_banking_cr_bncr.moved. Text conflict in l10n_cr_account_banking_cr_davivienda/__openerp__.py Text conflict in l10n_cr_account_banking_cr_davivienda/davivienda_format.py Text conflict in l10n_cr_account_banking_cr_davivienda/davivienda_parser.py Conflict: can't delete l10n_cr_account_banking_reports because it is not empty. Not deleting. Conflict because l10n_cr_account_banking_reports is not versioned, but has versioned children. Versioned directory. Conflict: can't delete l10n_cr_account_banking_reports/report because it is not empty. Not deleting. Conflict because l10n_cr_account_banking_reports/report is not versioned, but has versioned children. Versioned directory. Contents conflict in l10n_cr_account_banking_reports/report/conciliation_bank.py Conflict: can't delete l10n_cr_account_banking_reports/wizard because it is not empty. Not deleting. Conflict because l10n_cr_account_banking_reports/wizard is not versioned, but has versioned children. Versioned directory. Contents conflict in l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.xml Text conflict in l10n_cr_account_voucher_check_bcr/l10n_cr_account_voucher_check_bcr_view.xml Conflict adding file l10n_cr_exchange_rates. Moved existing file to l10n_cr_exchange_rates.moved. Text conflict in l10n_cr_hr_payroll/i18n/es_CR.po Text conflict in l10n_cr_hr_payroll/l10n_cr_hr_payroll.py Text conflict in l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard.py Text conflict in l10n_cr_hr_payroll/wizard/payroll_report_for_month_wizard_view.xml |
To merge this branch: | bzr merge lp:~rr.clearcorp/openerp-costa-rica/7.0-l10n_cr_exchange_rates |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ClearCorp drivers | Pending | ||
Review via email: mp+194233@code.launchpad.net |
Commit message
Description of the change
[ADD] Add module l10n_cr_
- 251. By Ronald Rubi
-
[MRG] Add module l10n_cr_
exchange_ rates - 252. By Ronald Rubi
-
[MRG] New module l10n_cr_
account_ banking_ cr_bcr intended to read and parse bank statements files for a the module account_ banking_ ccorp from openerp- ccorp-addons - 253. By Ronald Rubi
-
[MRG] l10n_cr_
account_ banking_ cr_bac module to parse bank statements from BAC SanJose using the module account_ banking_ ccorp - 254. By Ronald Rubi
-
[MRG] Add field Exchange rate date in l10n_cr_
exchange_ rates - 255. By Ronald Rubi
-
[MRG] Fix exchange_rate_date in l10n_cr_
exchange_ rates - 256. By Ronald Rubi
-
[MRG] Changed BCRParser keyword to find the ending balance of the bank statatements files and modified davivienda's parser to work with openerp v 7.0
- 257. By Ronald Rubi
-
[MRG] Fixed account number comparisson
- 258. By Ronald Rubi
-
[MRG] Fix adjustment, unreconcile accounts, l10n_cr_
exchange_ rates - 259. By Ronald Rubi
-
[MRG] l10n_cr_
account_ banking_ cr_davivienda: Fixed missing line importing DaVivienda's bank statements file - 260. By Ronald Rubi
-
[MRG] Created parser for BNCR Bank Statements Files
- 261. By Ronald Rubi
-
[FIX] Add periods in create_
move_lines_ unreconcile, l10n_cr_ exchange_ rates - 262. By Ronald Rubi
-
[FIX] Use moves in draft, l10n_cr_
exchange_ rates
Unmerged revisions
- 262. By Ronald Rubi
-
[FIX] Use moves in draft, l10n_cr_
exchange_ rates - 261. By Ronald Rubi
-
[FIX] Add periods in create_
move_lines_ unreconcile, l10n_cr_ exchange_ rates - 260. By Ronald Rubi
-
[MRG] Created parser for BNCR Bank Statements Files
- 259. By Ronald Rubi
-
[MRG] l10n_cr_
account_ banking_ cr_davivienda: Fixed missing line importing DaVivienda's bank statements file - 258. By Ronald Rubi
-
[MRG] Fix adjustment, unreconcile accounts, l10n_cr_
exchange_ rates - 257. By Ronald Rubi
-
[MRG] Fixed account number comparisson
- 256. By Ronald Rubi
-
[MRG] Changed BCRParser keyword to find the ending balance of the bank statatements files and modified davivienda's parser to work with openerp v 7.0
- 255. By Ronald Rubi
-
[MRG] Fix exchange_rate_date in l10n_cr_
exchange_ rates - 254. By Ronald Rubi
-
[MRG] Add field Exchange rate date in l10n_cr_
exchange_ rates - 253. By Ronald Rubi
-
[MRG] l10n_cr_
account_ banking_ cr_bac module to parse bank statements from BAC SanJose using the module account_ banking_ ccorp
Preview Diff
1 | === added directory 'TODO-7.0' |
2 | === renamed directory 'l10n_cr_account_financial_report_webkit' => 'TODO-7.0/l10n_cr_account_financial_report_webkit' |
3 | === renamed directory 'l10n_cr_account_financial_statements' => 'TODO-7.0/l10n_cr_account_financial_statements' |
4 | === renamed directory 'l10n_cr_account_voucher' => 'TODO-7.0/l10n_cr_account_voucher' |
5 | === renamed directory 'l10n_cr_base' => 'TODO-7.0/l10n_cr_base' |
6 | === added directory 'l10n_cr_account_banking_cr_bac' |
7 | === renamed directory 'l10n_cr_account_banking_cr_bac' => 'l10n_cr_account_banking_cr_bac.moved' |
8 | === added file 'l10n_cr_account_banking_cr_bac/__init__.py' |
9 | --- l10n_cr_account_banking_cr_bac/__init__.py 1970-01-01 00:00:00 +0000 |
10 | +++ l10n_cr_account_banking_cr_bac/__init__.py 2013-12-06 21:45:38 +0000 |
11 | @@ -0,0 +1,24 @@ |
12 | +# -*- encoding: utf-8 -*- |
13 | +############################################################################## |
14 | +# |
15 | +# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
16 | +# All Rights Reserved |
17 | +# |
18 | +# This program is free software: you can redistribute it and/or modify |
19 | +# it under the terms of the GNU Affero General Public License as |
20 | +# published by the Free Software Foundation, either version 3 of the |
21 | +# License, or (at your option) any later version. |
22 | +# |
23 | +# This program is distributed in the hope that it will be useful, |
24 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
25 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26 | +# GNU Affero General Public License for more details. |
27 | +# |
28 | +# You should have received a copy of the GNU Affero General Public License |
29 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
30 | +# |
31 | +############################################################################## |
32 | + |
33 | +import bac_mt940 |
34 | + |
35 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
36 | \ No newline at end of file |
37 | |
38 | === removed file 'l10n_cr_account_banking_cr_bac/__init__.py' |
39 | --- l10n_cr_account_banking_cr_bac/__init__.py 2012-07-12 00:37:04 +0000 |
40 | +++ l10n_cr_account_banking_cr_bac/__init__.py 1970-01-01 00:00:00 +0000 |
41 | @@ -1,23 +0,0 @@ |
42 | -# -*- encoding: utf-8 -*- |
43 | -############################################################################## |
44 | -# |
45 | -# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
46 | -# All Rights Reserved |
47 | -# |
48 | -# This program is free software: you can redistribute it and/or modify |
49 | -# it under the terms of the GNU Affero General Public License as |
50 | -# published by the Free Software Foundation, either version 3 of the |
51 | -# License, or (at your option) any later version. |
52 | -# |
53 | -# This program is distributed in the hope that it will be useful, |
54 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
55 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
56 | -# GNU Affero General Public License for more details. |
57 | -# |
58 | -# You should have received a copy of the GNU Affero General Public License |
59 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
60 | -# |
61 | -############################################################################## |
62 | - |
63 | -import bac_mt940 |
64 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
65 | |
66 | === added file 'l10n_cr_account_banking_cr_bac/__openerp__.py' |
67 | --- l10n_cr_account_banking_cr_bac/__openerp__.py 1970-01-01 00:00:00 +0000 |
68 | +++ l10n_cr_account_banking_cr_bac/__openerp__.py 2013-12-06 21:45:38 +0000 |
69 | @@ -0,0 +1,42 @@ |
70 | +# -*- coding: utf-8 -*- |
71 | +############################################################################## |
72 | +# |
73 | +# OpenERP, Open Source Management Solution |
74 | +# Addons modules by CLEARCORP S.A. |
75 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
76 | +# |
77 | +# This program is free software: you can redistribute it and/or modify |
78 | +# it under the terms of the GNU Affero General Public License as |
79 | +# published by the Free Software Foundation, either version 3 of the |
80 | +# License, or (at your option) any later version. |
81 | +# |
82 | +# This program is distributed in the hope that it will be useful, |
83 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
84 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
85 | +# GNU Affero General Public License for more details. |
86 | +# |
87 | +# You should have received a copy of the GNU Affero General Public License |
88 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
89 | +# |
90 | +############################################################################## |
91 | + |
92 | +{ |
93 | + 'name': 'BAC Account Banking', |
94 | + 'version': '0.1', |
95 | + 'license': 'AGPL-3', |
96 | + 'author': 'CLEARCORP S.A.', |
97 | + 'website': 'http://www.clearcorp.co.cr', |
98 | + 'category': 'Accounting & Finance', |
99 | + 'depends': [ |
100 | + 'account_banking_ccorp', |
101 | + ], |
102 | + 'init_xml': [], |
103 | + 'update_xml': [ |
104 | + ], |
105 | + 'demo_xml': [], |
106 | + 'description': ''' |
107 | + Module to import BAC CR format transation files (S.W.I.F.T MT940). |
108 | + ''', |
109 | + 'active': False, |
110 | + 'installable': True, |
111 | +} |
112 | |
113 | === added file 'l10n_cr_account_banking_cr_bac/bac_mt940.py' |
114 | --- l10n_cr_account_banking_cr_bac/bac_mt940.py 1970-01-01 00:00:00 +0000 |
115 | +++ l10n_cr_account_banking_cr_bac/bac_mt940.py 2013-12-06 21:45:38 +0000 |
116 | @@ -0,0 +1,283 @@ |
117 | +# -*- encoding: utf-8 -*- |
118 | +############################################################################## |
119 | +# |
120 | +# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
121 | +# All Rights Reserved |
122 | +# |
123 | +# This program is free software: you can redistribute it and/or modify |
124 | +# it under the terms of the GNU Affero General Public License as |
125 | +# published by the Free Software Foundation, either version 3 of the |
126 | +# License, or (at your option) any later version. |
127 | +# |
128 | +# This program is distributed in the hope that it will be useful, |
129 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
130 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
131 | +# GNU Affero General Public License for more details. |
132 | +# |
133 | +# You should have received a copy of the GNU Affero General Public License |
134 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
135 | +# |
136 | +############################################################################## |
137 | +# Import of BAC data in Swift MT940 format |
138 | +# |
139 | + |
140 | +from account_banking_ccorp.parsers import models |
141 | +from mt940_parser import BACParser |
142 | +import re |
143 | +from openerp.osv import osv, fields |
144 | +import logging |
145 | +import datetime |
146 | +from openerp.tools.translate import _ |
147 | +import base64 |
148 | + |
149 | +bt = models.mem_bank_transaction |
150 | +logger = logging.getLogger('bac_mt940') |
151 | + |
152 | +def record2float(record, value): |
153 | + if record['creditmarker'][-1] == 'C': |
154 | + return float(record[value]) |
155 | + return -float(record[value]) |
156 | + |
157 | +class transaction(models.mem_bank_transaction): |
158 | + |
159 | + mapping = { |
160 | + 'execution_date' : 'valuedate', |
161 | + 'effective_date' : 'valuedate', |
162 | + 'local_currency' : 'currency', |
163 | + 'transfer_type' : 'bookingcode', |
164 | + 'reference' : 'custrefno', |
165 | + 'message' : 'furtherinfo', |
166 | + 'name' : 'infoline1' |
167 | + } |
168 | + |
169 | + type_map = { |
170 | + 'NTRF': bt.ORDER, |
171 | + 'NMSC': bt.ORDER, |
172 | + 'NPAY': bt.PAYMENT_BATCH, |
173 | + 'NCHK': bt.CHECK, |
174 | + 'NCLR': bt.ORDER, |
175 | + } |
176 | + |
177 | + def __init__(self, record, *args, **kwargs): |
178 | + ''' |
179 | + Transaction creation |
180 | + ''' |
181 | + super(transaction, self).__init__(*args, **kwargs) |
182 | + for key, value in self.mapping.iteritems(): |
183 | + if record.has_key(value): |
184 | + setattr(self, key, record[value]) |
185 | + |
186 | + self.transferred_amount = record2float(record, 'amount') |
187 | + |
188 | + # Set the transfer type based on the bookingcode |
189 | + if record.get('bookingcode','ignore') in self.type_map: |
190 | + self.transfer_type = self.type_map[record['bookingcode']] |
191 | + else: |
192 | + # Default to the generic order, so it will be eligible for matching |
193 | + self.transfer_type = bt.ORDER |
194 | + |
195 | + if not self.is_valid(): |
196 | + logger.info("Invalid: %s", record) |
197 | + def is_valid(self): |
198 | + ''' |
199 | + We don't have remote_account so override base |
200 | + ''' |
201 | + return (self.execution_date |
202 | + and self.transferred_amount and True) or False |
203 | + |
204 | +class statement(models.mem_bank_statement): |
205 | + ''' |
206 | + Bank statement imported data |
207 | + ''' |
208 | + |
209 | + def import_record(self, record,**kwargs): |
210 | + def _transmission_number(): |
211 | + self.id = record['transref'] |
212 | + def _account_number(): |
213 | + # The wizard doesn't check for sort code |
214 | + self.local_account = record['sortcode'] + record['accnum'] |
215 | + def _statement_number(): |
216 | + self.id = self.local_account + '-' + record['statementnr'] |
217 | + def _opening_balance(): |
218 | + self.start_balance = record2float(record,'startingbalance') |
219 | + self.local_currency = record['currencycode'] |
220 | + def _closing_balance(): |
221 | + self.end_balance = record2float(record, 'endingbalance') |
222 | + today = datetime.datetime.today() |
223 | + dateString = today.strftime("%Y-%m-%d %H:%M:%S") |
224 | + self.id = dateString + '-' + self.id |
225 | + def _transaction_new(): |
226 | + self.transactions.append(transaction(record)) |
227 | + def _transaction_info(): |
228 | + self.transaction_info(record) |
229 | + def _not_used(): |
230 | + logger.info("Didn't use record: %s", record) |
231 | + def _forward_available(): |
232 | + self.end_balance = record2float(record, 'endingbalance') |
233 | + self.date = record['bookingdate'] |
234 | + |
235 | + rectypes = { |
236 | + '20' : _transmission_number, |
237 | + '25' : _account_number, |
238 | + '28' : _statement_number, |
239 | + '28C': _statement_number, |
240 | + '60F': _opening_balance, |
241 | + '62F': _closing_balance, |
242 | + '64' : _forward_available, |
243 | + #'62M': _interim_balance, |
244 | + '61' : _transaction_new, |
245 | + '86' : _transaction_info, |
246 | + } |
247 | + |
248 | + rectypes.get(record['recordid'], _not_used)() |
249 | + |
250 | + def transaction_info(self, record): |
251 | + ''' |
252 | + Add extra information to transaction |
253 | + ''' |
254 | + # Additional information for previous transaction |
255 | + if len(self.transactions) < 1: |
256 | + logger.info("Received additional information for non existent transaction:") |
257 | + logger.info(record) |
258 | + else: |
259 | + transaction = self.transactions[-1] |
260 | + #transaction.id = ','.join([record[k] for k in ['infoline{0}'.format(i) for i in range(2,5)] if record.has_key(k)]) |
261 | + transaction.id = record['infoline1'] |
262 | + |
263 | +def raise_error(message, line): |
264 | + raise osv.osv.except_osv(_('Import error'), |
265 | + 'Error in import:%s\n\n%s' % (message, line)) |
266 | + |
267 | +class parser_bac_mt940(models.parser): |
268 | + code = 'BAC-MT940' |
269 | + name = _('BAC Swift MT940 statement export') |
270 | + country_code = 'CR' |
271 | + doc = _('''\ |
272 | + This format is available through |
273 | + the BAC web interface. |
274 | + ''') |
275 | + |
276 | + def parse(self, cr, statements_file,**kwargs): |
277 | + ''' |
278 | + ** Kwargs parameter is used for a dynamic list of parameters. |
279 | + The wizard imported extracts used in all parsers and not all parsers have all the necessary information in your file, |
280 | + so get information from the wizard and passed by the ** kwargs. |
281 | + Then in the parses that are needed, are extracted from the ** kwargs and if needed, |
282 | + the parser still works the same way without this parameter. |
283 | + |
284 | + The rest of the methods must receive this parameter. (As the method that parse the header and the lines). |
285 | + ''' |
286 | + result = [] |
287 | + parser = BACParser() |
288 | + list_record = [] |
289 | + inversion_colocada = 0 |
290 | + |
291 | + """ |
292 | + **kwargs have all the parameters that have the wizard and |
293 | + has all the parameters passed from the wizard before calling |
294 | + the method that parses the file. |
295 | + """ |
296 | + #pass to encoding with the correct type of file. |
297 | + data = base64.decodestring(statements_file) |
298 | + |
299 | + # Split into statements |
300 | + statements = [st for st in re.split('[\r\n]*(?=:20:)', data)] |
301 | + # Split by records |
302 | + statement_list = [re.split('[\r\n ]*(?=:\d\d[\w]?:)', st) for st in statements] |
303 | + |
304 | + ''' |
305 | + In the first position of the statement_list is the account number. |
306 | + If the account number that pass in the **kwargs dictionary. |
307 | + ''' |
308 | + account_number_wizard = kwargs['account_number'] |
309 | + #statement_list is a list, extract the first position |
310 | + accnum = statement_list[1][1] |
311 | + |
312 | + #find the number in the account string. |
313 | + if accnum.find(account_number_wizard) > -1: |
314 | + for statement_lines in statement_list: |
315 | + stmnt = statement() |
316 | + |
317 | + """EXTRACCION DE DATOS """ |
318 | + for record in statement_lines: |
319 | + records = parser.parse_record(record,**kwargs) |
320 | + |
321 | + if records is not None: |
322 | + ############START PAGO CAPITAL INVERSION |
323 | + if records['recordid'] == '60F': |
324 | + start_balance = float(records['startingbalance']) |
325 | + if records['recordid'] == '61': |
326 | + amount = float(records['amount']) |
327 | + if records['recordid'] == '86' and records['infoline1'] == 'PAGO CAPITAL INVERSION': |
328 | + start_amount = amount |
329 | + start_balance += amount #con la suma ya realizada. |
330 | + ############END PAGO CAPITAL INVERSION |
331 | + |
332 | + ############START INVERSION COLOCADA |
333 | + if records['recordid'] == '86': |
334 | + cad = records['infoline1'] |
335 | + if cad.find('INVERSION COLOCADA') > 0: |
336 | + inversion_colocada = amount |
337 | + |
338 | + if records['recordid'] == '62F': |
339 | + ending_balance = (inversion_colocada + float(records['endingbalance'])) |
340 | + |
341 | + if records is not None: |
342 | + """ACTUALIZACION DE DATOS """ |
343 | + for record in statement_lines: |
344 | + if record is not None: |
345 | + records = parser.parse_record(record) |
346 | + |
347 | + if (records['recordid'] == '60F'): |
348 | + dic = {'startingbalance':start_balance} |
349 | + records.update(dic) |
350 | + |
351 | + if (records['recordid'] == '62F'): |
352 | + dic = {'endingbalance': ending_balance} |
353 | + records.update(dic) |
354 | + |
355 | + if (records['recordid'] == '64'): |
356 | + dic = {'endingbalance': ending_balance} |
357 | + records.update(dic) |
358 | + |
359 | + #SI LA LINEA NO ES INVERSION COLOCADA O PAGO CAPITAL INVERSION, SE AGREGA A LA LISTA |
360 | + #PAGO_CAPITAL |
361 | + if (records['recordid'] == '86'): |
362 | + cad = records['infoline1'] |
363 | + |
364 | + if (cad != "PAGO CAPITAL INVERSION") and (cad.find("INVERSION COLOCADA") < 0): |
365 | + list_record.append(records) |
366 | + |
367 | + if (records['recordid'] == '61'): |
368 | + try: |
369 | + if float(records['amount']) != start_amount and float(records['amount']) != inversion_colocada: |
370 | + list_record.append(records) |
371 | + except: |
372 | + list_record.append(records) |
373 | + ##################################################################### |
374 | + |
375 | + if (records['recordid'] != '61' and records['recordid'] != '86' ): |
376 | + list_record.append(records) |
377 | + |
378 | + [stmnt.import_record(r) for r in list_record if r is not None] |
379 | + |
380 | + if stmnt.is_valid(): |
381 | + result.append(stmnt) |
382 | + list_record = [] |
383 | + inversion_colocada = 0 |
384 | + start_balance = 0 |
385 | + else: |
386 | + logger.info("Invalid Statement:") |
387 | + logger.info(records[0]) |
388 | + logger.info(records[1]) |
389 | + logger.info(records[2]) |
390 | + logger.info(records[3]) |
391 | + logger.info(records[4]) |
392 | + list_record = [] |
393 | + return result |
394 | + |
395 | + else: |
396 | + raise osv.except_osv(_('Error'), |
397 | + _('Error en la importación! La cuenta especificada en el archivo no coincide con la seleccionada en el asistente de importacion')) |
398 | + |
399 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
400 | |
401 | === added file 'l10n_cr_account_banking_cr_bac/mt940_parser.py' |
402 | --- l10n_cr_account_banking_cr_bac/mt940_parser.py 1970-01-01 00:00:00 +0000 |
403 | +++ l10n_cr_account_banking_cr_bac/mt940_parser.py 2013-12-06 21:45:38 +0000 |
404 | @@ -0,0 +1,153 @@ |
405 | +#!/usr/bin/env python |
406 | +# -*- encoding: utf-8 -*- |
407 | +############################################################################## |
408 | +# |
409 | +# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
410 | +# All Rights Reserved |
411 | +# |
412 | +# This program is free software: you can redistribute it and/or modify |
413 | +# it under the terms of the GNU Affero General Public License as |
414 | +# published by the Free Software Foundation, either version 3 of the |
415 | +# License, or (at your option) any later version. |
416 | +# |
417 | +# This program is distributed in the hope that it will be useful, |
418 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
419 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
420 | +# GNU Affero General Public License for more details. |
421 | +# |
422 | +# You should have received a copy of the GNU Affero General Public License |
423 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
424 | +# |
425 | +############################################################################## |
426 | + |
427 | +""" |
428 | +Parser for BAC CR MT940 format files |
429 | +Based on fi_patu's parser |
430 | +""" |
431 | +import re |
432 | +from datetime import datetime |
433 | + |
434 | +class BACParser(object): |
435 | + |
436 | + def __init__( self ): |
437 | + recparse = dict() |
438 | + patterns = {'ebcdic': "\w/\?:\(\).,'+{} -"} |
439 | + |
440 | + # MT940 header |
441 | + recparse["20"] = ":(?P<recordid>20):(?P<transref>.{1,16})" |
442 | + recparse["25"] = ":(?P<recordid>25):(?P<sortcode>\d{6})(?P<accnum>\d{1,29})" |
443 | + recparse["28"] = ":(?P<recordid>28C?):(?P<statementnr>.{1,8})" |
444 | + |
445 | + # Opening balance 60F |
446 | + recparse["60F"] = ":(?P<recordid>60F):(?P<creditmarker>[CD])" \ |
447 | + + "(?P<prevstmtdate>\d{6})(?P<currencycode>.{3})" \ |
448 | + + "(?P<startingbalance>[\d,]{1,15})" |
449 | + |
450 | + # Transaction |
451 | + recparse["61"] = ":(?P<recordid>61):" \ |
452 | + + "(?P<valuedate>\d{6})(?P<bookingdate>\d{4})?" \ |
453 | + + "(?P<creditmarker>R?[CD])" \ |
454 | + + "(?P<amount>[\d,]{1,15})" \ |
455 | + + "(?P<bookingcode>[A-Z]{4})" \ |
456 | + + "(?P<custrefno>[\d,]{1,16})" \ |
457 | + + "(?P<bankref>[%(ebcdic)s]{1,16})?" \ |
458 | + + "(?:\n(?P<furtherinfo>[%(ebcdic)s]))?" \ |
459 | + % (patterns) |
460 | + |
461 | + # Further info |
462 | + recparse["86"] = ":(?P<recordid>86):" \ |
463 | + + "(?P<infoline1>.{1,80})?" \ |
464 | + + "(?:\n(?P<infoline2>.{1,80}))?" \ |
465 | + + "(?:\n(?P<infoline3>.{1,80}))?" \ |
466 | + + "(?:\n(?P<infoline4>.{1,80}))?" \ |
467 | + + "(?:\n(?P<infoline5>.{1,80}))?" |
468 | + |
469 | + # Forward available balance (64) / Closing balance (62F) / Interim balance (62M) |
470 | + recparse["64"] = ":(?P<recordid>64|62[FM]):" \ |
471 | + + "(?P<creditmarker>[CD])" \ |
472 | + + "(?P<bookingdate>\d{6})(?P<currencycode>.{3})" \ |
473 | + + "(?P<endingbalance>[\d,]{1,15})" |
474 | + |
475 | + for record in recparse: |
476 | + recparse[record] = re.compile(recparse[record]) |
477 | + self.recparse = recparse |
478 | + |
479 | + |
480 | + def parse_record(self, line,**kwargs): |
481 | + """ |
482 | + Parse record using regexps and apply post processing |
483 | + """ |
484 | + for matcher in self.recparse: |
485 | + matchobj = self.recparse[matcher].match(line) |
486 | + if matchobj: |
487 | + break |
488 | + if not matchobj: |
489 | + print " **** failed to match line '%s'" % (line) |
490 | + return |
491 | + # Strip strings |
492 | + matchdict = matchobj.groupdict() |
493 | + |
494 | + # Remove members set to None |
495 | + matchdict=dict([(k,v) for k,v in matchdict.iteritems() if v]) |
496 | + |
497 | + matchkeys = set(matchdict.keys()) |
498 | + needstrip = set(["transref", "accnum", "statementnr", "custrefno", |
499 | + "bankref", "furtherinfo", "infoline1", "infoline2", "infoline3", |
500 | + "infoline4", "infoline5", "startingbalance", "endingbalance"]) |
501 | + for field in matchkeys & needstrip: |
502 | + matchdict[field] = matchdict[field].strip() |
503 | + |
504 | + # Convert to float. Comma is decimal separator |
505 | + needsfloat = set(["startingbalance", "endingbalance", "amount"]) |
506 | + for field in matchkeys & needsfloat: |
507 | + matchdict[field] = float(matchdict[field].replace(',','.')) |
508 | + |
509 | + # Convert date fields |
510 | + needdate = set(["prevstmtdate", "valuedate", "bookingdate"]) |
511 | + for field in matchkeys & needdate: |
512 | + datestring = matchdict[field] |
513 | + |
514 | + post_check = False |
515 | + if len(datestring) == 4 and field=="bookingdate" and matchdict.has_key("valuedate"): |
516 | + # Get year from valuedate |
517 | + datestring = matchdict['valuedate'].strftime('%y') + datestring |
518 | + post_check = True |
519 | + try: |
520 | + matchdict[field] = datetime.strptime(datestring,'%y%m%d') |
521 | + if post_check and matchdict[field] > matchdict["valuedate"]: |
522 | + matchdict[field]=matchdict[field].replace(year=matchdict[field].year-1) |
523 | + except ValueError: |
524 | + matchdict[field] = None |
525 | + |
526 | + return matchdict |
527 | + |
528 | + def parse(self, cr, data): |
529 | + records = [] |
530 | + # Some records are multiline |
531 | + for line in data: |
532 | + if len(line) <= 1: |
533 | + continue |
534 | + if line[0] == ':' and len(line) > 1: |
535 | + records.append(line) |
536 | + else: |
537 | + records[-1] = '\n'.join([records[-1], line]) |
538 | + |
539 | + output = [] |
540 | + for rec in records: |
541 | + output.append(self.parse_record(rec)) |
542 | + |
543 | + return output |
544 | + |
545 | +def parse_file(filename): |
546 | + bacfile = open(filename, "r") |
547 | + p = BACParser().parse(bacfile.readlines()) |
548 | + |
549 | +def main(): |
550 | + """The main function, currently just calls a dummy filename |
551 | + |
552 | + :returns: description |
553 | + """ |
554 | + parse_file("testfile") |
555 | + |
556 | +if __name__ == '__main__': |
557 | + main() |
558 | |
559 | === removed file 'l10n_cr_account_banking_cr_bac/mt940_parser.py' |
560 | --- l10n_cr_account_banking_cr_bac/mt940_parser.py 2013-02-22 22:35:48 +0000 |
561 | +++ l10n_cr_account_banking_cr_bac/mt940_parser.py 1970-01-01 00:00:00 +0000 |
562 | @@ -1,153 +0,0 @@ |
563 | -#!/usr/bin/env python |
564 | -# -*- encoding: utf-8 -*- |
565 | -############################################################################## |
566 | -# |
567 | -# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
568 | -# All Rights Reserved |
569 | -# |
570 | -# This program is free software: you can redistribute it and/or modify |
571 | -# it under the terms of the GNU Affero General Public License as |
572 | -# published by the Free Software Foundation, either version 3 of the |
573 | -# License, or (at your option) any later version. |
574 | -# |
575 | -# This program is distributed in the hope that it will be useful, |
576 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
577 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
578 | -# GNU Affero General Public License for more details. |
579 | -# |
580 | -# You should have received a copy of the GNU Affero General Public License |
581 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
582 | -# |
583 | -############################################################################## |
584 | - |
585 | -""" |
586 | -Parser for BAC CR MT940 format files |
587 | -Based on fi_patu's parser |
588 | -""" |
589 | -import re |
590 | -from datetime import datetime |
591 | - |
592 | -class BACParser(object): |
593 | - |
594 | - def __init__( self ): |
595 | - recparse = dict() |
596 | - patterns = {'ebcdic': "\w/\?:\(\).,'+{} -"} |
597 | - |
598 | - # MT940 header |
599 | - recparse["20"] = ":(?P<recordid>20):(?P<transref>.{1,16})" |
600 | - recparse["25"] = ":(?P<recordid>25):(?P<sortcode>\d{6})(?P<accnum>\d{1,29})" |
601 | - recparse["28"] = ":(?P<recordid>28C?):(?P<statementnr>.{1,8})" |
602 | - |
603 | - # Opening balance 60F |
604 | - recparse["60F"] = ":(?P<recordid>60F):(?P<creditmarker>[CD])" \ |
605 | - + "(?P<prevstmtdate>\d{6})(?P<currencycode>.{3})" \ |
606 | - + "(?P<startingbalance>[\d,]{1,15})" |
607 | - |
608 | - # Transaction |
609 | - recparse["61"] = ":(?P<recordid>61):" \ |
610 | - + "(?P<valuedate>\d{6})(?P<bookingdate>\d{4})?" \ |
611 | - + "(?P<creditmarker>R?[CD])" \ |
612 | - + "(?P<amount>[\d,]{1,15})" \ |
613 | - + "(?P<bookingcode>[A-Z]{4})" \ |
614 | - + "(?P<custrefno>[\d,]{1,16})" \ |
615 | - + "(?P<bankref>[%(ebcdic)s]{1,16})?" \ |
616 | - + "(?:\n(?P<furtherinfo>[%(ebcdic)s]))?" \ |
617 | - % (patterns) |
618 | - |
619 | - # Further info |
620 | - recparse["86"] = ":(?P<recordid>86):" \ |
621 | - + "(?P<infoline1>.{1,80})?" \ |
622 | - + "(?:\n(?P<infoline2>.{1,80}))?" \ |
623 | - + "(?:\n(?P<infoline3>.{1,80}))?" \ |
624 | - + "(?:\n(?P<infoline4>.{1,80}))?" \ |
625 | - + "(?:\n(?P<infoline5>.{1,80}))?" |
626 | - |
627 | - # Forward available balance (64) / Closing balance (62F) / Interim balance (62M) |
628 | - recparse["64"] = ":(?P<recordid>64|62[FM]):" \ |
629 | - + "(?P<creditmarker>[CD])" \ |
630 | - + "(?P<bookingdate>\d{6})(?P<currencycode>.{3})" \ |
631 | - + "(?P<endingbalance>[\d,]{1,15})" |
632 | - |
633 | - for record in recparse: |
634 | - recparse[record] = re.compile(recparse[record]) |
635 | - self.recparse = recparse |
636 | - |
637 | - |
638 | - def parse_record(self, line,**kwargs): |
639 | - """ |
640 | - Parse record using regexps and apply post processing |
641 | - """ |
642 | - for matcher in self.recparse: |
643 | - matchobj = self.recparse[matcher].match(line) |
644 | - if matchobj: |
645 | - break |
646 | - if not matchobj: |
647 | - print " **** failed to match line '%s'" % (line) |
648 | - return |
649 | - # Strip strings |
650 | - matchdict = matchobj.groupdict() |
651 | - |
652 | - # Remove members set to None |
653 | - matchdict=dict([(k,v) for k,v in matchdict.iteritems() if v]) |
654 | - |
655 | - matchkeys = set(matchdict.keys()) |
656 | - needstrip = set(["transref", "accnum", "statementnr", "custrefno", |
657 | - "bankref", "furtherinfo", "infoline1", "infoline2", "infoline3", |
658 | - "infoline4", "infoline5", "startingbalance", "endingbalance"]) |
659 | - for field in matchkeys & needstrip: |
660 | - matchdict[field] = matchdict[field].strip() |
661 | - |
662 | - # Convert to float. Comma is decimal separator |
663 | - needsfloat = set(["startingbalance", "endingbalance", "amount"]) |
664 | - for field in matchkeys & needsfloat: |
665 | - matchdict[field] = float(matchdict[field].replace(',','.')) |
666 | - |
667 | - # Convert date fields |
668 | - needdate = set(["prevstmtdate", "valuedate", "bookingdate"]) |
669 | - for field in matchkeys & needdate: |
670 | - datestring = matchdict[field] |
671 | - |
672 | - post_check = False |
673 | - if len(datestring) == 4 and field=="bookingdate" and matchdict.has_key("valuedate"): |
674 | - # Get year from valuedate |
675 | - datestring = matchdict['valuedate'].strftime('%y') + datestring |
676 | - post_check = True |
677 | - try: |
678 | - matchdict[field] = datetime.strptime(datestring,'%y%m%d') |
679 | - if post_check and matchdict[field] > matchdict["valuedate"]: |
680 | - matchdict[field]=matchdict[field].replace(year=matchdict[field].year-1) |
681 | - except ValueError: |
682 | - matchdict[field] = None |
683 | - |
684 | - return matchdict |
685 | - |
686 | - def parse(self, cr, data): |
687 | - records = [] |
688 | - # Some records are multiline |
689 | - for line in data: |
690 | - if len(line) <= 1: |
691 | - continue |
692 | - if line[0] == ':' and len(line) > 1: |
693 | - records.append(line) |
694 | - else: |
695 | - records[-1] = '\n'.join([records[-1], line]) |
696 | - |
697 | - output = [] |
698 | - for rec in records: |
699 | - output.append(self.parse_record(rec)) |
700 | - |
701 | - return output |
702 | - |
703 | -def parse_file(filename): |
704 | - bacfile = open(filename, "r") |
705 | - p = BACParser().parse(bacfile.readlines()) |
706 | - |
707 | -def main(): |
708 | - """The main function, currently just calls a dummy filename |
709 | - |
710 | - :returns: description |
711 | - """ |
712 | - parse_file("testfile") |
713 | - |
714 | -if __name__ == '__main__': |
715 | - main() |
716 | |
717 | === added directory 'l10n_cr_account_banking_cr_bcr' |
718 | === renamed directory 'l10n_cr_account_banking_cr_bcr' => 'l10n_cr_account_banking_cr_bcr.moved' |
719 | === added file 'l10n_cr_account_banking_cr_bcr/__init__.py' |
720 | --- l10n_cr_account_banking_cr_bcr/__init__.py 1970-01-01 00:00:00 +0000 |
721 | +++ l10n_cr_account_banking_cr_bcr/__init__.py 2013-12-06 21:45:38 +0000 |
722 | @@ -0,0 +1,24 @@ |
723 | +# -*- encoding: utf-8 -*- |
724 | +############################################################################## |
725 | +# |
726 | +# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
727 | +# All Rights Reserved |
728 | +# |
729 | +# This program is free software: you can redistribute it and/or modify |
730 | +# it under the terms of the GNU Affero General Public License as |
731 | +# published by the Free Software Foundation, either version 3 of the |
732 | +# License, or (at your option) any later version. |
733 | +# |
734 | +# This program is distributed in the hope that it will be useful, |
735 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
736 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
737 | +# GNU Affero General Public License for more details. |
738 | +# |
739 | +# You should have received a copy of the GNU Affero General Public License |
740 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
741 | +# |
742 | +############################################################################## |
743 | + |
744 | +import bcr_format |
745 | + |
746 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
747 | |
748 | === removed file 'l10n_cr_account_banking_cr_bcr/__init__.py' |
749 | --- l10n_cr_account_banking_cr_bcr/__init__.py 2013-03-14 15:57:05 +0000 |
750 | +++ l10n_cr_account_banking_cr_bcr/__init__.py 1970-01-01 00:00:00 +0000 |
751 | @@ -1,24 +0,0 @@ |
752 | -# -*- encoding: utf-8 -*- |
753 | -############################################################################## |
754 | -# |
755 | -# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
756 | -# All Rights Reserved |
757 | -# |
758 | -# This program is free software: you can redistribute it and/or modify |
759 | -# it under the terms of the GNU Affero General Public License as |
760 | -# published by the Free Software Foundation, either version 3 of the |
761 | -# License, or (at your option) any later version. |
762 | -# |
763 | -# This program is distributed in the hope that it will be useful, |
764 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
765 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
766 | -# GNU Affero General Public License for more details. |
767 | -# |
768 | -# You should have received a copy of the GNU Affero General Public License |
769 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
770 | -# |
771 | -############################################################################## |
772 | - |
773 | -import bcr_format |
774 | - |
775 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
776 | |
777 | === added file 'l10n_cr_account_banking_cr_bcr/__openerp__.py' |
778 | --- l10n_cr_account_banking_cr_bcr/__openerp__.py 1970-01-01 00:00:00 +0000 |
779 | +++ l10n_cr_account_banking_cr_bcr/__openerp__.py 2013-12-06 21:45:38 +0000 |
780 | @@ -0,0 +1,39 @@ |
781 | +# -*- coding: utf-8 -*- |
782 | +############################################################################## |
783 | +# |
784 | +# OpenERP, Open Source Management Solution |
785 | +# Addons modules by CLEARCORP S.A. |
786 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
787 | +# |
788 | +# This program is free software: you can redistribute it and/or modify |
789 | +# it under the terms of the GNU Affero General Public License as |
790 | +# published by the Free Software Foundation, either version 3 of the |
791 | +# License, or (at your option) any later version. |
792 | +# |
793 | +# This program is distributed in the hope that it will be useful, |
794 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
795 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
796 | +# GNU Affero General Public License for more details. |
797 | +# |
798 | +# You should have received a copy of the GNU Affero General Public License |
799 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
800 | +# |
801 | +############################################################################## |
802 | + |
803 | +{ |
804 | + 'name': 'BCR Account Banking', |
805 | + 'version': '0.1', |
806 | + 'license': 'AGPL-3', |
807 | + 'author': 'CLEARCORP S.A.', |
808 | + 'website': 'http://www.clearcorp.co.cr', |
809 | + 'category': 'Accounting & Finance', |
810 | + 'depends': [ |
811 | + 'account_banking_ccorp', |
812 | + ], |
813 | + 'init_xml': [], |
814 | + 'update_xml': [], |
815 | + 'demo_xml': [], |
816 | + 'description': '', |
817 | + 'active': False, |
818 | + 'installable': True, |
819 | +} |
820 | |
821 | === added file 'l10n_cr_account_banking_cr_bcr/bcr_format.py' |
822 | --- l10n_cr_account_banking_cr_bcr/bcr_format.py 1970-01-01 00:00:00 +0000 |
823 | +++ l10n_cr_account_banking_cr_bcr/bcr_format.py 2013-12-06 21:45:38 +0000 |
824 | @@ -0,0 +1,181 @@ |
825 | +# -*- coding: utf-8 -*- |
826 | +############################################################################## |
827 | +# |
828 | +# OpenERP, Open Source Management Solution |
829 | +# Addons modules by CLEARCORP S.A. |
830 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
831 | +# |
832 | +# This program is free software: you can redistribute it and/or modify |
833 | +# it under the terms of the GNU Affero General Public License as |
834 | +# published by the Free Software Foundation, either version 3 of the |
835 | +# License, or (at your option) any later version. |
836 | +# |
837 | +# This program is distributed in the hope that it will be useful, |
838 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
839 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
840 | +# GNU Affero General Public License for more details. |
841 | +# |
842 | +# You should have received a copy of the GNU Affero General Public License |
843 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
844 | +# |
845 | +############################################################################## |
846 | + |
847 | +from account_banking_ccorp.parsers import models |
848 | +from openerp.tools.translate import _ |
849 | +from bcr_parser import BCRParser |
850 | +import re |
851 | +from openerp.osv import osv, fields |
852 | +import logging |
853 | +import pprint |
854 | +from datetime import datetime |
855 | +import base64 |
856 | + |
857 | +bt = models.mem_bank_transaction |
858 | +logger = logging.getLogger( 'bcr_mt940' ) |
859 | + |
860 | +def record2float(record, value): |
861 | + if record == 'C': |
862 | + return float (value) |
863 | + else: |
864 | + return -float(value) |
865 | + |
866 | +class transaction(models.mem_bank_transaction): |
867 | + |
868 | + mapping = { |
869 | + 'execution_date' : '', |
870 | + 'effective_date' : '', |
871 | + 'local_currency' : '', |
872 | + 'transfer_type' : '', |
873 | + 'reference' : '', |
874 | + 'message' : '', |
875 | + 'name' : '', |
876 | + 'amount': '', |
877 | + 'creditmarker': '', |
878 | + } |
879 | + |
880 | + def __init__(self, record, *args, **kwargs): |
881 | + |
882 | + ''' |
883 | + Transaction creation |
884 | + ''' |
885 | + super(transaction, self).__init__(*args, **kwargs) |
886 | + #for r in record: |
887 | + for key, value in record.iteritems(): |
888 | + if record.has_key(key): |
889 | + setattr(self, key, record[key]) |
890 | + |
891 | + if not self.is_valid(): |
892 | + logger.info("Invalid: %s", record) |
893 | + |
894 | + def is_valid(self): |
895 | + ''' |
896 | + We don't have remote_account so override base |
897 | + ''' |
898 | + return (self.execution_date |
899 | + and self.transferred_amount and True) or False |
900 | + |
901 | +class statement(models.mem_bank_statement): |
902 | + ''' |
903 | + Bank statement imported data ''' |
904 | + |
905 | + def _transmission_number(self, record): |
906 | + self.id = record['transref'] |
907 | + |
908 | + def _account_number(self, record): |
909 | + self.local_account = record['account_number'] |
910 | + |
911 | + def _statement_number(self, record): |
912 | + self.id = record['id'] |
913 | + |
914 | + def _opening_balance(self, record): |
915 | + self.start_balance = float(record['startingbalance']) |
916 | + self.local_currency = record['currencycode'] |
917 | + |
918 | + def _closing_balance(self, record): |
919 | + self.end_balance = float(record['endingbalance']) |
920 | + self.date = record['bookingdate'] |
921 | + |
922 | + def _transaction_new(self, record): |
923 | + parser = BCRParser() |
924 | + sub_record = parser.statement_lines(record) #dictionary |
925 | + for sub in sub_record: |
926 | + self.transactions.append(transaction(sub)) |
927 | + |
928 | + def _not_used(): |
929 | + logger.info("Didn't use record: %s", record) |
930 | + |
931 | + def _forward_available(self, record): |
932 | + self.end_balance = float(record['endingbalance']) |
933 | + self.date = record['bookingdate'] |
934 | + |
935 | + def _execution_date_transferred_amount (self, record): |
936 | + self.execution_date = record['bookingdate'] |
937 | + self.transferred_amount = float(record['ammount']) |
938 | + |
939 | + def transaction_info(self, record): |
940 | + ''' |
941 | + Add extra information to transaction |
942 | + ''' |
943 | + # Additional information for previous transaction |
944 | + if len(self.transactions) < 1: |
945 | + logger.info("Received additional information for non existent transaction:") |
946 | + logger.info(record) |
947 | + else: |
948 | + transaction = self.transactions[-1] |
949 | + transaction.id = ','.join([record[k] for k in ['infoline{0}'.format(i) for i in range(2,5)] if record.has_key(k)]) |
950 | + |
951 | +def raise_error(message, line): |
952 | + raise osv.osv.except_osv(_('Import error'), |
953 | + 'Error in import:%s\n\n%s' % (message, line)) |
954 | + |
955 | +class parser_bcr_mt940( models.parser ): |
956 | + code = 'BCR-MT940' |
957 | + name = _( 'BCR statement import' ) |
958 | + country_code = 'CR' |
959 | + doc = _('''\ |
960 | + This format is available through |
961 | + the BCR web interface. |
962 | + ''') |
963 | + |
964 | + def parse(self, cr, statements_file, **kwargs): |
965 | + |
966 | + ''' |
967 | + ** Kwargs parameter is used for a dynamic list of parameters. |
968 | + The wizard imported extracts used in all parsers and not all parsers have all the necessary information in your file, |
969 | + so get information from the wizard and passed by the ** kwargs. |
970 | + Then in the parses that are needed, are extracted from the ** kwargs and if needed, |
971 | + the parser still works the same way without this parameter. |
972 | + |
973 | + The rest of the methods must receive this parameter. (As the method that parse the header and the lines). |
974 | + ''' |
975 | + |
976 | + result = [] |
977 | + parser = BCRParser() |
978 | + stmnt = statement() |
979 | + |
980 | + """ |
981 | + **kwargs have all the parameters that have the wizard and |
982 | + has all the parameters passed from the wizard before calling |
983 | + the method that parses the file. |
984 | + """ |
985 | + |
986 | + #pass to encoding with the correct type of file. |
987 | + data = base64.decodestring(statements_file) |
988 | + |
989 | + records = parser.parse_stamenent_record(data,**kwargs) |
990 | + |
991 | + stmnt._transmission_number(records) |
992 | + stmnt._account_number(records) |
993 | + stmnt._statement_number(records) |
994 | + stmnt._opening_balance(records) |
995 | + stmnt._closing_balance(records) |
996 | + stmnt._forward_available(records) |
997 | + stmnt._execution_date_transferred_amount (records) |
998 | + stmnt._transaction_new(data) |
999 | + |
1000 | + if stmnt.is_valid(): |
1001 | + result.append(stmnt) |
1002 | + |
1003 | + return result |
1004 | + |
1005 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1006 | |
1007 | === added file 'l10n_cr_account_banking_cr_bcr/bcr_parser.py' |
1008 | --- l10n_cr_account_banking_cr_bcr/bcr_parser.py 1970-01-01 00:00:00 +0000 |
1009 | +++ l10n_cr_account_banking_cr_bcr/bcr_parser.py 2013-12-06 21:45:38 +0000 |
1010 | @@ -0,0 +1,572 @@ |
1011 | +# -*- coding: utf-8 -*- |
1012 | +############################################################################## |
1013 | +# |
1014 | +# OpenERP, Open Source Management Solution |
1015 | +# Addons modules by CLEARCORP S.A. |
1016 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
1017 | +# |
1018 | +# This program is free software: you can redistribute it and/or modify |
1019 | +# it under the terms of the GNU Affero General Public License as |
1020 | +# published by the Free Software Foundation, either version 3 of the |
1021 | +# License, or (at your option) any later version. |
1022 | +# |
1023 | +# This program is distributed in the hope that it will be useful, |
1024 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1025 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1026 | +# GNU Affero General Public License for more details. |
1027 | +# |
1028 | +# You should have received a copy of the GNU Affero General Public License |
1029 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1030 | +# |
1031 | +############################################################################## |
1032 | +""" |
1033 | +Parser for BCR format files |
1034 | +""" |
1035 | +import re |
1036 | +from datetime import datetime |
1037 | +from dateutil import parser |
1038 | +from pprint import PrettyPrinter |
1039 | +from copy import copy |
1040 | +from openerp.tools.translate import _ |
1041 | +from openerp.osv import osv, fields |
1042 | + |
1043 | +class BCRParser( object ): |
1044 | + """ |
1045 | + Para noviembre de 2012 se cambia el formato del archivo del BCR. Se cambia el encabezado del archivo |
1046 | + así como el final del mismo. Además en la parte de abajo cambia el formato y visualización de los |
1047 | + saldos finales. |
1048 | + |
1049 | + El cambio más evidente es el formato de la cuenta de banco, pasa de 1-246447-0 a 001-0246447-0 |
1050 | + Revisión # 1 Revisión#2 |
1051 | + Encabezado anterior: Encabezado nuevo |
1052 | + BANCO DE COSTA RICA BANCO DE COSTA RICA |
1053 | + Movimiento de Cuenta Corriente 1-246447-0 Colones (puede ser Dólares o Dolares) MOVIMIENTO DE LA CUENTA CORRIENTE No. 001-0246447-0 COLONES (DOLARES) |
1054 | + Dueño: COMPA IA INMOBILIARIA CENTROA DUENO: COMPA IA INMOBILIARIA CENTROAMERICANA CICCR S |
1055 | + Movimiento realizado el periodo del 01-10-2012 al 31-10-2012 MOVIMIENTO REALIZADO DEL 01-11-2012 AL 30-11-2012 |
1056 | + |
1057 | + Final de archivo |
1058 | + Revisión # 1 Revisión #2 |
1059 | + TOTALES DEL MOVIMIENTO CONTABILIZADO TOTALES DEL MOVIMIENTO CONTABILIZADO |
1060 | + Cantidad -------Monto-------- CANTIDAD -------MONTO-------- |
1061 | + Débitos 239 81,876,681.22 DEBITOS 209 67,553,414.30 |
1062 | + Créditos 27 92,636,599.01 CREDITOS 8 66,086,326.53 |
1063 | + |
1064 | + Saldo Inicial 21,682,799.04 -------- SALDOS -------- |
1065 | + Saldo Final 33,992,829.43 INICIAL 33,992,829.43 |
1066 | + FINAL 32,525,741.66 |
1067 | + Solicitado el 01/11/2012 20:03:34 SOLICITADO EL 01-12-2012 A LAS 15:36:15:17 |
1068 | + """ |
1069 | + def statement_record ( self, rec, **kwargs): |
1070 | + lines = [] |
1071 | + line_dict = {} |
1072 | + |
1073 | + line_dict = { |
1074 | + 'transref': 0.0, # _transmission_number |
1075 | + 'account_number': '', #_account_number |
1076 | + 'statementnr':'', # statement_number |
1077 | + 'startingbalance': 0.0, #_opening_balance |
1078 | + 'currencycode': 'CRC', #currencycode |
1079 | + 'endingbalance': 0.0, #_closing_balance |
1080 | + 'bookingdate': '', #moving_date |
1081 | + 'ammount': 0.0, |
1082 | + 'id': '', |
1083 | + } |
1084 | + |
1085 | + cad = '' |
1086 | + list_split = rec.split('\r\n') |
1087 | + account_number_wizard = kwargs['account_number'] |
1088 | + |
1089 | + #If return True, the account are the same. |
1090 | + if self.match_account(list_split, account_number_wizard): |
1091 | + for l in list_split: |
1092 | + #_account_number -> FIRST REVISION |
1093 | + if l.find('Movimiento de Cuenta Corriente', 0, len('Movimiento de Cuenta Corriente')) > -1: |
1094 | + line_dict['account_number'] = self.extract_number(l) |
1095 | + |
1096 | + if (l.find('D',0,len(l)) > -1): |
1097 | + line_dict['currencycode'] = 'USD' |
1098 | + else: |
1099 | + line_dict['currencycode'] = 'CRC' |
1100 | + |
1101 | + #_account_number -> SECOND REVISION |
1102 | + elif (l.find('MOVIMIENTO DE LA CUENTA CORRIENTE No.', 0, len('MOVIMIENTO DE LA CUENTA CORRIENTE No.')) > -1): |
1103 | + #account_str = self.extract_number(l) |
1104 | + #001-0246447-0 |
1105 | + #account_1 = account_str[2:3] #1 |
1106 | + #account_2 = account_str[4:] #246447-0 |
1107 | + #account_complete = account_1+self.extract_number(account_2)#12464470 |
1108 | + #line_dict['account_number'] = self.extract_number(account_complete) |
1109 | + line_dict['account_number'] = self.extract_accnumber(l) |
1110 | + if (l.find('DOLARES',0,len(l)) > -1): |
1111 | + line_dict['currencycode'] = 'USD' |
1112 | + else: |
1113 | + line_dict['currencycode'] = 'CRC' |
1114 | + |
1115 | + # _transmission_number -> FIRST REVISION |
1116 | + if (l.find('Movimiento realizado el periodo', 0, len('Movimiento realizado el periodo')) > -1): |
1117 | + line_dict['statementnr'] = self.extract_number(l) |
1118 | + date_1 = self.extract_date_regular_expresion_line_format_2(l,0) |
1119 | + date_2 = self.extract_date_regular_expresion_line_format_2(l,1) |
1120 | + |
1121 | + # _transmission_number -> SECOND REVISION |
1122 | + elif (l.find('MOVIMIENTO REALIZADO', 0, len('MOVIMIENTO REALIZADO')) > -1): |
1123 | + line_dict['statementnr'] = self.extract_number(l) |
1124 | + date_1 = self.extract_date_regular_expresion_line_format_2(l,0) |
1125 | + date_2 = self.extract_date_regular_expresion_line_format_2(l,1) |
1126 | + |
1127 | + #date and hour -> FIRST REVISION |
1128 | + if (l.find('Solicitado el', 0, len('Solicitado el')) > -1): |
1129 | + date = hour = cad = '' |
1130 | + date = self.extract_date_regular_expresion(l) |
1131 | + if len(date) > 0: |
1132 | + hour = self.extract_hour_regular_expresion(l) |
1133 | + cad = date + ' ' + hour |
1134 | + line_dict['transref'] = cad |
1135 | + line_dict['bookingdate'] = cad |
1136 | + |
1137 | + #date and hour -> SECOND REVISION |
1138 | + elif (l.find('SOLICITADO EL', 0, len('SOLICITADO EL')) > -1): |
1139 | + date = hour = cad = '' |
1140 | + date = self.extract_date_regular_expresion(l) |
1141 | + if len(date) > 0: |
1142 | + hour = self.extract_hour_regular_expresion(l) |
1143 | + cad = date + ' ' + hour |
1144 | + line_dict['transref'] = cad |
1145 | + line_dict['bookingdate'] = cad |
1146 | + |
1147 | + #_opening_balance -> FIRST REVISION |
1148 | + if l.find('Saldo Inicial', 0, len('Saldo Inicial')) > -1: |
1149 | + line_dict['startingbalance'] = self.extract_float(l) |
1150 | + #_opening_balance -> SECOND REVISION |
1151 | + elif l.find('INICIAL', 0, len('INICIAL')) > -1: |
1152 | + line_dict['startingbalance'] = self.extract_float(l) |
1153 | + |
1154 | + #_closing_balance -> FIRST REVISION |
1155 | + if l.find('DISPONIBLE', 0, len('DISPONIBLE')) > -1: |
1156 | + line_dict['endingbalance'] = self.extract_float(l) |
1157 | + |
1158 | + #_closing_balance -> SECOND REVISION |
1159 | + elif l.find('Saldo Final', 0, len('Saldo Final')) > -1: |
1160 | + line_dict['endingbalance'] = self.extract_float(l) |
1161 | + |
1162 | + line_dict['ammount'] = float( line_dict['startingbalance'] ) + float( line_dict['endingbalance'] ) |
1163 | + line_dict['id'] = date_1 + ' - ' + date_2 + ' Extracto BCR ' + line_dict['account_number'] |
1164 | + self.line_dict = line_dict |
1165 | + |
1166 | + return line_dict |
1167 | + |
1168 | + else: |
1169 | + raise osv.except_osv(_('Error'), |
1170 | + _('Error en la importacion! La cuenta especificada en el archivo no coincide con la seleccionada en el asistente de importacion')) |
1171 | + |
1172 | + def statement_lines ( self, rec): |
1173 | + parser = BCRParser() |
1174 | + mapping = { |
1175 | + 'execution_date' : '', |
1176 | + 'effective_date' : '', |
1177 | + 'local_currency' : '', |
1178 | + 'transfer_type' : '', |
1179 | + 'reference' : '', |
1180 | + 'message' : '', |
1181 | + 'name' : '', |
1182 | + 'transferred_amount': '', |
1183 | + 'creditmarker': '', |
1184 | + } |
1185 | + line_dict = {} |
1186 | + currencycode = '' |
1187 | + |
1188 | + list_split = rec.split('\r\n') |
1189 | + entrada = False |
1190 | + start = 0 |
1191 | + end = 0 |
1192 | + version = 'none' |
1193 | + |
1194 | + #========= Start and end of lines ======# |
1195 | + for l in list_split: |
1196 | + if l.find('TOTALES DEL MOVIMIENTO CONTABILIZADO', 0, len('TOTALES DEL MOVIMIENTO CONTABILIZADO')) <= -1: |
1197 | + end += 1 |
1198 | + else: |
1199 | + break |
1200 | + end = end - 1 |
1201 | + |
1202 | + for l in list_split: |
1203 | + if l.find('-CONTABLE-', 0, len('-CONTABLE-')) <= -1: |
1204 | + start += 1 |
1205 | + else: |
1206 | + break |
1207 | + start += 1 |
1208 | + |
1209 | + for l in list_split: |
1210 | + if l.find('Movimiento de Cuenta Corriente', 0, len('Movimiento de Cuenta Corriente')) > -1: |
1211 | + if (l.find('D',0,len(l)) > -1): |
1212 | + currencycode = 'USD' |
1213 | + else: |
1214 | + currencycode = 'CRC' |
1215 | + break |
1216 | + |
1217 | + elif l.find('MOVIMIENTO DE LA CUENTA CORRIENTE No.', 0, len('MOVIMIENTO DE LA CUENTA CORRIENTE No.')) > -1: |
1218 | + if (l.find('DOLARES',0,len(l)) > -1): |
1219 | + currencycode = 'USD' |
1220 | + else: |
1221 | + currencycode = 'CRC' |
1222 | + break |
1223 | + |
1224 | + #========= VERSION OF THREE COLUMNS FOR DEBIT AND CREDIT =============# |
1225 | + sub_list = list_split [start:end] |
1226 | + |
1227 | + if len(sub_list) > 0: |
1228 | + sub_first = sub_list[0] #Based in first line, decide which version it is |
1229 | + |
1230 | + #1. Try separate by tab ('\t') (last version) (fields must have, at least, more than 1 of length) |
1231 | + fields = sub_first.split('\t') |
1232 | + |
1233 | + if len(fields) > 1: |
1234 | + version = 'third_version' |
1235 | + |
1236 | + #2. Find where start debit and credit columns |
1237 | + else: |
1238 | + amount = sub_first[106:] |
1239 | + debit = amount[0:16] |
1240 | + |
1241 | + debit = debit.replace(',','') |
1242 | + debit = debit.replace('.','') |
1243 | + debit = re.sub(r'\s', '', debit) |
1244 | + |
1245 | + if re.match('^[0-9,.]*$', debit): |
1246 | + version = 'first_version' |
1247 | + |
1248 | + else: |
1249 | + amount = sub_first[120:] |
1250 | + debit = amount[0:40] |
1251 | + |
1252 | + debit = debit.replace(',','') |
1253 | + debit = debit.replace('.','') |
1254 | + debit = re.sub(r'\s', '', debit) |
1255 | + |
1256 | + if re.match('^[0-9,.]*$', debit): |
1257 | + version = 'second_version' |
1258 | + |
1259 | + #=====================================================================# |
1260 | + |
1261 | + if version != 'none': |
1262 | + if version =='first_version': |
1263 | + return self.first_version_file(sub_list,mapping,currencycode,parser) |
1264 | + |
1265 | + elif version == 'second_version': |
1266 | + return self.second_version(sub_list,mapping,currencycode,parser) |
1267 | + |
1268 | + elif version == 'third_version': |
1269 | + return self.third_version(sub_list,mapping,currencycode,parser) |
1270 | + |
1271 | + else: |
1272 | + raise osv.except_osv(_('Error'), |
1273 | + _('There is not format implementend for this file.')) |
1274 | + |
1275 | + else: |
1276 | + return [] |
1277 | + |
1278 | + def parse_stamenent_record( self, rec, **kwargs): |
1279 | + |
1280 | + matchdict = dict() |
1281 | + |
1282 | + matchdict = self.statement_record( rec, **kwargs ); |
1283 | + |
1284 | + # Remove members set to None |
1285 | + matchdict = dict( [( k, v ) for k, v in matchdict.iteritems() if v] ) |
1286 | + |
1287 | + matchkeys = set( matchdict.keys() ) |
1288 | + needstrip = set( [ 'transref', 'account_number', 'statementnr', 'currencycode', 'endingbalance', 'bookingdate'] ) |
1289 | + |
1290 | + for field in matchkeys & needstrip: |
1291 | + matchdict[field] = matchdict[field].strip() |
1292 | + |
1293 | + # Convert to float. Comma is decimal separator |
1294 | + needsfloat = set( ["startingbalance", "endingbalance", "amount"] ) |
1295 | + for field in matchkeys & needsfloat: |
1296 | + matchdict[field] = float( matchdict[field].replace( ',', '.' ) ) |
1297 | + |
1298 | + # Convert date fields |
1299 | + needdate = set( ["bookingdate"] ) |
1300 | + |
1301 | + for field in matchkeys & needdate: |
1302 | + datestring = matchdict[field] |
1303 | + date = self.extract_date_regular_expresion(datestring) |
1304 | + hour = self.extract_hour_regular_expresion(datestring) |
1305 | + |
1306 | + date_complete = date + ' ' + hour |
1307 | + try: |
1308 | + #FORMAT DATE REVISION # 1 |
1309 | + date_obj= datetime.strptime(date_complete, "%d/%m/%Y %H:%M:%S") |
1310 | + except: |
1311 | + #FORMAT DATE REVISION # 2 |
1312 | + date_obj= datetime.strptime(date_complete, "%d-%m-%Y %H:%M:%S") |
1313 | + matchdict[field] = date_obj |
1314 | + |
1315 | + return matchdict |
1316 | + |
1317 | + #=============================Auxiliary methods =============================# |
1318 | + |
1319 | + #=====================Versions of file |
1320 | + |
1321 | + def first_version_file(self, sub_list,mapping,currencycode,parser): |
1322 | + lines = [] |
1323 | + for sub in sub_list: |
1324 | + #effective_date |
1325 | + date_str = '' |
1326 | + date_str = self.extract_date_regular_expresion_line(sub,0) |
1327 | + date= datetime.strptime(date_str, "%d-%m-%y") |
1328 | + mapping['effective_date'] = date #fecha_contable. |
1329 | + |
1330 | + #execution_date |
1331 | + date_str = self.extract_date_regular_expresion_line(sub,1) |
1332 | + date = datetime.strptime(date_str, "%d-%m-%y") |
1333 | + mapping['execution_date'] = date #fecha_movimiento |
1334 | + |
1335 | + mapping['local_currency'] = currencycode |
1336 | + mapping['transfer_type'] = 'NTRF' |
1337 | + mapping['reference'] = parser.extract_number(sub[18:26]) |
1338 | + mapping['message'] = sub[27:80] |
1339 | + mapping['name'] = sub[27:80] |
1340 | + mapping['id'] = sub[27:80] |
1341 | + |
1342 | + amount = sub[106:] |
1343 | + amount.replace('\t',' ') |
1344 | + debit = amount[0:16] |
1345 | + credit = amount[16:] |
1346 | + |
1347 | + if (parser.extract_float(debit) is not ''): #debit |
1348 | + cad = parser.extract_float(debit) |
1349 | + mapping['transferred_amount'] = -float(cad) |
1350 | + mapping['creditmarker'] = 'C' |
1351 | + |
1352 | + else: #credit |
1353 | + cad = parser.extract_float (credit) |
1354 | + mapping['transferred_amount'] = float(cad) |
1355 | + |
1356 | + lines.append(copy(mapping)) |
1357 | + |
1358 | + return lines |
1359 | + |
1360 | + def second_version (self, sub_list,mapping,currencycode,parser): |
1361 | + lines = [] |
1362 | + for sub in sub_list: |
1363 | + #effective_date |
1364 | + date_str = '' |
1365 | + date_str = self.extract_date_regular_expresion_line(sub,0) |
1366 | + date= datetime.strptime(date_str, "%d-%m-%y") |
1367 | + mapping['effective_date'] = date #fecha_contable. |
1368 | + |
1369 | + #execution_date |
1370 | + date_str = self.extract_date_regular_expresion_line(sub,1) |
1371 | + date = datetime.strptime(date_str, "%d-%m-%y") |
1372 | + mapping['execution_date'] = date #fecha_movimiento |
1373 | + |
1374 | + mapping['local_currency'] = currencycode |
1375 | + mapping['transfer_type'] = 'NTRF' |
1376 | + mapping['reference'] = parser.extract_number(sub[18:26]) |
1377 | + mapping['message'] = sub[27:80] |
1378 | + mapping['name'] = sub[27:80] |
1379 | + mapping['id'] = sub[27:80] |
1380 | + |
1381 | + amount = sub[120:] |
1382 | + amount.replace('\t',' ') |
1383 | + debit = amount[0:40] |
1384 | + credit = amount[40:] |
1385 | + |
1386 | + if (parser.extract_float(debit) is not ''): #debit |
1387 | + cad = parser.extract_float(debit) |
1388 | + mapping['transferred_amount'] = -float(cad) |
1389 | + mapping['creditmarker'] = 'C' |
1390 | + |
1391 | + else: #credit |
1392 | + cad = parser.extract_float (credit) |
1393 | + mapping['transferred_amount'] = float(cad) |
1394 | + |
1395 | + lines.append(copy(mapping)) |
1396 | + |
1397 | + return lines |
1398 | + |
1399 | + def third_version(self, sub_list,mapping,currencycode,parser): |
1400 | + lines = [] |
1401 | + for l in sub_list: |
1402 | + fields = l.split('\t') |
1403 | + |
1404 | + #effective_date |
1405 | + date_str = fields[0] |
1406 | + date= datetime.strptime(date_str, "%d-%m-%y") |
1407 | + mapping['effective_date'] = date #fecha_contable. |
1408 | + |
1409 | + #execution_date |
1410 | + date_str = fields[1] |
1411 | + date = datetime.strptime(date_str, "%d-%m-%y") |
1412 | + mapping['execution_date'] = date #fecha_movimiento |
1413 | + |
1414 | + mapping['local_currency'] = currencycode |
1415 | + mapping['transfer_type'] = 'NTRF' |
1416 | + mapping['reference'] = parser.extract_number(fields[2]) |
1417 | + mapping['message'] = fields[3] |
1418 | + mapping['name'] = fields[3] |
1419 | + mapping['id'] = fields[3] |
1420 | + |
1421 | + #Extract debit and credit |
1422 | + debit = fields[5] |
1423 | + if (parser.extract_float(debit) is not ''): #debit |
1424 | + cad = parser.extract_float(debit) |
1425 | + mapping['transferred_amount'] = -float(cad) |
1426 | + mapping['creditmarker'] = 'C' |
1427 | + |
1428 | + else: #credit |
1429 | + credit = fields[6] |
1430 | + cad = parser.extract_float(credit) |
1431 | + mapping['transferred_amount'] = float(cad) |
1432 | + |
1433 | + lines.append(copy(mapping)) |
1434 | + |
1435 | + return lines |
1436 | + |
1437 | + #=============================================================== |
1438 | + def extract_number( self, account_number ): |
1439 | + cad = '' |
1440 | + result = re.findall(r'[0-9]+', account_number) |
1441 | + |
1442 | + for character in result: |
1443 | + cad = cad + character |
1444 | + return cad |
1445 | + |
1446 | + def extract_accnumber(self, line): |
1447 | + cad = '' |
1448 | + result = re.findall(r'[0-9-]+', line) |
1449 | + |
1450 | + for character in result: |
1451 | + cad = cad + character |
1452 | + return cad |
1453 | + |
1454 | + |
1455 | + def extract_float ( self, amount ): |
1456 | + cad = '' |
1457 | + result = re.findall(r"[-+]?\d*\.\d+|\d+",amount) |
1458 | + |
1459 | + for character in result: |
1460 | + cad = cad + character |
1461 | + return cad |
1462 | + |
1463 | + def extract_date_regular_expresion(self, date): |
1464 | + cad = '' |
1465 | + result = [] |
1466 | + date_string = '' |
1467 | + #re.findall('[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}',str)[0]+' '+re.findall('[0-9]{2}:[0-9]{2}:[0-9]{2}',str)[0] |
1468 | + #FORMAT DATE FIRST REVISION |
1469 | + result = re.findall('[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}', date) |
1470 | + |
1471 | + if len(result) == 0: |
1472 | + #FORMAT DATE SECOND REVISION |
1473 | + result = re.findall('[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}',date) |
1474 | + |
1475 | + for character in result: |
1476 | + cad = cad + character |
1477 | + return cad |
1478 | + |
1479 | + #with the pos parameter is said which of the two dates must be brought |
1480 | + #result brings a list of two elements, the post tells us to choose |
1481 | + def extract_date_regular_expresion_line(self, date, pos): |
1482 | + cad = '' |
1483 | + result = [] |
1484 | + date_string = '' |
1485 | + result = re.findall('([0-9]{2}-[0-9]{2}-[0-9]{2})[\s]*',date) |
1486 | + date_str = result[pos] |
1487 | + |
1488 | + for character in date_str: |
1489 | + cad = cad + character |
1490 | + return cad |
1491 | + |
1492 | + #with the pos parameter is said which of the two dates must be brought |
1493 | + #result brings a list of two elements, the post tells us to choose |
1494 | + def extract_date_regular_expresion_line_format_2(self, date, pos): |
1495 | + cad = '' |
1496 | + result = [] |
1497 | + date_string = '' |
1498 | + result = re.findall('([0-9]{2}-[0-9]{2}-[0-9]{4})[\s]*',date) |
1499 | + date_str = result[pos] |
1500 | + |
1501 | + for character in date_str: |
1502 | + cad = cad + character |
1503 | + return cad |
1504 | + |
1505 | + def extract_hour_regular_expresion(self, date): |
1506 | + cad = '' |
1507 | + result = [] |
1508 | + |
1509 | + result = re.findall('[0-9]{2}:[0-9]{2}:[0-9]{2}',date) |
1510 | + |
1511 | + for character in result: |
1512 | + cad = cad + character |
1513 | + return cad |
1514 | + |
1515 | + def extract_currency_code_USD(self, currency): |
1516 | + cad = '' |
1517 | + result = re.findall('[D.lares]',currency) |
1518 | + for character in result: |
1519 | + cad = cad + character |
1520 | + return cad |
1521 | + |
1522 | + def parse( self, cr, data ): |
1523 | + records = [] |
1524 | + # Some records are multiline |
1525 | + for line in data: |
1526 | + if len(line) <= 1: |
1527 | + continue |
1528 | + if line[0] == ':' and len(line) > 1: |
1529 | + records.append(line) |
1530 | + else: |
1531 | + records[-1] = '\n'.join([records[-1], line]) |
1532 | + |
1533 | + output = [] |
1534 | + |
1535 | + for rec in records: |
1536 | + output.append( self.parse_stamenent_record( rec ) ) |
1537 | + |
1538 | + return output |
1539 | + |
1540 | + #check if the account_number in the file match with the selected in the wizard. |
1541 | + def match_account(self, list_split, account_number_wizard): |
1542 | + accnumber = '' |
1543 | + for l in list_split: |
1544 | + #_account_number -> FIRST REVISION |
1545 | + if l.find('Movimiento de Cuenta Corriente', 0, len('Movimiento de Cuenta Corriente')) > -1: |
1546 | + accnumber = self.extract_number(l) |
1547 | + break |
1548 | + |
1549 | + #_account_number -> SECOND REVISION |
1550 | + elif (l.find('MOVIMIENTO DE LA CUENTA CORRIENTE No.', 0, len('MOVIMIENTO DE LA CUENTA CORRIENTE No.')) > -1): |
1551 | + #account_str = self.extract_number(l) |
1552 | + #001-0246447-0 |
1553 | + #account_1 = account_str[2:3] #1 |
1554 | + #account_2 = account_str[4:] #246447-0 |
1555 | + #account_complete = account_1+self.extract_number(account_2)#12464470 |
1556 | + #accnumber = self.extract_number(account_complete) |
1557 | + #changed the account number comparison not |
1558 | + #to remove 0's from acc number |
1559 | + accnumber = self.extract_number(l) |
1560 | + break |
1561 | + |
1562 | + #If return True, the account_number in the wizard and the account in the file are the same. |
1563 | + if accnumber.find(account_number_wizard) > -1: |
1564 | + return True |
1565 | + else: |
1566 | + return False |
1567 | + |
1568 | + |
1569 | +def parse_file( filename ): |
1570 | + bacfile = open( filename, "r" ) |
1571 | + p = BCRParser().parse(bacfile.readlines()) |
1572 | + |
1573 | +def main(): |
1574 | + """The main function, currently just calls a dummy filename |
1575 | + |
1576 | + :returns: description |
1577 | + """ |
1578 | + parse_file("testfile") |
1579 | + |
1580 | +if __name__ == '__main__': |
1581 | + main() |
1582 | + |
1583 | |
1584 | === added directory 'l10n_cr_account_banking_cr_bncr' |
1585 | === renamed directory 'l10n_cr_account_banking_cr_bncr' => 'l10n_cr_account_banking_cr_bncr.moved' |
1586 | === added file 'l10n_cr_account_banking_cr_bncr/__init__.py' |
1587 | --- l10n_cr_account_banking_cr_bncr/__init__.py 1970-01-01 00:00:00 +0000 |
1588 | +++ l10n_cr_account_banking_cr_bncr/__init__.py 2013-12-06 21:45:38 +0000 |
1589 | @@ -0,0 +1,24 @@ |
1590 | +# -*- encoding: utf-8 -*- |
1591 | +############################################################################## |
1592 | +# |
1593 | +# Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). |
1594 | +# All Rights Reserved |
1595 | +# |
1596 | +# This program is free software: you can redistribute it and/or modify |
1597 | +# it under the terms of the GNU Affero General Public License as |
1598 | +# published by the Free Software Foundation, either version 3 of the |
1599 | +# License, or (at your option) any later version. |
1600 | +# |
1601 | +# This program is distributed in the hope that it will be useful, |
1602 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1603 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1604 | +# GNU Affero General Public License for more details. |
1605 | +# |
1606 | +# You should have received a copy of the GNU Affero General Public License |
1607 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1608 | +# |
1609 | +############################################################################## |
1610 | + |
1611 | +import bncr_format |
1612 | + |
1613 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1614 | |
1615 | === added file 'l10n_cr_account_banking_cr_bncr/__openerp__.py' |
1616 | --- l10n_cr_account_banking_cr_bncr/__openerp__.py 1970-01-01 00:00:00 +0000 |
1617 | +++ l10n_cr_account_banking_cr_bncr/__openerp__.py 2013-12-06 21:45:38 +0000 |
1618 | @@ -0,0 +1,39 @@ |
1619 | +# -*- coding: utf-8 -*- |
1620 | +############################################################################## |
1621 | +# |
1622 | +# OpenERP, Open Source Management Solution |
1623 | +# Addons modules by CLEARCORP S.A. |
1624 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
1625 | +# |
1626 | +# This program is free software: you can redistribute it and/or modify |
1627 | +# it under the terms of the GNU Affero General Public License as |
1628 | +# published by the Free Software Foundation, either version 3 of the |
1629 | +# License, or (at your option) any later version. |
1630 | +# |
1631 | +# This program is distributed in the hope that it will be useful, |
1632 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1633 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1634 | +# GNU Affero General Public License for more details. |
1635 | +# |
1636 | +# You should have received a copy of the GNU Affero General Public License |
1637 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1638 | +# |
1639 | +############################################################################## |
1640 | + |
1641 | +{ |
1642 | + 'name': 'BNCR Account Banking', |
1643 | + 'version': '0.1', |
1644 | + 'license': 'AGPL-3', |
1645 | + 'author': 'CLEARCORP S.A.', |
1646 | + 'website': 'http://www.clearcorp.co.cr', |
1647 | + 'category': 'Accounting & Finance', |
1648 | + 'depends': [ |
1649 | + 'account_banking_ccorp', |
1650 | + ], |
1651 | + 'init_xml': [], |
1652 | + 'update_xml': [], |
1653 | + 'demo_xml': [], |
1654 | + 'description': '', |
1655 | + 'active': False, |
1656 | + 'installable': True, |
1657 | +} |
1658 | |
1659 | === added file 'l10n_cr_account_banking_cr_bncr/bncr_format.py' |
1660 | --- l10n_cr_account_banking_cr_bncr/bncr_format.py 1970-01-01 00:00:00 +0000 |
1661 | +++ l10n_cr_account_banking_cr_bncr/bncr_format.py 2013-12-06 21:45:38 +0000 |
1662 | @@ -0,0 +1,189 @@ |
1663 | +# -*- coding: utf-8 -*- |
1664 | +############################################################################## |
1665 | +# |
1666 | +# OpenERP, Open Source Management Solution |
1667 | +# Addons modules by CLEARCORP S.A. |
1668 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
1669 | +# |
1670 | +# This program is free software: you can redistribute it and/or modify |
1671 | +# it under the terms of the GNU Affero General Public License as |
1672 | +# published by the Free Software Foundation, either version 3 of the |
1673 | +# License, or (at your option) any later version. |
1674 | +# |
1675 | +# This program is distributed in the hope that it will be useful, |
1676 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1677 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1678 | +# GNU Affero General Public License for more details. |
1679 | +# |
1680 | +# You should have received a copy of the GNU Affero General Public License |
1681 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1682 | +# |
1683 | +############################################################################## |
1684 | + |
1685 | +from account_banking_ccorp.parsers import models |
1686 | +from openerp.tools.translate import _ |
1687 | +from bncr_parser import BNCRParser |
1688 | +import re |
1689 | +from openerp.osv import osv, fields |
1690 | +import logging |
1691 | +import pprint |
1692 | +from datetime import datetime |
1693 | +import base64 |
1694 | + |
1695 | +bt = models.mem_bank_transaction |
1696 | +logger = logging.getLogger( 'bncr_logger' ) |
1697 | + |
1698 | +class transaction(models.mem_bank_transaction): |
1699 | + |
1700 | + mapping = { |
1701 | + 'execution_date' : '', |
1702 | + 'effective_date' : '', |
1703 | + 'local_currency' : '', |
1704 | + 'transfer_type' : '', |
1705 | + 'reference' : '', |
1706 | + 'message' : '', |
1707 | + 'name' : '', |
1708 | + 'amount': '', |
1709 | + 'creditmarker': '', |
1710 | + } |
1711 | + |
1712 | + def __init__(self, record, *args, **kwargs): |
1713 | + |
1714 | + ''' |
1715 | + Transaction creation |
1716 | + ''' |
1717 | + #record is a dictionary, that is the reason to use iteritems(). |
1718 | + super(transaction, self).__init__(*args, **kwargs) |
1719 | + for key, value in record.iteritems(): |
1720 | + if record.has_key(key): |
1721 | + setattr(self, key, record[key]) |
1722 | + |
1723 | + if not self.is_valid(): |
1724 | + logger.info("Invalid: %s", record) |
1725 | + |
1726 | + def is_valid(self): |
1727 | + ''' |
1728 | + We don't have remote_account so override base |
1729 | + ''' |
1730 | + return (self.execution_date |
1731 | + and self.transferred_amount and True) or False |
1732 | + |
1733 | +class statement(models.mem_bank_statement): |
1734 | + ''' |
1735 | + Bank statement imported data ''' |
1736 | + |
1737 | + def _transmission_number(self, record): |
1738 | + self.id = record['transref'] |
1739 | + |
1740 | + def _account_number(self, record): |
1741 | + self.local_account = record['account_number'] |
1742 | + self.local_currency = record['currencycode'] |
1743 | + |
1744 | + def _statement_number(self, record): |
1745 | + self.id = record['id'] |
1746 | + |
1747 | + def _opening_balance(self, record): |
1748 | + self.start_balance = float(record['startingbalance']) |
1749 | + |
1750 | + def _closing_balance(self, record): |
1751 | + self.end_balance = float(record['endingbalance']) |
1752 | + self.date = record['bookingdate'] |
1753 | + |
1754 | + def _transaction_new(self, record): |
1755 | + parser = BNCRParser() |
1756 | + sub_record = parser.statement_lines(record) #dictionary |
1757 | + for sub in sub_record: |
1758 | + self.transactions.append(transaction(sub)) |
1759 | + |
1760 | + def _not_used(): |
1761 | + logger.info("Didn't use record: %s", record) |
1762 | + |
1763 | + def _forward_available(self, record): |
1764 | + self.end_balance = float(record['endingbalance']) |
1765 | + self.date = record['bookingdate'] |
1766 | + |
1767 | + def _execution_date_transferred_amount (self, record): |
1768 | + self.execution_date = record['bookingdate'] |
1769 | + self.transferred_amount = float(record['ammount']) |
1770 | + |
1771 | + def transaction_info(self, record): |
1772 | + ''' |
1773 | + Add extra information to transaction |
1774 | + ''' |
1775 | + # Additional information for previous transaction |
1776 | + if len(self.transactions) < 1: |
1777 | + logger.info("Received additional information for non existent transaction:") |
1778 | + logger.info(record) |
1779 | + else: |
1780 | + transaction = self.transactions[-1] |
1781 | + transaction.id = ','.join([record[k] for k in ['infoline{0}'.format(i) for i in range(2,5)] if record.has_key(k)]) |
1782 | + |
1783 | +def raise_error(message, line): |
1784 | + raise osv.osv.except_osv(_('Import error'), |
1785 | + 'Error in import:%s\n\n%s' % (message, line)) |
1786 | + |
1787 | +class parser_bncr( models.parser ): |
1788 | + |
1789 | + ''' |
1790 | + This adds a new parser in the selection options. |
1791 | + When the account is associated to a parser, the following code makes it appear as an option |
1792 | + ''' |
1793 | + code = 'BNCR-Parser' |
1794 | + name = _( 'BNCR Bank statement import' ) |
1795 | + country_code = 'CR' |
1796 | + doc = _('''\ |
1797 | + This format is available through |
1798 | + the National Bank web interface. |
1799 | + ''') |
1800 | + |
1801 | + ''' |
1802 | + ** Kwargs parameter is used for a dynamic list of parameters. |
1803 | + The wizard imported extracts used in all parsers and not all parsers have all the necessary information in your file, |
1804 | + so get information from the wizard and passed by the ** kwargs. |
1805 | + Then in the parses that are needed, are extracted from the ** kwargs and if needed, |
1806 | + the parser still works the same way without this parameter. |
1807 | + |
1808 | + The rest of the methods must receive this parameter. (As the method that parse the header and the lines). |
1809 | + |
1810 | + If you need a new parameter, you specify its name and value, using the ** kwargs is a dictionary, |
1811 | + extract its value, with the respective key |
1812 | + ''' |
1813 | + |
1814 | + def parse(self, cr, statements_file, **kwargs): |
1815 | + result = [] |
1816 | + parser = BNCRParser() |
1817 | + stmnt = statement() |
1818 | + |
1819 | + """ |
1820 | + **kwargs have all the parameters that have the wizard and |
1821 | + has all the parameters passed from the wizard before calling |
1822 | + the method that parses the file. |
1823 | + """ |
1824 | + #try: |
1825 | + #pass to encoding with the correct type of file. |
1826 | + data = base64.decodestring(statements_file) |
1827 | + |
1828 | + records = parser.parse_stamenent_record(data,**kwargs) |
1829 | + |
1830 | + stmnt._transmission_number(records) |
1831 | + stmnt._account_number(records) |
1832 | + stmnt._statement_number(records) |
1833 | + stmnt._opening_balance(records) |
1834 | + stmnt._closing_balance(records) |
1835 | + stmnt._forward_available(records) |
1836 | + stmnt._execution_date_transferred_amount (records) |
1837 | + stmnt._transaction_new(data)#call the method statement_lines in parser to parse all the lines in file and add to stament. |
1838 | + |
1839 | + ''' |
1840 | + A stament must have a header and transacctions. The method parse_stamenent_record parse the header and the |
1841 | + method _transaction_new parse all the line (transactions) in the file. |
1842 | + ''' |
1843 | + if stmnt.is_valid(): |
1844 | + result.append(stmnt) |
1845 | + |
1846 | + return result |
1847 | + ''' |
1848 | + except: |
1849 | + raise osv.except_osv(_('Error'), _('The file have a invalid extension for this parser.\nThe valid extension are .txt or .csv')) |
1850 | + ''' |
1851 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1852 | |
1853 | === added file 'l10n_cr_account_banking_cr_bncr/bncr_parser.py' |
1854 | --- l10n_cr_account_banking_cr_bncr/bncr_parser.py 1970-01-01 00:00:00 +0000 |
1855 | +++ l10n_cr_account_banking_cr_bncr/bncr_parser.py 2013-12-06 21:45:38 +0000 |
1856 | @@ -0,0 +1,274 @@ |
1857 | +# -*- coding: utf-8 -*- |
1858 | +############################################################################## |
1859 | +# |
1860 | +# OpenERP, Open Source Management Solution |
1861 | +# Addons modules by CLEARCORP S.A. |
1862 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
1863 | +# |
1864 | +# This program is free software: you can redistribute it and/or modify |
1865 | +# it under the terms of the GNU Affero General Public License as |
1866 | +# published by the Free Software Foundation, either version 3 of the |
1867 | +# License, or (at your option) any later version. |
1868 | +# |
1869 | +# This program is distributed in the hope that it will be useful, |
1870 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1871 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1872 | +# GNU Affero General Public License for more details. |
1873 | +# |
1874 | +# You should have received a copy of the GNU Affero General Public License |
1875 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1876 | +# |
1877 | +############################################################################## |
1878 | +""" |
1879 | +Parser for Davivienda format files |
1880 | +""" |
1881 | +import re |
1882 | +from datetime import datetime |
1883 | +from dateutil import parser |
1884 | +from pprint import PrettyPrinter |
1885 | +from copy import copy |
1886 | + |
1887 | +class BNCRParser( object ): |
1888 | + |
1889 | + #Define the header for the extract to import. |
1890 | + ''' |
1891 | + ** Kwargs parameter is used for a dynamic list of parameters. |
1892 | + The wizard imported extracts used in all parsers and not all parsers have all the necessary information in your file, |
1893 | + so get information from the wizard and passed by the ** kwargs. |
1894 | + Then in the parses that are needed, are extracted from the ** kwargs and if needed, |
1895 | + the parser still works the same way without this parameter. |
1896 | + |
1897 | + The rest of the methods must receive this parameter. (As the method that parse the header and the lines). |
1898 | + |
1899 | + If you need a new parameter, you specify its name and value, using the ** kwargs is a dictionary, |
1900 | + extract its value, with the respective key |
1901 | + ''' |
1902 | + def statement_record ( self, rec, **kwargs): |
1903 | + lines = [] |
1904 | + line_dict = {} |
1905 | + startingbalance = 0.0 |
1906 | + |
1907 | + line_dict = { |
1908 | + 'transref': '', # _transmission_number |
1909 | + 'account_number': '', #_account_number |
1910 | + 'statementnr':'', # statement_number |
1911 | + 'startingbalance': 0.0, #_opening_balance |
1912 | + 'currencycode': '', #currencycode |
1913 | + 'endingbalance': 0.0, #_closing_balance |
1914 | + 'bookingdate': '', #moving_date |
1915 | + 'ammount': 0.0, |
1916 | + 'id': '', |
1917 | + } |
1918 | + #Split the file in statements |
1919 | + list_split = rec.split('\n') |
1920 | + |
1921 | + #currency_code (local_currency in the stament) extracted from account_number object from the wizard. |
1922 | + #account_number (local_account) extracted from account_number object from the wizard. |
1923 | + #date_to_str and date_from_str are the dates in wizard, both are strings |
1924 | + |
1925 | + line_dict['account_number'] = kwargs['account_number'] |
1926 | + |
1927 | + line_dict['currencycode'] = kwargs['local_currency'] |
1928 | + |
1929 | + line_dict['statementnr'] = kwargs['date_from_str'] + ' - '+ kwargs['date_to_str'] + ' Extracto BNCR ' + line_dict['account_number'] #Interval time of the file. |
1930 | + |
1931 | + #transmission_number (Date when done the import) |
1932 | + date_obj= datetime.now() |
1933 | + line_dict['transref'] = date_obj.strftime("%d-%m-%Y %H:%M:%S") |
1934 | + #bookingdate |
1935 | + line_dict['bookingdate'] = date_obj.strftime("%d-%m-%Y %H:%M:%S") |
1936 | + |
1937 | + ''' |
1938 | + For the BNCR parser, the ending_balance comes from wizard. With total of debit and credit and the ending_balance |
1939 | + compute the initial_balance. |
1940 | + ''' |
1941 | + #extract the total of debit and credit from the file. The last statements and compute the startingbalance |
1942 | + last_position = (len(list_split) - 1) |
1943 | + last_line = list_split[last_position] |
1944 | + #last line can be blanck, find the last line with data. |
1945 | + if last_line == "": |
1946 | + while True: |
1947 | + last_position -= 1 |
1948 | + last_line = list_split[last_position] |
1949 | + if last_line is not "": |
1950 | + break |
1951 | + |
1952 | + last_line_split = last_line.split(';') |
1953 | + |
1954 | + #For another type of format, take the character \t |
1955 | + if len(last_line_split) > 1: |
1956 | + final_line_totals = last_line_split |
1957 | + else: |
1958 | + final_line_totals = last_line.split('\t') |
1959 | + |
1960 | + ####################################################### |
1961 | + |
1962 | + if final_line_totals[3] != '': |
1963 | + debit = float(final_line_totals[3].replace(",","")) |
1964 | + else: |
1965 | + debit = 0.0 |
1966 | + if final_line_totals[4] != '': |
1967 | + credit = float(final_line_totals[4].replace(",","")) |
1968 | + else: |
1969 | + credit = 0.0 |
1970 | + |
1971 | + startingbalance = float(kwargs['ending_balance']) + debit - credit |
1972 | + line_dict['startingbalance'] = str(startingbalance) |
1973 | + |
1974 | + #the ending_balance extracted from **kwargs (comes from wizard) |
1975 | + endingbalance = float(kwargs['ending_balance']) |
1976 | + line_dict['endingbalance'] = str(kwargs['ending_balance']) |
1977 | + |
1978 | + line_dict['ammount'] = startingbalance + endingbalance |
1979 | + line_dict['id'] = kwargs['date_from_str'] + ' - '+ kwargs['date_to_str'] + ' Extracto BNCR ' + line_dict['account_number'] |
1980 | + |
1981 | + return line_dict |
1982 | + |
1983 | + ''' |
1984 | + Parse all the lines in the file. Once the header is parser, the next step are the lines. |
1985 | + ''' |
1986 | + def statement_lines ( self, rec ): |
1987 | + parser = BNCRParser() |
1988 | + mapping = { |
1989 | + 'execution_date' : '', |
1990 | + 'effective_date' : '', |
1991 | + 'transfer_type' : '', |
1992 | + 'reference' : '', |
1993 | + 'message' : '', |
1994 | + 'name' : '', |
1995 | + 'transferred_amount': '', |
1996 | + 'creditmarker': '', |
1997 | + } |
1998 | + |
1999 | + lines = [] |
2000 | + line_dict = {} |
2001 | + currencycode = '' |
2002 | + |
2003 | + list_split = rec.split('\n') |
2004 | + entrada = False |
2005 | + |
2006 | + start = 1 |
2007 | + end = (len(list_split) - 1) |
2008 | + last_line = list_split[end] |
2009 | + #last line can be blanck, find the last line with data. |
2010 | + if last_line == "": |
2011 | + while True: |
2012 | + end -= 1 |
2013 | + last_line = list_split[end] |
2014 | + if last_line is not "": |
2015 | + break |
2016 | + |
2017 | + sub_list = list_split [start:end] #The end line is amount totals of credit and debit |
2018 | + for sub in sub_list: |
2019 | + line = sub.split(';') |
2020 | + if len(line) > 1: |
2021 | + final_line = line |
2022 | + #For another type of format, take the character \t |
2023 | + else: |
2024 | + final_line = sub.split('\t') |
2025 | + |
2026 | + #effective_date |
2027 | + date_str = final_line[1].replace("/","-") |
2028 | + date= datetime.strptime(date_str, "%Y-%m-%d") |
2029 | + mapping['effective_date'] = date #fecha_contable. |
2030 | + #execution_date |
2031 | + mapping['execution_date'] = date #fecha_movimiento |
2032 | + |
2033 | + mapping['transfer_type'] = 'NTRF' |
2034 | + mapping['reference'] = final_line[2] #NumDocumento |
2035 | + mapping['message'] = final_line[2]+' '+final_line[5] #NumDocumento + Description |
2036 | + mapping['name'] = final_line[2]+' '+final_line[5] #NumDocumento + Description |
2037 | + mapping['id'] = final_line[2]+' '+final_line[5] #NumDocumento + Description |
2038 | + |
2039 | + #the field in position 3 is debit, the position 4 is credit |
2040 | + if final_line[4] != '': |
2041 | + credit = float(final_line[4].replace(",","")) |
2042 | + mapping['transferred_amount'] = credit |
2043 | + mapping['creditmarker'] = 'C' |
2044 | + |
2045 | + elif final_line[3] != '': |
2046 | + #In this case, the debit is negative. |
2047 | + debit = float(final_line[3].replace(",","")) |
2048 | + mapping['transferred_amount'] = -1 * debit |
2049 | + |
2050 | + lines.append(copy(mapping)) |
2051 | + |
2052 | + return lines |
2053 | + |
2054 | + """ |
2055 | + ** Kwargs parameter is used for a dynamic list of parameters. |
2056 | + The wizard imported extracts used in all parsers and not all parsers have all the necessary information in your file, |
2057 | + so get information from the wizard and passed by the ** kwargs. |
2058 | + Then in the parses that are needed, are extracted from the ** kwargs and if needed, |
2059 | + the parser still works the same way without this parameter. |
2060 | + |
2061 | + The rest of the methods must receive this parameter. (As the method that parse the header and the lines). |
2062 | + |
2063 | + If you need a new parameter, you specify its name and value, using the ** kwargs is a dictionary, |
2064 | + extract its value, with the respective key |
2065 | + """ |
2066 | + def parse_stamenent_record( self, rec, **kwargs): |
2067 | + |
2068 | + matchdict = dict() |
2069 | + |
2070 | + #Set the header for the stament. |
2071 | + matchdict = self.statement_record(rec, **kwargs); |
2072 | + |
2073 | + # Remove members set to None |
2074 | + matchdict = dict( [( k, v ) for k, v in matchdict.iteritems() if v] ) |
2075 | + |
2076 | + matchkeys = set( matchdict.keys() ) |
2077 | + needstrip = set( [ 'transref', 'account_number', 'statementnr', 'currencycode', 'endingbalance', 'bookingdate'] ) |
2078 | + |
2079 | + for field in matchkeys & needstrip: |
2080 | + matchdict[field] = matchdict[field].strip() |
2081 | + |
2082 | + # Convert to float. Comma is decimal separator |
2083 | + needsfloat = set( ["startingbalance", "endingbalance", "amount"] ) |
2084 | + for field in matchkeys & needsfloat: |
2085 | + matchdict[field] = float( matchdict[field].replace( ',', '.' ) ) |
2086 | + |
2087 | + # Convert date fields |
2088 | + needdate = set( ["bookingdate"] ) |
2089 | + |
2090 | + for field in matchkeys & needdate: |
2091 | + datestring = matchdict[field] |
2092 | + date_obj= datetime.strptime(datestring, "%d-%m-%Y %H:%M:%S") |
2093 | + matchdict[field] = date_obj |
2094 | + |
2095 | + return matchdict |
2096 | + |
2097 | + def parse( self, cr, data ): |
2098 | + records = [] |
2099 | + # Some records are multiline |
2100 | + for line in data: |
2101 | + if len(line) <= 1: |
2102 | + continue |
2103 | + if line[0] == ':' and len(line) > 1: |
2104 | + records.append(line) |
2105 | + else: |
2106 | + records[-1] = '\n'.join([records[-1], line]) |
2107 | + |
2108 | + output = [] |
2109 | + |
2110 | + for rec in records: |
2111 | + #parse_stament_record call the method that parse the header and the stament of the file. |
2112 | + output.append(self.parse_stamenent_record( rec )) |
2113 | + |
2114 | + return output |
2115 | + |
2116 | +def parse_file( filename ): |
2117 | + bncrfile = open( filename, "r" ) |
2118 | + p = BNCRParser().parse( bncrfile.readlines() ) |
2119 | + |
2120 | + |
2121 | +def main(): |
2122 | + """The main function, currently just calls a dummy filename |
2123 | + |
2124 | + :returns: description |
2125 | + """ |
2126 | + parse_file("testfile") |
2127 | + |
2128 | +if __name__ == '__main__': |
2129 | + main() |
2130 | + |
2131 | |
2132 | === modified file 'l10n_cr_account_banking_cr_davivienda/__openerp__.py' |
2133 | --- l10n_cr_account_banking_cr_davivienda/__openerp__.py 2013-05-06 01:38:09 +0000 |
2134 | +++ l10n_cr_account_banking_cr_davivienda/__openerp__.py 2013-12-06 21:45:38 +0000 |
2135 | @@ -22,12 +22,19 @@ |
2136 | |
2137 | { |
2138 | 'name': 'Davivienda Account Banking', |
2139 | - 'version': '0.5', |
2140 | + 'version': '0.1', |
2141 | 'license': 'AGPL-3', |
2142 | 'author': 'CLEARCORP S.A.', |
2143 | 'website': 'http://www.clearcorp.co.cr', |
2144 | +<<<<<<< TREE |
2145 | 'category': 'Account Banking', |
2146 | 'depends': ['account_banking','account_parser_type'], |
2147 | +======= |
2148 | + 'category': 'Accounting & Finance', |
2149 | + 'depends': [ |
2150 | + 'account_banking_ccorp', |
2151 | + ], |
2152 | +>>>>>>> MERGE-SOURCE |
2153 | 'init_xml': [], |
2154 | 'update_xml': [], |
2155 | 'demo_xml': [], |
2156 | |
2157 | === modified file 'l10n_cr_account_banking_cr_davivienda/davivienda_format.py' |
2158 | --- l10n_cr_account_banking_cr_davivienda/davivienda_format.py 2013-03-15 20:40:56 +0000 |
2159 | +++ l10n_cr_account_banking_cr_davivienda/davivienda_format.py 2013-12-06 21:45:38 +0000 |
2160 | @@ -20,11 +20,15 @@ |
2161 | # |
2162 | ############################################################################## |
2163 | |
2164 | -from account_banking.parsers import models |
2165 | -from tools.translate import _ |
2166 | +from account_banking_ccorp.parsers import models |
2167 | +from openerp.tools.translate import _ |
2168 | from davivienda_parser import DaviviendaParser |
2169 | import re |
2170 | +<<<<<<< TREE |
2171 | from osv import osv, fields |
2172 | +======= |
2173 | +from openerp.osv import osv, fields |
2174 | +>>>>>>> MERGE-SOURCE |
2175 | import logging |
2176 | import pprint |
2177 | from datetime import datetime |
2178 | |
2179 | === modified file 'l10n_cr_account_banking_cr_davivienda/davivienda_parser.py' |
2180 | --- l10n_cr_account_banking_cr_davivienda/davivienda_parser.py 2013-03-15 20:40:56 +0000 |
2181 | +++ l10n_cr_account_banking_cr_davivienda/davivienda_parser.py 2013-12-06 21:45:38 +0000 |
2182 | @@ -27,8 +27,13 @@ |
2183 | from dateutil import parser |
2184 | from pprint import PrettyPrinter |
2185 | from copy import copy |
2186 | +<<<<<<< TREE |
2187 | from osv import osv, fields |
2188 | from tools.translate import _ |
2189 | +======= |
2190 | +from openerp.osv import osv, fields |
2191 | +from openerp.tools.translate import _ |
2192 | +>>>>>>> MERGE-SOURCE |
2193 | |
2194 | class DaviviendaParser( object ): |
2195 | |
2196 | @@ -148,12 +153,16 @@ |
2197 | #last line can be blanck, find the last line with data. |
2198 | if last_line == "": |
2199 | while True: |
2200 | - end -= 1 |
2201 | last_line = list_split[end] |
2202 | if last_line is not "": |
2203 | break |
2204 | +<<<<<<< TREE |
2205 | |
2206 | sub_list = list_split [start:end] |
2207 | +======= |
2208 | + end -= 1 |
2209 | + sub_list = list_split [start:end+1] |
2210 | +>>>>>>> MERGE-SOURCE |
2211 | for sub in sub_list: |
2212 | line = sub.split(';') |
2213 | #effective_date |
2214 | |
2215 | === removed file 'l10n_cr_account_banking_reports/__init__.py' |
2216 | --- l10n_cr_account_banking_reports/__init__.py 2012-07-18 22:46:28 +0000 |
2217 | +++ l10n_cr_account_banking_reports/__init__.py 1970-01-01 00:00:00 +0000 |
2218 | @@ -1,25 +0,0 @@ |
2219 | -# -*- coding: utf-8 -*- |
2220 | -############################################################################## |
2221 | -# |
2222 | -# OpenERP, Open Source Management Solution |
2223 | -# Addons modules by CLEARCORP S.A. |
2224 | -# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
2225 | -# |
2226 | -# This program is free software: you can redistribute it and/or modify |
2227 | -# it under the terms of the GNU Affero General Public License as |
2228 | -# published by the Free Software Foundation, either version 3 of the |
2229 | -# License, or (at your option) any later version. |
2230 | -# |
2231 | -# This program is distributed in the hope that it will be useful, |
2232 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2233 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2234 | -# GNU Affero General Public License for more details. |
2235 | -# |
2236 | -# You should have received a copy of the GNU Affero General Public License |
2237 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2238 | -# |
2239 | -############################################################################## |
2240 | - |
2241 | -import account |
2242 | -from . import wizard |
2243 | -from . import report |
2244 | |
2245 | === removed file 'l10n_cr_account_banking_reports/__openerp__.py' |
2246 | --- l10n_cr_account_banking_reports/__openerp__.py 2012-11-06 00:40:55 +0000 |
2247 | +++ l10n_cr_account_banking_reports/__openerp__.py 1970-01-01 00:00:00 +0000 |
2248 | @@ -1,43 +0,0 @@ |
2249 | -# -*- coding: utf-8 -*- |
2250 | -############################################################################## |
2251 | -# |
2252 | -# OpenERP, Open Source Management Solution |
2253 | -# Addons modules by CLEARCORP S.A. |
2254 | -# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
2255 | -# |
2256 | -# This program is free software: you can redistribute it and/or modify |
2257 | -# it under the terms of the GNU Affero General Public License as |
2258 | -# published by the Free Software Foundation, either version 3 of the |
2259 | -# License, or (at your option) any later version. |
2260 | -# |
2261 | -# This program is distributed in the hope that it will be useful, |
2262 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2263 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2264 | -# GNU Affero General Public License for more details. |
2265 | -# |
2266 | -# You should have received a copy of the GNU Affero General Public License |
2267 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2268 | -# |
2269 | -############################################################################## |
2270 | - |
2271 | - |
2272 | -{ |
2273 | - 'name': 'Webkit reports for Banking', |
2274 | - 'description': "", |
2275 | - 'version': '1.0', |
2276 | - 'author': 'CLEARCORP S.A.', |
2277 | - 'category': 'Finance', |
2278 | - 'website': "http://clearcorp.co.cr", |
2279 | - 'images': [], |
2280 | - 'depends': ['account_financial_report_webkit', 'account', 'account_webkit_report_library' ], |
2281 | - 'init_xml': [], |
2282 | - 'demo_xml' : [], |
2283 | - 'update_xml': ['report/report.xml', |
2284 | - 'wizard/conciliation_bank_wizard.xml', |
2285 | - 'report_menus.xml', |
2286 | - ], |
2287 | - 'test': [], |
2288 | - 'active': False, |
2289 | - 'installable': True, |
2290 | - 'license': 'AGPL-3', |
2291 | -} |
2292 | |
2293 | === removed directory 'l10n_cr_account_banking_reports/i18n' |
2294 | === removed file 'l10n_cr_account_banking_reports/i18n/es_CR.po' |
2295 | --- l10n_cr_account_banking_reports/i18n/es_CR.po 2013-01-17 19:04:40 +0000 |
2296 | +++ l10n_cr_account_banking_reports/i18n/es_CR.po 1970-01-01 00:00:00 +0000 |
2297 | @@ -1,231 +0,0 @@ |
2298 | -# Translation of OpenERP Server. |
2299 | -# This file contains the translation of the following modules: |
2300 | -# * l10n_cr_account_banking_reports |
2301 | -# |
2302 | -msgid "" |
2303 | -msgstr "" |
2304 | -"Project-Id-Version: OpenERP Server 6.1\n" |
2305 | -"Report-Msgid-Bugs-To: \n" |
2306 | -"POT-Creation-Date: 2013-01-11 19:33+0000\n" |
2307 | -"PO-Revision-Date: 2013-01-11 19:33+0000\n" |
2308 | -"Last-Translator: <>\n" |
2309 | -"Language-Team: \n" |
2310 | -"MIME-Version: 1.0\n" |
2311 | -"Content-Type: text/plain; charset=UTF-8\n" |
2312 | -"Content-Transfer-Encoding: \n" |
2313 | -"Plural-Forms: \n" |
2314 | - |
2315 | -#. module: l10n_cr_account_banking_reports |
2316 | -#: model:ir.actions.report.xml,name:l10n_cr_account_banking_reports.account_report_conciliation_bank_webkit |
2317 | -msgid "Conciliation Bank Webkit" |
2318 | -msgstr "Conciliarión Bancaria" |
2319 | - |
2320 | -#. module: l10n_cr_account_banking_reports |
2321 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:90 |
2322 | -msgid "- Expenditures to register" |
2323 | -msgstr "- Egresos por registrar" |
2324 | - |
2325 | -#. module: l10n_cr_account_banking_reports |
2326 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:145 |
2327 | -msgid "Label" |
2328 | -msgstr "Detalle" |
2329 | - |
2330 | -#. module: l10n_cr_account_banking_reports |
2331 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:135 |
2332 | -msgid "Period" |
2333 | -msgstr "Período" |
2334 | - |
2335 | -#. module: l10n_cr_account_banking_reports |
2336 | -#: view:conciliation.bank.webkit:0 |
2337 | -msgid "Time Filters" |
2338 | -msgstr "Filtros de Tiempo" |
2339 | - |
2340 | -#. module: l10n_cr_account_banking_reports |
2341 | -#: help:conciliation.bank.webkit,historic_strict:0 |
2342 | -msgid "If selected, will display a historical unreconciled lines, taking into account the end of the period or date selected" |
2343 | -msgstr "Si está seleccionado, mostrará el histórico de las líneas sin conciliar, tomando en cuenta la fecha final del período o la fecha final seleccionada" |
2344 | - |
2345 | -#. module: l10n_cr_account_banking_reports |
2346 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:78 |
2347 | -msgid "Ledger Balance" |
2348 | -msgstr "Saldo en Libros" |
2349 | - |
2350 | -#. module: l10n_cr_account_banking_reports |
2351 | -#: field:conciliation.bank.webkit,special_period:0 |
2352 | -msgid "Special period" |
2353 | -msgstr "Período especiales" |
2354 | - |
2355 | -#. module: l10n_cr_account_banking_reports |
2356 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:124 |
2357 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:197 |
2358 | -msgid "Incomes to register" |
2359 | -msgstr "Ingresos por registrar" |
2360 | - |
2361 | -#. module: l10n_cr_account_banking_reports |
2362 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:137 |
2363 | -msgid "Journal" |
2364 | -msgstr "Diario" |
2365 | - |
2366 | -#. module: l10n_cr_account_banking_reports |
2367 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:38 |
2368 | -msgid "No Filter" |
2369 | -msgstr "Sin filtro" |
2370 | - |
2371 | -#. module: l10n_cr_account_banking_reports |
2372 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:167 |
2373 | -msgid "-- No partner --" |
2374 | -msgstr "-- Sin empresa --" |
2375 | - |
2376 | -#. module: l10n_cr_account_banking_reports |
2377 | -#: view:conciliation.bank.webkit:0 |
2378 | -msgid "This report allows you to print or generate a pdf of your partner ledger with details of all your payable/receivable account" |
2379 | -msgstr "Este reporte permite imprimir o generar un pdf de una conciliación bancaria de la cuenta seleccionada." |
2380 | - |
2381 | -#. module: l10n_cr_account_banking_reports |
2382 | -#: model:ir.model,name:l10n_cr_account_banking_reports.model_conciliation_bank_webkit |
2383 | -msgid "Conciliation Bank Report" |
2384 | -msgstr "Reporte de Conciliación de Bancos" |
2385 | - |
2386 | -#. module: l10n_cr_account_banking_reports |
2387 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:96 |
2388 | -msgid "Ledger reconciled Total" |
2389 | -msgstr "Total conciliado en Libros" |
2390 | - |
2391 | -#. module: l10n_cr_account_banking_reports |
2392 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:133 |
2393 | -msgid "Date" |
2394 | -msgstr "Fecha" |
2395 | - |
2396 | -#. module: l10n_cr_account_banking_reports |
2397 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:20 |
2398 | -msgid "Chart of Account" |
2399 | -msgstr "Plan Contable" |
2400 | - |
2401 | -#. module: l10n_cr_account_banking_reports |
2402 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:122 |
2403 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:195 |
2404 | -msgid "Debits to reconcile" |
2405 | -msgstr "Débitos por conciliar" |
2406 | - |
2407 | -#. module: l10n_cr_account_banking_reports |
2408 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:41 |
2409 | -msgid "Target Moves" |
2410 | -msgstr "Movimientos Destino" |
2411 | - |
2412 | -#. module: l10n_cr_account_banking_reports |
2413 | -#: constraint:conciliation.bank.webkit:0 |
2414 | -msgid "When no Fiscal year is selected, you must choose to filter by periods or by date." |
2415 | -msgstr "Cuando no se selecciona ningún año fiscal, se debe elegir para filtrar por períodos o por fecha." |
2416 | - |
2417 | -#. module: l10n_cr_account_banking_reports |
2418 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:47 |
2419 | -msgid "To:" |
2420 | -msgstr "Hasta:" |
2421 | - |
2422 | -#. module: l10n_cr_account_banking_reports |
2423 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:139 |
2424 | -msgid "Account" |
2425 | -msgstr "Cuenta" |
2426 | - |
2427 | -#. module: l10n_cr_account_banking_reports |
2428 | -#: view:conciliation.bank.webkit:0 |
2429 | -#: model:ir.actions.act_window,name:l10n_cr_account_banking_reports.action_conciliation_bank_menu_webkit |
2430 | -#: model:ir.ui.menu,name:l10n_cr_account_banking_reports.menu_conciliation_bank |
2431 | -msgid "Conciliation Bank" |
2432 | -msgstr "Conciliación Bancaria" |
2433 | - |
2434 | -#. module: l10n_cr_account_banking_reports |
2435 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:120 |
2436 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:193 |
2437 | -msgid "Credits to reconcile" |
2438 | -msgstr "Créditos por conciliar" |
2439 | - |
2440 | -#. module: l10n_cr_account_banking_reports |
2441 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:21 |
2442 | -msgid "Fiscal Year" |
2443 | -msgstr "Año Fiscal" |
2444 | - |
2445 | -#. module: l10n_cr_account_banking_reports |
2446 | -#: field:conciliation.bank.webkit,historic_strict:0 |
2447 | -msgid "Strict History" |
2448 | -msgstr "Histórico estricto" |
2449 | - |
2450 | -#. module: l10n_cr_account_banking_reports |
2451 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:80 |
2452 | -msgid "Bank Balance" |
2453 | -msgstr "Saldo en Banco" |
2454 | - |
2455 | -#. module: l10n_cr_account_banking_reports |
2456 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:68 |
2457 | -msgid "Balance according Bank" |
2458 | -msgstr "Saldo según Banco" |
2459 | - |
2460 | -#. module: l10n_cr_account_banking_reports |
2461 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:98 |
2462 | -msgid "Bank reconciled Total" |
2463 | -msgstr "Total conciliado en Banco" |
2464 | - |
2465 | -#. module: l10n_cr_account_banking_reports |
2466 | -#: constraint:conciliation.bank.webkit:0 |
2467 | -msgid "The fiscalyear, periods or chart of account chosen have to belong to the same company." |
2468 | -msgstr "El año fiscal, períodos o plan contable elegidos deben pertenecer a la misma compañía." |
2469 | - |
2470 | -#. module: l10n_cr_account_banking_reports |
2471 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:126 |
2472 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:199 |
2473 | -msgid "Expenditures to register" |
2474 | -msgstr "Egresos por registrar" |
2475 | - |
2476 | -#. module: l10n_cr_account_banking_reports |
2477 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:143 |
2478 | -msgid "Reference" |
2479 | -msgstr "Referencia" |
2480 | - |
2481 | -#. module: l10n_cr_account_banking_reports |
2482 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:86 |
2483 | -msgid "+ Credits to reconcile" |
2484 | -msgstr "+ Créditos por conciliar" |
2485 | - |
2486 | -#. module: l10n_cr_account_banking_reports |
2487 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:92 |
2488 | -msgid "- Debits to reconcile" |
2489 | -msgstr "- Débitos por conciliar" |
2490 | - |
2491 | -#. module: l10n_cr_account_banking_reports |
2492 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:147 |
2493 | -msgid "Amount" |
2494 | -msgstr "Monto" |
2495 | - |
2496 | -#. module: l10n_cr_account_banking_reports |
2497 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:24 |
2498 | -msgid "Dates Filter" |
2499 | -msgstr "Filtro por Fechas" |
2500 | - |
2501 | -#. module: l10n_cr_account_banking_reports |
2502 | -#: help:conciliation.bank.webkit,special_period:0 |
2503 | -msgid "Include special period" |
2504 | -msgstr "Include special period" |
2505 | - |
2506 | -#. module: l10n_cr_account_banking_reports |
2507 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:84 |
2508 | -msgid "+ Incomes to register" |
2509 | -msgstr "+ Ingresos por registrar" |
2510 | - |
2511 | -#. module: l10n_cr_account_banking_reports |
2512 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:141 |
2513 | -msgid "Partner" |
2514 | -msgstr "Empresa" |
2515 | - |
2516 | -#. module: l10n_cr_account_banking_reports |
2517 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:193 |
2518 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:195 |
2519 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:197 |
2520 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:199 |
2521 | -msgid "Total" |
2522 | -msgstr "Total" |
2523 | - |
2524 | -#. module: l10n_cr_account_banking_reports |
2525 | -#: report:addons/l10n_cr_account_banking_reports/report/conciliation_bank.mako:31 |
2526 | -msgid "Periods Filter" |
2527 | -msgstr "Filtro por Períodos" |
2528 | - |
2529 | |
2530 | === removed file 'l10n_cr_account_banking_reports/report/__init__.py' |
2531 | --- l10n_cr_account_banking_reports/report/__init__.py 2012-07-18 22:46:28 +0000 |
2532 | +++ l10n_cr_account_banking_reports/report/__init__.py 1970-01-01 00:00:00 +0000 |
2533 | @@ -1,1 +0,0 @@ |
2534 | -import conciliation_bank |
2535 | |
2536 | === removed file 'l10n_cr_account_banking_reports/report/conciliation_bank.mako' |
2537 | --- l10n_cr_account_banking_reports/report/conciliation_bank.mako 2013-01-17 19:04:40 +0000 |
2538 | +++ l10n_cr_account_banking_reports/report/conciliation_bank.mako 1970-01-01 00:00:00 +0000 |
2539 | @@ -1,213 +0,0 @@ |
2540 | -<html> |
2541 | -<head> |
2542 | - <style type="text/css">${css}</style> |
2543 | -</head> |
2544 | -<body> |
2545 | - <%setLang(user.context_lang)%> |
2546 | - <% |
2547 | - filter_type = '' |
2548 | - filter_data = [] |
2549 | - bank_account = get_bank_account(cr, uid, data) |
2550 | - %> |
2551 | - |
2552 | - <div class="header"> |
2553 | - <div style="font-size: 20px; font-weight: bold; text-align: center;"> ${company.partner_id.name | entity} - ${company.currency_id.name | entity}</div> |
2554 | - <div style="font-size: 25px; font-weight: bold; text-align: center;"> Conciliación de Bancos</div> |
2555 | - <div style="font-size: 20px; font-weight: bold; text-align: center;"> ${bank_account.name} - ${(bank_account.currency_id and bank_account.currency_id.name) or bank_account.company_id.currency_id.name}</div> |
2556 | - </div> |
2557 | - <div class="act_as_table data_table" style="margin-top:10px;"> |
2558 | - <div class="act_as_row labels" style = "font-size: 12px;"> |
2559 | - <div class="act_as_cell">${_('Chart of Account')}</div> |
2560 | - <div class="act_as_cell">${_('Fiscal Year')}</div> |
2561 | - <div class="act_as_cell"> |
2562 | - %if filter_form(data) == 'filter_date': |
2563 | - ${_('Dates Filter')} |
2564 | - <% |
2565 | - filter_data.append(start_date) |
2566 | - filter_data.append(stop_date) |
2567 | - filter_type = 'filter_date' |
2568 | - %> |
2569 | - %elif filter_form(data) == 'filter_period': |
2570 | - ${_('Periods Filter')} |
2571 | - <% |
2572 | - filter_data.append(start_period) |
2573 | - filter_data.append(stop_period) |
2574 | - filter_type = 'filter_period' |
2575 | - %> |
2576 | - %else: |
2577 | - ${_('No Filter')} |
2578 | - %endif |
2579 | - </div> |
2580 | - <div class="act_as_cell">${_('Target Moves')}</div> |
2581 | - </div> |
2582 | - <div class="act_as_row" style = "font-size: 12px;"> |
2583 | - <div class="act_as_cell">${ chart_account.name }</div> |
2584 | - <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div> |
2585 | - <div class="act_as_cell"> |
2586 | - ${_('To:')} |
2587 | - %if filter_form(data) == 'filter_date': |
2588 | - ${ formatLang(stop_date, date=True) if stop_date else u'' } |
2589 | - %elif filter_form(data) == 'filter_period': |
2590 | - ${stop_period.name if stop_period else u'' } |
2591 | - %else: |
2592 | - ${''} |
2593 | - %endif |
2594 | - </div> |
2595 | - <div class="act_as_cell">${ display_target_move(data) }</div> |
2596 | - </div> |
2597 | - </div> |
2598 | - |
2599 | - <% |
2600 | - bank_balance, bank_move_lines, account_is_foreign = get_bank_data(cr, uid, bank_account.id, filter_type, filter_data, fiscalyear, target_move, data['form']['historic_strict'], data['form']['special_period']) |
2601 | - %> |
2602 | - <div align="center"> |
2603 | - <div class="act_as_table data_table no_wrap results left" style="margin-top:20px; margin-bottom: 10px; width:500px"> |
2604 | - <div class="act_as_row"> |
2605 | - <div class="act_as_cell" style="border-left:0px; border-right:0px; border-top:0px"></div> |
2606 | - <div class="act_as_cell" style="column-span:2; -webkit-column-span:2; border-left:0px; border-top:0px"></div> |
2607 | - <div class="act_as_cell label">${_('Balance according Bank')}</div> |
2608 | - <div class="act_as_cell amount"> |
2609 | - %if bank_balance['input_bank_balance'] == bank_balance['bank_balance']: |
2610 | - ${formatLang(input_bank_balance)} |
2611 | - %else: |
2612 | - <span style="color:red; font-weight:bold;">${formatLang(input_bank_balance)}</span> |
2613 | - %endif |
2614 | - </div> |
2615 | - </div> |
2616 | - <div class="act_as_row"> |
2617 | - <div class="act_as_cell label">${_('Ledger Balance')}</div> |
2618 | - <div class="act_as_cell label amount">${formatLang(bank_balance['accounting_balance'])}</div> |
2619 | - <div class="act_as_cell label">${_('Bank Balance')}</div> |
2620 | - <div class="act_as_cell label amount">${formatLang(bank_balance['bank_balance'])}</div> |
2621 | - </div> |
2622 | - <div class="act_as_row"> |
2623 | - <div class="act_as_cell">${_('+ Incomes to register')}</div> |
2624 | - <div class="act_as_cell amount">${formatLang(bank_balance['incomes_to_register'])}</div> |
2625 | - <div class="act_as_cell">${_('+ Credits to reconcile')}</div> |
2626 | - <div class="act_as_cell amount">${formatLang(bank_balance['credits_to_reconcile'])}</div> |
2627 | - </div> |
2628 | - <div class="act_as_row"> |
2629 | - <div class="act_as_cell">${_('- Expenditures to register')}</div> |
2630 | - <div class="act_as_cell amount">${formatLang(bank_balance['expenditures_to_register'])}</div> |
2631 | - <div class="act_as_cell">${_('- Debits to reconcile')}</div> |
2632 | - <div class="act_as_cell amount">${formatLang(bank_balance['debits_to_reconcile'])}</div> |
2633 | - </div> |
2634 | - <div class="act_as_row"> |
2635 | - <div class="act_as_cell label">${_('Ledger reconciled Total')}</div> |
2636 | - <div class="act_as_cell label amount">${formatLang(bank_balance['accounting_total'])}</div> |
2637 | - <div class="act_as_cell label">${_('Bank reconciled Total')}</div> |
2638 | - <div class="act_as_cell label amount">${formatLang(bank_balance['bank_total'])}</div> |
2639 | - </div> |
2640 | - </div> |
2641 | - </div> |
2642 | - |
2643 | - <% |
2644 | - def cmp (first, second): |
2645 | - list_ = [ |
2646 | - 'incomes_to_register', |
2647 | - 'expenditures_to_register', |
2648 | - 'credits_to_reconcile', |
2649 | - 'debits_to_reconcile', |
2650 | - ] |
2651 | - first_index = len(first) > 0 and first[0] in list_ and list_.index(first[0]) or -1 |
2652 | - second_index = len(second) > 0 and second[0] in list_ and list_.index(second[0]) or -1 |
2653 | - |
2654 | - return first_index - second_index |
2655 | - %> |
2656 | - %for line_group_key, line_group in sorted(bank_move_lines.items(),cmp): |
2657 | - <div class="account_title bg" style="width: 100%; margin-top: 15px; font-size: 12px;"> |
2658 | - %if line_group_key == 'credits_to_reconcile': |
2659 | - ${_('Credits to reconcile')} |
2660 | - %elif line_group_key == 'debits_to_reconcile': |
2661 | - ${_('Debits to reconcile')} |
2662 | - %elif line_group_key == 'incomes_to_register': |
2663 | - ${_('Incomes to register')} |
2664 | - %else: |
2665 | - ${_('Expenditures to register')} |
2666 | - %endif |
2667 | - </div> |
2668 | - <div class="act_as_table list_table" style="margin-top: 5px;"> |
2669 | - <div class="act_as_thead"> |
2670 | - <div class="act_as_row labels no_wrap"> |
2671 | - ## date |
2672 | - <div class="act_as_cell first_column">${_('Date')}</div> |
2673 | - ## period |
2674 | - <div class="act_as_cell">${_('Period')}</div> |
2675 | - ## journal |
2676 | - <div class="act_as_cell">${_('Journal')}</div> |
2677 | - ## Account |
2678 | - <div class="act_as_cell">${_('Account')}</div> |
2679 | - ## Partner |
2680 | - <div class="act_as_cell" style="width: 40%;">${_('Partner')}</div> |
2681 | - ## Reference |
2682 | - <div class="act_as_cell" style="width: 20%;">${_('Reference')}</div> |
2683 | - ## label |
2684 | - <div class="act_as_cell" style="width: 40%;">${_('Label')}</div> |
2685 | - ## Amount |
2686 | - <div class="act_as_cell last_column amount">${_('Amount')}</div> |
2687 | - </div> |
2688 | - </div> |
2689 | - <div class="act_as_tbody">\ |
2690 | - %for line in line_group: |
2691 | - <div class="act_as_row lines"> |
2692 | - ## date |
2693 | - <div class="act_as_cell first_column no_wrap">${formatLang(line.date, date=True)}</div> |
2694 | - ## period |
2695 | - <div class="act_as_cell no_wrap">${line.period_id.code}</div> |
2696 | - ## journal |
2697 | - <div class="act_as_cell no_wrap">${line.journal_id.code}</div> |
2698 | - ## Account |
2699 | - <div class="act_as_cell no_wrap">${line.account_id.code}</div> |
2700 | - ## Partner |
2701 | - <div class="act_as_cell"> |
2702 | - %if line.partner_id: |
2703 | - ${(line.partner_id.ref and line.partner_id.ref + ' ') or ''} |
2704 | - ${(line.partner_id.name and line.partner_id.name) or ''} |
2705 | - %else: |
2706 | - ${_('-- No partner --')} |
2707 | - %endif |
2708 | - </div> |
2709 | - ## Reference |
2710 | - <div class="act_as_cell">${line.ref}</div> |
2711 | - ## label |
2712 | - <div class="act_as_cell">${line.name}</div> |
2713 | - ## Amount |
2714 | - <div class="act_as_cell last_column amount"> |
2715 | - %if account_is_foreign: |
2716 | - ${formatLang(line.amount_currency)} |
2717 | - %elif line.debit > 0: |
2718 | - ${formatLang(line.debit)} |
2719 | - %else: |
2720 | - ${formatLang(line.credit)} |
2721 | - %endif |
2722 | - </div> |
2723 | - </div> |
2724 | - %endfor |
2725 | - </div> |
2726 | - </div> |
2727 | - <div class="act_as_table list_table" style="margin-top:5px;"> |
2728 | - <div class="act_as_row labels" style="font-weight: bold; font-size: 12px;"> |
2729 | - ## label |
2730 | - <div class="act_as_cell" style="width: 880px;"> |
2731 | - %if line_group_key == 'credits_to_reconcile': |
2732 | - ${_("Total")} ${_('Credits to reconcile')} |
2733 | - %elif line_group_key == 'debits_to_reconcile': |
2734 | - ${_("Total")} ${_('Debits to reconcile')} |
2735 | - %elif line_group_key == 'incomes_to_register': |
2736 | - ${_("Total")} ${_('Incomes to register')} |
2737 | - %else: |
2738 | - ${_("Total")} ${_('Expenditures to register')} |
2739 | - %endif |
2740 | - </div> |
2741 | - <div class="act_as_cell amount" style="width: 200px;"> |
2742 | - %if account_is_foreign: |
2743 | - ${bank_account.currency_id.symbol} ${formatLang(bank_balance[line_group_key])} |
2744 | - %else: |
2745 | - ${company.currency_id.symbol} ${formatLang(bank_balance[line_group_key])} |
2746 | - %endif |
2747 | - </div> |
2748 | - </div> |
2749 | - </div> |
2750 | - %endfor |
2751 | -</body> |
2752 | -</html> |
2753 | |
2754 | === renamed file 'l10n_cr_account_banking_reports/report/conciliation_bank.py' => 'l10n_cr_account_banking_reports/report/conciliation_bank.py.THIS' |
2755 | === removed file 'l10n_cr_account_banking_reports/report/report.xml' |
2756 | --- l10n_cr_account_banking_reports/report/report.xml 2012-09-05 20:46:51 +0000 |
2757 | +++ l10n_cr_account_banking_reports/report/report.xml 1970-01-01 00:00:00 +0000 |
2758 | @@ -1,20 +0,0 @@ |
2759 | -<?xml version="1.0" encoding="utf-8"?> |
2760 | -<openerp> |
2761 | - <data> |
2762 | - |
2763 | - <record id="l10n_cr_account_banking_reports.account_report_conciliation_bank_webkit" model="ir.actions.report.xml"> |
2764 | - <field name="report_type">webkit</field> |
2765 | - <field name="report_name">account_financial_report_webkit.account.account_report_conciliation_bank_webkit</field> |
2766 | - <field eval="[(6,0,[])]" name="groups_id"/> |
2767 | - <field eval="0" name="multi"/> |
2768 | - <field eval="0" name="auto"/> |
2769 | - <field eval="1" name="header"/> |
2770 | - <field name="model">account.account</field> |
2771 | - <field name="type">ir.actions.report.xml</field> |
2772 | - <field name="name">Conciliation Bank Webkit</field> |
2773 | - <field name="report_rml">l10n_cr_account_banking_reports/report/conciliation_bank.mako</field> |
2774 | - <field name="report_file">l10n_cr_account_banking_reports/report/conciliation_bank.mako</field> |
2775 | - </record> |
2776 | - |
2777 | - </data> |
2778 | -</openerp> |
2779 | |
2780 | === removed file 'l10n_cr_account_banking_reports/report_menus.xml' |
2781 | --- l10n_cr_account_banking_reports/report_menus.xml 2012-07-18 22:46:28 +0000 |
2782 | +++ l10n_cr_account_banking_reports/report_menus.xml 1970-01-01 00:00:00 +0000 |
2783 | @@ -1,10 +0,0 @@ |
2784 | -<?xml version="1.0" encoding="utf-8"?> |
2785 | -<openerp> |
2786 | - <data> |
2787 | - |
2788 | - <menuitem icon="STOCK_PRINT" name="Conciliation Bank" |
2789 | - parent="account.next_id_22" action="action_conciliation_bank_menu_webkit" |
2790 | - groups="account.group_account_manager,account.group_account_user" id="menu_conciliation_bank"/> |
2791 | - |
2792 | - </data> |
2793 | -</openerp> |
2794 | |
2795 | === removed file 'l10n_cr_account_banking_reports/wizard/__init__.py' |
2796 | --- l10n_cr_account_banking_reports/wizard/__init__.py 2012-07-18 22:46:28 +0000 |
2797 | +++ l10n_cr_account_banking_reports/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
2798 | @@ -1,23 +0,0 @@ |
2799 | -# -*- coding: utf-8 -*- |
2800 | -############################################################################## |
2801 | -# |
2802 | -# OpenERP, Open Source Management Solution |
2803 | -# Addons modules by CLEARCORP S.A. |
2804 | -# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
2805 | -# |
2806 | -# This program is free software: you can redistribute it and/or modify |
2807 | -# it under the terms of the GNU Affero General Public License as |
2808 | -# published by the Free Software Foundation, either version 3 of the |
2809 | -# License, or (at your option) any later version. |
2810 | -# |
2811 | -# This program is distributed in the hope that it will be useful, |
2812 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2813 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2814 | -# GNU Affero General Public License for more details. |
2815 | -# |
2816 | -# You should have received a copy of the GNU Affero General Public License |
2817 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2818 | -# |
2819 | -############################################################################## |
2820 | - |
2821 | -import conciliation_bank_wizard |
2822 | |
2823 | === removed file 'l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.py' |
2824 | --- l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.py 2013-01-17 19:04:40 +0000 |
2825 | +++ l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.py 1970-01-01 00:00:00 +0000 |
2826 | @@ -1,63 +0,0 @@ |
2827 | -# -*- coding: utf-8 -*- |
2828 | -############################################################################## |
2829 | -# |
2830 | -# OpenERP, Open Source Management Solution |
2831 | -# Addons modules by CLEARCORP S.A. |
2832 | -# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
2833 | -# |
2834 | -# This program is free software: you can redistribute it and/or modify |
2835 | -# it under the terms of the GNU Affero General Public License as |
2836 | -# published by the Free Software Foundation, either version 3 of the |
2837 | -# License, or (at your option) any later version. |
2838 | -# |
2839 | -# This program is distributed in the hope that it will be useful, |
2840 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2841 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2842 | -# GNU Affero General Public License for more details. |
2843 | -# |
2844 | -# You should have received a copy of the GNU Affero General Public License |
2845 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2846 | -# |
2847 | -############################################################################## |
2848 | - |
2849 | -import time |
2850 | - |
2851 | -from osv import fields, osv |
2852 | - |
2853 | -class l10n_cr_ConciliationBankWizard(osv.osv_memory): |
2854 | - |
2855 | - _inherit = "partners.ledger.webkit" |
2856 | - _name = "conciliation.bank.webkit" |
2857 | - _description = "Conciliation Bank Report" |
2858 | - |
2859 | - _columns = { |
2860 | - 'bank_account_ids': fields.many2one('account.account', 'Bank Account', domain="[('user_type.code','=','BKVI')]", help="Bank Account"), |
2861 | - 'bank_balance': fields.float('Bank Balance'), |
2862 | - 'filter': fields.selection([('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by", required=True), |
2863 | - 'historic_strict': fields.boolean('Strict History', help="If selected, will display a historical unreconciled lines, taking into account the end of the period or date selected"), |
2864 | - 'special_period': fields.boolean('Special period', help="Include special period"), |
2865 | - } |
2866 | - |
2867 | - _defaults = { |
2868 | - 'filter': 'filter_period', |
2869 | - } |
2870 | - |
2871 | - def pre_print_report(self, cr, uid, ids, data, context=None): |
2872 | - data = super(l10n_cr_ConciliationBankWizard, self).pre_print_report(cr, uid, ids, data, context) |
2873 | - if context is None: |
2874 | - context = {} |
2875 | - # will be used to attach the report on the main account |
2876 | - data['ids'] = [data['form']['chart_account_id']] |
2877 | - vals = self.read(cr, uid, ids, |
2878 | - ['bank_account_ids', 'bank_balance','historic_strict', 'special_period'], |
2879 | - context=context)[0] |
2880 | - data['form'].update(vals) |
2881 | - return data |
2882 | - |
2883 | - def _print_report(self, cursor, uid, ids, data, context=None): |
2884 | - context = context or {} |
2885 | - # we update form with display account value |
2886 | - data = self.pre_print_report(cursor, uid, ids, data, context=context) |
2887 | - return {'type': 'ir.actions.report.xml', |
2888 | - 'report_name': 'account_financial_report_webkit.account.account_report_conciliation_bank_webkit', |
2889 | - 'datas': data} |
2890 | \ No newline at end of file |
2891 | |
2892 | === renamed file 'l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.xml' => 'l10n_cr_account_banking_reports/wizard/conciliation_bank_wizard.xml.THIS' |
2893 | === removed file 'l10n_cr_account_banking_reports/wizard/wizard.xml' |
2894 | --- l10n_cr_account_banking_reports/wizard/wizard.xml 2012-07-18 22:46:28 +0000 |
2895 | +++ l10n_cr_account_banking_reports/wizard/wizard.xml 1970-01-01 00:00:00 +0000 |
2896 | @@ -1,4 +0,0 @@ |
2897 | -<?xml version="1.0" ?> |
2898 | -<openerp> |
2899 | - <data> </data> |
2900 | -</openerp> |
2901 | |
2902 | === added directory 'l10n_cr_account_conciliation_bank_report' |
2903 | === added file 'l10n_cr_account_conciliation_bank_report/__init__.py' |
2904 | --- l10n_cr_account_conciliation_bank_report/__init__.py 1970-01-01 00:00:00 +0000 |
2905 | +++ l10n_cr_account_conciliation_bank_report/__init__.py 2013-12-06 21:45:38 +0000 |
2906 | @@ -0,0 +1,25 @@ |
2907 | +# -*- coding: utf-8 -*- |
2908 | +############################################################################## |
2909 | +# |
2910 | +# OpenERP, Open Source Management Solution |
2911 | +# Addons modules by CLEARCORP S.A. |
2912 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
2913 | +# |
2914 | +# This program is free software: you can redistribute it and/or modify |
2915 | +# it under the terms of the GNU Affero General Public License as |
2916 | +# published by the Free Software Foundation, either version 3 of the |
2917 | +# License, or (at your option) any later version. |
2918 | +# |
2919 | +# This program is distributed in the hope that it will be useful, |
2920 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2921 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2922 | +# GNU Affero General Public License for more details. |
2923 | +# |
2924 | +# You should have received a copy of the GNU Affero General Public License |
2925 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2926 | +# |
2927 | +############################################################################## |
2928 | + |
2929 | +import l10n_cr_account_conciliation_bank_report |
2930 | +import wizard |
2931 | +import report |
2932 | |
2933 | === added file 'l10n_cr_account_conciliation_bank_report/__openerp__.py' |
2934 | --- l10n_cr_account_conciliation_bank_report/__openerp__.py 1970-01-01 00:00:00 +0000 |
2935 | +++ l10n_cr_account_conciliation_bank_report/__openerp__.py 2013-12-06 21:45:38 +0000 |
2936 | @@ -0,0 +1,58 @@ |
2937 | +# -*- coding: utf-8 -*- |
2938 | +############################################################################## |
2939 | +# |
2940 | +# OpenERP, Open Source Management Solution |
2941 | +# Addons modules by CLEARCORP S.A. |
2942 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
2943 | +# |
2944 | +# This program is free software: you can redistribute it and/or modify |
2945 | +# it under the terms of the GNU Affero General Public License as |
2946 | +# published by the Free Software Foundation, either version 3 of the |
2947 | +# License, or (at your option) any later version. |
2948 | +# |
2949 | +# This program is distributed in the hope that it will be useful, |
2950 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2951 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2952 | +# GNU Affero General Public License for more details. |
2953 | +# |
2954 | +# You should have received a copy of the GNU Affero General Public License |
2955 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2956 | +# |
2957 | +############################################################################## |
2958 | + |
2959 | + |
2960 | +{ |
2961 | + 'name': 'Conciliation Bank Report Webkit', |
2962 | + 'description': """Install the Conciliation Bank Report. |
2963 | + Configuration: |
2964 | + 1. Configure type account that it will appear in wizard. This configuration is in Accounting -> Account -> Account Types and check |
2965 | + "Include in conciliation bank report" option. |
2966 | + |
2967 | + 2. With previous configuration, accounts that will appears in wizard to generate report will be parents of account that match with type selected in |
2968 | + previous configuration. |
2969 | + |
2970 | + 3. With this configuration, Conciliation Bank Report has configuration for accounts that it will be necesary, that is reconciled and transit account. |
2971 | + """, |
2972 | + 'version': '1.0', |
2973 | + 'author': 'CLEARCORP S.A.', |
2974 | + 'category': 'Finance', |
2975 | + 'website': "http://clearcorp.co.cr", |
2976 | + 'images': [], |
2977 | + 'depends': [ |
2978 | + 'account', |
2979 | + 'account_report_lib', |
2980 | + 'account_report_signatures', ], |
2981 | + |
2982 | + 'init_xml': [], |
2983 | + 'demo_xml' : [], |
2984 | + 'update_xml': [ |
2985 | + 'report/report.xml', |
2986 | + 'wizard/l10n_cr_account_conciliation_bank_report_wizard.xml', |
2987 | + 'l10n_cr_account_conciliation_bank_report.xml', |
2988 | + 'report_menus.xml', |
2989 | + ], |
2990 | + 'test': [], |
2991 | + 'active': False, |
2992 | + 'installable': True, |
2993 | + 'license': 'AGPL-3', |
2994 | +} |
2995 | |
2996 | === added directory 'l10n_cr_account_conciliation_bank_report/i18n' |
2997 | === added file 'l10n_cr_account_conciliation_bank_report/i18n/es_CR.po' |
2998 | --- l10n_cr_account_conciliation_bank_report/i18n/es_CR.po 1970-01-01 00:00:00 +0000 |
2999 | +++ l10n_cr_account_conciliation_bank_report/i18n/es_CR.po 2013-12-06 21:45:38 +0000 |
3000 | @@ -0,0 +1,396 @@ |
3001 | +# Translation of OpenERP Server. |
3002 | +# This file contains the translation of the following modules: |
3003 | +# * l10n_cr_account_conciliation_bank_report |
3004 | +# |
3005 | +msgid "" |
3006 | +msgstr "" |
3007 | +"Project-Id-Version: OpenERP Server 7.0\n" |
3008 | +"Report-Msgid-Bugs-To: \n" |
3009 | +"POT-Creation-Date: 2013-08-12 14:35+0000\n" |
3010 | +"PO-Revision-Date: 2013-08-12 14:35+0000\n" |
3011 | +"Last-Translator: <>\n" |
3012 | +"Language-Team: \n" |
3013 | +"MIME-Version: 1.0\n" |
3014 | +"Content-Type: text/plain; charset=UTF-8\n" |
3015 | +"Content-Transfer-Encoding: \n" |
3016 | +"Plural-Forms: \n" |
3017 | + |
3018 | +#. module: l10n_cr_account_conciliation_bank_report |
3019 | +#: code:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py:198 |
3020 | +#, python-format |
3021 | +msgid "Reconciled account does not exist. Check your configuration!" |
3022 | +msgstr "Cuenta de conciliación no existe. Revise su configuración!" |
3023 | + |
3024 | +#. module: l10n_cr_account_conciliation_bank_report |
3025 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:85 |
3026 | +msgid "- Expenditures to register" |
3027 | +msgstr "- Egresos por registrar" |
3028 | + |
3029 | +#. module: l10n_cr_account_conciliation_bank_report |
3030 | +#: help:conciliation.bank.report.wiz,amount_currency:0 |
3031 | +msgid "It adds the currency column on report if the currency differs from the company currency." |
3032 | +msgstr "Añade una columna de moneda en el reporte si la moneda es diferente de la moneda de la compañía." |
3033 | + |
3034 | +#. module: l10n_cr_account_conciliation_bank_report |
3035 | +#: code:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py:201 |
3036 | +#, python-format |
3037 | +msgid "Transit account does not exist. Check your configuration!" |
3038 | +msgstr "Cuenta de tránsito de bancos no existe. Revise su configuración!" |
3039 | + |
3040 | +#. module: l10n_cr_account_conciliation_bank_report |
3041 | +#: field:conciliation.bank.report.wiz,period_from:0 |
3042 | +msgid "Start Period" |
3043 | +msgstr "Período Inicial" |
3044 | + |
3045 | +#. module: l10n_cr_account_conciliation_bank_report |
3046 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:32 |
3047 | +msgid "Periods Filter" |
3048 | +msgstr "Filtro por períodos" |
3049 | + |
3050 | +#. module: l10n_cr_account_conciliation_bank_report |
3051 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:133 |
3052 | +msgid "Period" |
3053 | +msgstr "Período" |
3054 | + |
3055 | +#. module: l10n_cr_account_conciliation_bank_report |
3056 | +#: view:conciliation.bank.report.wiz:0 |
3057 | +msgid "This report allows you to print or generate a pdf of your conciliation bank with details of all your payable/receivable account" |
3058 | +msgstr "Este informe le permite imprimir o generar un pdf de su conciliación bancaria con los detalles de todas sus cuentas por pagar / por cobrar" |
3059 | + |
3060 | +#. module: l10n_cr_account_conciliation_bank_report |
3061 | +#: model:ir.model,name:l10n_cr_account_conciliation_bank_report.model_account_account_type |
3062 | +msgid "Account Type" |
3063 | +msgstr "Tipo de cuenta" |
3064 | + |
3065 | +#. module: l10n_cr_account_conciliation_bank_report |
3066 | +#: help:conciliation.bank.report.wiz,historic_strict:0 |
3067 | +msgid "If selected, will display a historical unreconciled lines, taking into account the end of the period or date selected" |
3068 | +msgstr "Si se selecciona, se mostrarán las líneas sin conciliar históricas, teniendo en cuenta el final del período o la fecha seleccionada" |
3069 | + |
3070 | +#. module: l10n_cr_account_conciliation_bank_report |
3071 | +#: view:conciliation.bank.report.wiz:0 |
3072 | +msgid "{'required':[('filter', '=', 'filter_period')]}" |
3073 | +msgstr "{'required':[('filter', '=', 'filter_period')]}" |
3074 | + |
3075 | +#. module: l10n_cr_account_conciliation_bank_report |
3076 | +#: code:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py:198 |
3077 | +#: code:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py:201 |
3078 | +#, python-format |
3079 | +msgid "Error !" |
3080 | +msgstr "Error !" |
3081 | + |
3082 | +#. module: l10n_cr_account_conciliation_bank_report |
3083 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:73 |
3084 | +msgid "Ledger Balance" |
3085 | +msgstr "Saldo en Libros" |
3086 | + |
3087 | +#. module: l10n_cr_account_conciliation_bank_report |
3088 | +#: field:account.account.type,include_profit_statement_report:0 |
3089 | +msgid "Include in Profit Statement Report" |
3090 | +msgstr "Incluir en el Reporte de Estados de Resultados" |
3091 | + |
3092 | +#. module: l10n_cr_account_conciliation_bank_report |
3093 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:121 |
3094 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:183 |
3095 | +msgid "Incomes to register" |
3096 | +msgstr "Ingresos por registrar" |
3097 | + |
3098 | +#. module: l10n_cr_account_conciliation_bank_report |
3099 | +#: field:conciliation.bank.report.wiz,company_id:0 |
3100 | +msgid "Company" |
3101 | +msgstr "Compañía" |
3102 | + |
3103 | +#. module: l10n_cr_account_conciliation_bank_report |
3104 | +#: field:conciliation.bank.report.wiz,amount_currency:0 |
3105 | +msgid "With Currency" |
3106 | +msgstr "Con moneda" |
3107 | + |
3108 | +#. module: l10n_cr_account_conciliation_bank_report |
3109 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:154 |
3110 | +msgid "-- No partner --" |
3111 | +msgstr "-- Sin empresa --" |
3112 | + |
3113 | +#. module: l10n_cr_account_conciliation_bank_report |
3114 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:19 |
3115 | +#: model:ir.actions.act_window,name:l10n_cr_account_conciliation_bank_report.action_conciliation_bank_report_menu_webkit |
3116 | +#: model:ir.actions.report.xml,name:l10n_cr_account_conciliation_bank_report.conciliation_bank_report_webkit |
3117 | +msgid "Conciliation Bank Report" |
3118 | +msgstr "Reporte de Conciliación Bancaria" |
3119 | + |
3120 | +#. module: l10n_cr_account_conciliation_bank_report |
3121 | +#: view:conciliation.bank.report.wiz:0 |
3122 | +msgid "{'invisible': True, 'required': False}" |
3123 | +msgstr "{'invisible': True, 'required': False}" |
3124 | + |
3125 | +#. module: l10n_cr_account_conciliation_bank_report |
3126 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:91 |
3127 | +msgid "Ledger reconciled Total" |
3128 | +msgstr "Total conciliado en Libros" |
3129 | + |
3130 | +#. module: l10n_cr_account_conciliation_bank_report |
3131 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:132 |
3132 | +#: selection:conciliation.bank.report.wiz,filter:0 |
3133 | +msgid "Date" |
3134 | +msgstr "Fecha" |
3135 | + |
3136 | +#. module: l10n_cr_account_conciliation_bank_report |
3137 | +#: view:conciliation.bank.report.wiz:0 |
3138 | +msgid "Accounts" |
3139 | +msgstr "Cuentas" |
3140 | + |
3141 | +#. module: l10n_cr_account_conciliation_bank_report |
3142 | +#: field:conciliation.bank.report.wiz,chart_account_id:0 |
3143 | +msgid "Chart of Account" |
3144 | +msgstr "Catálogo de cuentas" |
3145 | + |
3146 | +#. module: l10n_cr_account_conciliation_bank_report |
3147 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:119 |
3148 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:181 |
3149 | +msgid "Debits to reconcile" |
3150 | +msgstr "Débitos por conciliar" |
3151 | + |
3152 | +#. module: l10n_cr_account_conciliation_bank_report |
3153 | +#: view:conciliation.bank.report.wiz:0 |
3154 | +#: field:conciliation.bank.report.wiz,journal_ids:0 |
3155 | +msgid "Journals" |
3156 | +msgstr "Diarios" |
3157 | + |
3158 | +#. module: l10n_cr_account_conciliation_bank_report |
3159 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:46 |
3160 | +#: field:conciliation.bank.report.wiz,target_move:0 |
3161 | +msgid "Target Moves" |
3162 | +msgstr "Movimientos destino" |
3163 | + |
3164 | +#. module: l10n_cr_account_conciliation_bank_report |
3165 | +#: help:conciliation.bank.report.wiz,chart_account_id:0 |
3166 | +msgid "Select Charts of Accounts" |
3167 | +msgstr "Seleccione el catálogo contable" |
3168 | + |
3169 | +#. module: l10n_cr_account_conciliation_bank_report |
3170 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:38 |
3171 | +msgid "To:" |
3172 | +msgstr "Hasta:" |
3173 | + |
3174 | +#. module: l10n_cr_account_conciliation_bank_report |
3175 | +#: field:conciliation.bank.report.wiz,date_to:0 |
3176 | +msgid "End Date" |
3177 | +msgstr "Fecha final" |
3178 | + |
3179 | +#. module: l10n_cr_account_conciliation_bank_report |
3180 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:135 |
3181 | +msgid "Account" |
3182 | +msgstr "Cuenta" |
3183 | + |
3184 | +#. module: l10n_cr_account_conciliation_bank_report |
3185 | +#: view:conciliation.bank.report.wiz:0 |
3186 | +#: model:ir.ui.menu,name:l10n_cr_account_conciliation_bank_report.menu_conciliation_bank |
3187 | +msgid "Conciliation Bank" |
3188 | +msgstr "Conciliación Bancaria" |
3189 | + |
3190 | +#. module: l10n_cr_account_conciliation_bank_report |
3191 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:117 |
3192 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:179 |
3193 | +msgid "Credits to reconcile" |
3194 | +msgstr "Créditos por conciliar" |
3195 | + |
3196 | +#. module: l10n_cr_account_conciliation_bank_report |
3197 | +#: view:conciliation.bank.report.wiz:0 |
3198 | +msgid "{'invisible': True}" |
3199 | +msgstr "{'invisible': True}" |
3200 | + |
3201 | +#. module: l10n_cr_account_conciliation_bank_report |
3202 | +#: selection:conciliation.bank.report.wiz,target_move:0 |
3203 | +msgid "All Posted Entries" |
3204 | +msgstr "Todos los apuntes publicados" |
3205 | + |
3206 | +#. module: l10n_cr_account_conciliation_bank_report |
3207 | +#: view:conciliation.bank.report.wiz:0 |
3208 | +msgid "{'required': [('filter', '=', 'filter_date')]}" |
3209 | +msgstr "{'required': [('filter', '=', 'filter_date')]}" |
3210 | + |
3211 | +#. module: l10n_cr_account_conciliation_bank_report |
3212 | +#: field:conciliation.bank.report.wiz,account_ids:0 |
3213 | +msgid "Bank Account" |
3214 | +msgstr "Cuenta bancaria" |
3215 | + |
3216 | +#. module: l10n_cr_account_conciliation_bank_report |
3217 | +#: view:conciliation.bank.report.wiz:0 |
3218 | +msgid "{'required': True}" |
3219 | +msgstr "{'required': True}" |
3220 | + |
3221 | +#. module: l10n_cr_account_conciliation_bank_report |
3222 | +#: help:conciliation.bank.report.wiz,fiscalyear_id:0 |
3223 | +msgid "Keep empty for all open fiscal year" |
3224 | +msgstr "Mantega vacío para todos los años fiscales abiertos" |
3225 | + |
3226 | +#. module: l10n_cr_account_conciliation_bank_report |
3227 | +#: field:conciliation.bank.report.wiz,period_to:0 |
3228 | +msgid "End Period" |
3229 | +msgstr "Período final" |
3230 | + |
3231 | +#. module: l10n_cr_account_conciliation_bank_report |
3232 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:139 |
3233 | +msgid "Amount" |
3234 | +msgstr "Monto" |
3235 | + |
3236 | +#. module: l10n_cr_account_conciliation_bank_report |
3237 | +#: view:conciliation.bank.report.wiz:0 |
3238 | +msgid "True" |
3239 | +msgstr "True" |
3240 | + |
3241 | +#. module: l10n_cr_account_conciliation_bank_report |
3242 | +#: field:conciliation.bank.report.wiz,historic_strict:0 |
3243 | +msgid "Strict History" |
3244 | +msgstr "Histórico estricto" |
3245 | + |
3246 | +#. module: l10n_cr_account_conciliation_bank_report |
3247 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:75 |
3248 | +#: field:conciliation.bank.report.wiz,bank_balance:0 |
3249 | +msgid "Bank Balance" |
3250 | +msgstr "Balance en Bancos" |
3251 | + |
3252 | +#. module: l10n_cr_account_conciliation_bank_report |
3253 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:215 |
3254 | +msgid "Authorized by: " |
3255 | +msgstr "Autorizado por: " |
3256 | + |
3257 | +#. module: l10n_cr_account_conciliation_bank_report |
3258 | +#: model:ir.model,name:l10n_cr_account_conciliation_bank_report.model_conciliation_bank_report_wiz |
3259 | +msgid "Conciliation Bank Report Wizard" |
3260 | +msgstr "Asistente del repote de Conciliación Bancaria" |
3261 | + |
3262 | +#. module: l10n_cr_account_conciliation_bank_report |
3263 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:138 |
3264 | +msgid "Label" |
3265 | +msgstr "Etiqueta" |
3266 | + |
3267 | +#. module: l10n_cr_account_conciliation_bank_report |
3268 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:61 |
3269 | +msgid "Balance according Bank" |
3270 | +msgstr "Saldo según Banco" |
3271 | + |
3272 | +#. module: l10n_cr_account_conciliation_bank_report |
3273 | +#: help:account.account.type,include_profit_statement_report:0 |
3274 | +msgid "If it's checked, the account that have this type is include in Profit Statement Report Wizard as Base Account to compare." |
3275 | +msgstr "Si está marcado, la cuenta que tenga este tipo es incluída en el asistente del Reporte de Estado de REsultados como cuenta base para comparar." |
3276 | + |
3277 | +#. module: l10n_cr_account_conciliation_bank_report |
3278 | +#: view:account.account.type:0 |
3279 | +msgid "Configuration for Conciliation Bank Report" |
3280 | +msgstr "Configuración para el Reporte de Conciliación Bancaria" |
3281 | + |
3282 | +#. module: l10n_cr_account_conciliation_bank_report |
3283 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:27 |
3284 | +#: field:conciliation.bank.report.wiz,fiscalyear_id:0 |
3285 | +msgid "Fiscal Year" |
3286 | +msgstr "Año fiscal" |
3287 | + |
3288 | +#. module: l10n_cr_account_conciliation_bank_report |
3289 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:93 |
3290 | +msgid "Bank reconciled Total" |
3291 | +msgstr "Total conciliado en Banco" |
3292 | + |
3293 | +#. module: l10n_cr_account_conciliation_bank_report |
3294 | +#: help:account.account.type,include_conciliation_report:0 |
3295 | +msgid "If it's checked, the account that have this type is include in Conciliation Bank Report Wizard" |
3296 | +msgstr "Si está chequeado, la cuenta que tenga este tipo es incluído en el asistente para el Reporte de Conciliación Bancaria" |
3297 | + |
3298 | +#. module: l10n_cr_account_conciliation_bank_report |
3299 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:123 |
3300 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:185 |
3301 | +msgid "Expenditures to register" |
3302 | +msgstr "Egresos por registrar" |
3303 | + |
3304 | +#. module: l10n_cr_account_conciliation_bank_report |
3305 | +#: field:conciliation.bank.report.wiz,special_period:0 |
3306 | +msgid "Special period" |
3307 | +msgstr "Período especial" |
3308 | + |
3309 | +#. module: l10n_cr_account_conciliation_bank_report |
3310 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:137 |
3311 | +msgid "Reference" |
3312 | +msgstr "Referencia" |
3313 | + |
3314 | +#. module: l10n_cr_account_conciliation_bank_report |
3315 | +#: field:account.account.type,include_conciliation_report:0 |
3316 | +msgid "Include in conciliation bank report" |
3317 | +msgstr "Incluir en el reporte de conciliación bancaria" |
3318 | + |
3319 | +#. module: l10n_cr_account_conciliation_bank_report |
3320 | +#: field:conciliation.bank.report.wiz,filter:0 |
3321 | +msgid "Filter by" |
3322 | +msgstr "Filtrado por" |
3323 | + |
3324 | +#. module: l10n_cr_account_conciliation_bank_report |
3325 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:81 |
3326 | +msgid "+ Credits to reconcile" |
3327 | +msgstr "+ Créditos por conciliar" |
3328 | + |
3329 | +#. module: l10n_cr_account_conciliation_bank_report |
3330 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:87 |
3331 | +msgid "- Debits to reconcile" |
3332 | +msgstr "- Débitos por conciliar" |
3333 | + |
3334 | +#. module: l10n_cr_account_conciliation_bank_report |
3335 | +#: field:conciliation.bank.report.wiz,account_base_report:0 |
3336 | +msgid "Account Base Report" |
3337 | +msgstr "Cuenta Base de comparación" |
3338 | + |
3339 | +#. module: l10n_cr_account_conciliation_bank_report |
3340 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:30 |
3341 | +msgid "Dates Filter" |
3342 | +msgstr "Filtro por Fechas" |
3343 | + |
3344 | +#. module: l10n_cr_account_conciliation_bank_report |
3345 | +#: help:conciliation.bank.report.wiz,special_period:0 |
3346 | +msgid "Include special period" |
3347 | +msgstr "Incluir períodos especiales" |
3348 | + |
3349 | +#. module: l10n_cr_account_conciliation_bank_report |
3350 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:79 |
3351 | +msgid "+ Incomes to register" |
3352 | +msgstr "+ Ingresos por registrar" |
3353 | + |
3354 | +#. module: l10n_cr_account_conciliation_bank_report |
3355 | +#: selection:conciliation.bank.report.wiz,filter:0 |
3356 | +msgid "Periods" |
3357 | +msgstr "Períodos" |
3358 | + |
3359 | +#. module: l10n_cr_account_conciliation_bank_report |
3360 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:34 |
3361 | +msgid "No filters" |
3362 | +msgstr "Sin filtros" |
3363 | + |
3364 | +#. module: l10n_cr_account_conciliation_bank_report |
3365 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:136 |
3366 | +msgid "Partner" |
3367 | +msgstr "Empresa" |
3368 | + |
3369 | +#. module: l10n_cr_account_conciliation_bank_report |
3370 | +#: field:conciliation.bank.report.wiz,date_from:0 |
3371 | +msgid "Start Date" |
3372 | +msgstr "Fecha inicial" |
3373 | + |
3374 | +#. module: l10n_cr_account_conciliation_bank_report |
3375 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:179 |
3376 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:181 |
3377 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:183 |
3378 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:185 |
3379 | +msgid "Total" |
3380 | +msgstr "Total" |
3381 | + |
3382 | +#. module: l10n_cr_account_conciliation_bank_report |
3383 | +#: view:conciliation.bank.report.wiz:0 |
3384 | +msgid "Account Financial Report" |
3385 | +msgstr "Reporte Financiero" |
3386 | + |
3387 | +#. module: l10n_cr_account_conciliation_bank_report |
3388 | +#: report:addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako:134 |
3389 | +msgid "Journal" |
3390 | +msgstr "Diario" |
3391 | + |
3392 | +#. module: l10n_cr_account_conciliation_bank_report |
3393 | +#: selection:conciliation.bank.report.wiz,target_move:0 |
3394 | +msgid "All Entries" |
3395 | +msgstr "Todos los apuntes" |
3396 | + |
3397 | |
3398 | === added file 'l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.py' |
3399 | --- l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.py 1970-01-01 00:00:00 +0000 |
3400 | +++ l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.py 2013-12-06 21:45:38 +0000 |
3401 | @@ -0,0 +1,39 @@ |
3402 | +# -*- coding: utf-8 -*- |
3403 | +############################################################################## |
3404 | +# |
3405 | +# OpenERP, Open Source Management Solution |
3406 | +# Addons modules by CLEARCORP S.A. |
3407 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
3408 | +# |
3409 | +# This program is free software: you can redistribute it and/or modify |
3410 | +# it under the terms of the GNU Affero General Public License as |
3411 | +# published by the Free Software Foundation, either version 3 of the |
3412 | +# License, or (at your option) any later version. |
3413 | +# |
3414 | +# This program is distributed in the hope that it will be useful, |
3415 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3416 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3417 | +# GNU Affero General Public License for more details. |
3418 | +# |
3419 | +# You should have received a copy of the GNU Affero General Public License |
3420 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3421 | +# |
3422 | +############################################################################## |
3423 | + |
3424 | +from osv import fields, orm, osv |
3425 | +from tools.translate import _ |
3426 | + |
3427 | +class acccountAccounttypeConciliationbank(orm.Model): |
3428 | + """ |
3429 | + This class extend functions of account.account.type |
3430 | + |
3431 | + If include_conciliation_report is checked, all parent accounts that child account have some account type with include_conciliation_report in True, |
3432 | + they will appear in Conciliation Bank Wizard as a option account for print the report. |
3433 | + |
3434 | + """ |
3435 | + _name = "account.account.type" |
3436 | + _inherit = "account.account.type" |
3437 | + |
3438 | + _columns = { |
3439 | + 'include_conciliation_report': fields.boolean('Include in conciliation bank report', help="If it's checked, the account that have this type is include in Conciliation Bank Report Wizard") |
3440 | + } |
3441 | \ No newline at end of file |
3442 | |
3443 | === added file 'l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.xml' |
3444 | --- l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.xml 1970-01-01 00:00:00 +0000 |
3445 | +++ l10n_cr_account_conciliation_bank_report/l10n_cr_account_conciliation_bank_report.xml 2013-12-06 21:45:38 +0000 |
3446 | @@ -0,0 +1,18 @@ |
3447 | +<?xml version="1.0" encoding="utf-8"?> |
3448 | +<openerp> |
3449 | + <data> |
3450 | + <!-- Account Type --> |
3451 | + <record id="view_account_type_form_inherit" model="ir.ui.view"> |
3452 | + <field name="name">account.account.type.form.inherit</field> |
3453 | + <field name="model">account.account.type</field> |
3454 | + <field name="inherit_id" ref="account.view_account_type_form"/> |
3455 | + <field name="arch" type="xml"> |
3456 | + <field name="note" position="after"> |
3457 | + <group col="4" string="Configuration for Conciliation Bank Report"> |
3458 | + <field name="include_conciliation_report"/> |
3459 | + </group> |
3460 | + </field> |
3461 | + </field> |
3462 | + </record> |
3463 | + </data> |
3464 | +</openerp> |
3465 | |
3466 | === added directory 'l10n_cr_account_conciliation_bank_report/report' |
3467 | === added file 'l10n_cr_account_conciliation_bank_report/report/__init__.py' |
3468 | --- l10n_cr_account_conciliation_bank_report/report/__init__.py 1970-01-01 00:00:00 +0000 |
3469 | +++ l10n_cr_account_conciliation_bank_report/report/__init__.py 2013-12-06 21:45:38 +0000 |
3470 | @@ -0,0 +1,23 @@ |
3471 | +# -*- coding: utf-8 -*- |
3472 | +############################################################################## |
3473 | +# |
3474 | +# OpenERP, Open Source Management Solution |
3475 | +# Addons modules by CLEARCORP S.A. |
3476 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
3477 | +# |
3478 | +# This program is free software: you can redistribute it and/or modify |
3479 | +# it under the terms of the GNU Affero General Public License as |
3480 | +# published by the Free Software Foundation, either version 3 of the |
3481 | +# License, or (at your option) any later version. |
3482 | +# |
3483 | +# This program is distributed in the hope that it will be useful, |
3484 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3485 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3486 | +# GNU Affero General Public License for more details. |
3487 | +# |
3488 | +# You should have received a copy of the GNU Affero General Public License |
3489 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3490 | +# |
3491 | +############################################################################## |
3492 | + |
3493 | +import l10n_cr_account_conciliation_bank_report |
3494 | |
3495 | === added file 'l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako' |
3496 | --- l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako 1970-01-01 00:00:00 +0000 |
3497 | +++ l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako 2013-12-06 21:45:38 +0000 |
3498 | @@ -0,0 +1,237 @@ |
3499 | +<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3500 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
3501 | + <head> |
3502 | + <link rel='stylesheet' href='addons/account_webkit_report_library/webkit_headers/main.css' /> |
3503 | + <style> |
3504 | + ${css} |
3505 | + </style> |
3506 | + </head> |
3507 | + <body> |
3508 | + <%setLang(user.lang)%> |
3509 | + <% |
3510 | + bank_account = get_accounts_ids(cr, uid, data) |
3511 | + %> |
3512 | + <div class="table header"> |
3513 | + <div class="table-row"> |
3514 | + <div class="table-cell logo">${helper.embed_logo_by_name('default_logo', height=60)|n}</div> |
3515 | + <div class="table-cell text"> |
3516 | + <p class="company">${get_fiscal_year(data).company_id.name}</p> |
3517 | + <p class="title">${_('Conciliation Bank Report')}</p> |
3518 | + <p class="subtitle">${bank_account.name} - ${(bank_account.currency_id and bank_account.currency_id.name) or bank_account.company_id.currency_id.name}</p> |
3519 | + </div> |
3520 | + </div> |
3521 | + </div> |
3522 | + <div class="table list"> |
3523 | + <div class="table-header"> |
3524 | + <div class="table-row labels no-wrap"> |
3525 | + <div class="table-cell" style="width: 100px">${_('Fiscal Year')}<br/>${get_fiscal_year(data).name}</div> |
3526 | + <div class="table-cell" style="width: 100px"> |
3527 | + %if get_filter(data) == 'filter_date': |
3528 | + ${_('Dates Filter')} |
3529 | + %elif get_filter(data) == 'filter_period': |
3530 | + ${_('Periods Filter')} |
3531 | + %else: |
3532 | + ${_('No filters')} |
3533 | + %endif |
3534 | + <br/> |
3535 | + %if get_filter(data) != 'filter_no': |
3536 | + ${_('To:')} |
3537 | + %if get_filter(data) == 'filter_date': |
3538 | + ${ formatLang(get_date_to(data), date=True)} |
3539 | + %else: |
3540 | + ${get_end_period(data).name} |
3541 | + %endif |
3542 | + %endif |
3543 | + </div> |
3544 | + <div class="table-cell" style="width: 100px">${_('Target Moves')}<br/>${ display_target_move(data) }</div> |
3545 | + </div> |
3546 | + </div> |
3547 | + </div> |
3548 | + <br/><br/> |
3549 | + <% |
3550 | + account_id = get_accounts_ids(cr, uid, data).id |
3551 | + bank_balance, bank_move_lines, account_is_foreign = get_data(cr, uid, data, account_id) |
3552 | + input_bank_balance = get_bank_balance(data) or 0.0 |
3553 | + %> |
3554 | + <div align="center"> |
3555 | + <div class="table result"> |
3556 | + <div class="table-row blank no-wrap"> |
3557 | + <div class="table-cell" style="width: 70px"> </div> |
3558 | + <div class="table-cell" style="width: 70px"> </div> |
3559 | + <div class="table-cell" style="width: 70px">${_('Balance according Bank')}</div> |
3560 | + %if input_bank_balance == bank_balance['bank_balance']: |
3561 | + <div class="act_as_cell amount"> |
3562 | + ${formatLang(input_bank_balance)} |
3563 | + </div> |
3564 | + %else: |
3565 | + <div class="act_as_cell amount alert"> |
3566 | + ${formatLang(input_bank_balance)} |
3567 | + </div> |
3568 | + %endif |
3569 | + </div> |
3570 | + <div class="table-row labels no-wrap"> |
3571 | + <div class="table-cell">${_('Ledger Balance')}</div> |
3572 | + <div class="table-cell amount">${formatLang(bank_balance['accounting_balance'])}</div> |
3573 | + <div class="table-cell">${_('Bank Balance')}</div> |
3574 | + <div class="table-cell amount">${formatLang(bank_balance['bank_balance'])}</div> |
3575 | + </div> |
3576 | + <div class="table-row blank no-wrap"> |
3577 | + <div class="table-cell">${_('+ Incomes to register')}</div> |
3578 | + <div class="table-cell amount">${formatLang(bank_balance['incomes_to_register'])}</div> |
3579 | + <div class="table-cell">${_('+ Credits to reconcile')}</div> |
3580 | + <div class="table-cell amount">${formatLang(bank_balance['credits_to_reconcile'])}</div> |
3581 | + </div> |
3582 | + <div class="table-row blank no-wrap"> |
3583 | + <div class="table-cell">${_('- Expenditures to register')}</div> |
3584 | + <div class="table-cell amount">${formatLang(bank_balance['expenditures_to_register'])}</div> |
3585 | + <div class="table-cell">${_('- Debits to reconcile')}</div> |
3586 | + <div class="table-cell amount">${formatLang(bank_balance['debits_to_reconcile'])}</div> |
3587 | + </div> |
3588 | + <div class="table-row labels no-wrap"> |
3589 | + <div class="table-cell">${_('Ledger reconciled Total')}</div> |
3590 | + <div class="table-cell amount">${formatLang(bank_balance['accounting_total'])}</div> |
3591 | + <div class="table-cell">${_('Bank reconciled Total')}</div> |
3592 | + <div class="table-cell amount">${formatLang(bank_balance['bank_total'])}</div> |
3593 | + </div> |
3594 | + </div> |
3595 | + </div> |
3596 | + <% |
3597 | + def cmp (first, second): |
3598 | + list_ = [ |
3599 | + 'incomes_to_register', |
3600 | + 'expenditures_to_register', |
3601 | + 'credits_to_reconcile', |
3602 | + 'debits_to_reconcile', |
3603 | + ] |
3604 | + first_index = len(first) > 0 and first[0] in list_ and list_.index(first[0]) or -1 |
3605 | + second_index = len(second) > 0 and second[0] in list_ and list_.index(second[0]) or -1 |
3606 | + |
3607 | + return first_index - second_index |
3608 | + %> |
3609 | + %for line_group_key, line_group in sorted(bank_move_lines.items(),cmp): |
3610 | + <br/><br/> |
3611 | + <div class="table header"> |
3612 | + <div class="table-row"> |
3613 | + <div class="table-cell text"> |
3614 | + %if line_group_key == 'credits_to_reconcile': |
3615 | + <p class="subtitle">${_('Credits to reconcile')}</p> |
3616 | + %elif line_group_key == 'debits_to_reconcile': |
3617 | + <p class="subtitle">${_('Debits to reconcile')}</p> |
3618 | + %elif line_group_key == 'incomes_to_register': |
3619 | + <p class="subtitle">${_('Incomes to register')}</p> |
3620 | + %else: |
3621 | + <p class="subtitle">${_('Expenditures to register')}</p> |
3622 | + %endif |
3623 | + </div> |
3624 | + </div> |
3625 | + </div> |
3626 | + <br/><br/> |
3627 | + <div class="table list"> |
3628 | + <div class="table-header"> |
3629 | + <div class="table-row labels no-wrap"> |
3630 | + <div class="table-cell first-column" style="width: 55px">${_('Date')}</div> |
3631 | + <div class="table-cell" style="width: 70px">${_('Period')}</div> |
3632 | + <div class="table-cell" style="width: 70px">${_('Journal')}</div> |
3633 | + <div class="table-cell" style="width: 100px">${_('Account')}</div> |
3634 | + <div class="table-cell" style="width: 100px">${_('Partner')}</div> |
3635 | + <div class="table-cell" style="width: 70px">${_('Reference')}</div> |
3636 | + <div class="table-cell" style="width: 100px">${_('Label')}</div> |
3637 | + <div class="table-cell last_column" style="width: 70px">${_('Amount')}</div> |
3638 | + </div> |
3639 | + </div> |
3640 | + <div class="table-body"> |
3641 | + %for line in line_group: |
3642 | + <div class="table-row ${row_even and 'even' or 'odd'}"> |
3643 | + <div class="table-cell first-column">${formatLang(line.date, date=True)}</div> |
3644 | + <div class="table-cell">${line.period_id.code or ''}</div> |
3645 | + <div class="table-cell">${line.journal_id.code or ''}</div> |
3646 | + <div class="table-cell">${line.account_id.code}</div> |
3647 | + <div class="table-cell"> |
3648 | + %if line.partner_id: |
3649 | + ${(line.partner_id.ref and line.partner_id.ref + ' ') or ''} |
3650 | + ${(line.partner_id.name and line.partner_id.name) or ''} |
3651 | + %else: |
3652 | + ${_('-- No partner --')} |
3653 | + %endif |
3654 | + </div> |
3655 | + <div class="table-cell">${line.ref or ''}</div> |
3656 | + <div class="table-cell">${line.name}</div> |
3657 | + <div class="act_as_cell last_column amount"> |
3658 | + %if account_is_foreign: |
3659 | + ${formatLang(line.amount_currency)} |
3660 | + %elif line.debit > 0: |
3661 | + ${formatLang(line.debit)} |
3662 | + %else: |
3663 | + ${formatLang(line.credit)} |
3664 | + %endif |
3665 | + </div> |
3666 | + </div> |
3667 | + %endfor |
3668 | + </div> |
3669 | + </div> |
3670 | + <div class="table-row spacer"> |
3671 | + <div class="table-cell"> </div> |
3672 | + </div> |
3673 | + <div class="table list"> |
3674 | + <div class="table-row subtotal"> |
3675 | + <div class="table-cell first-column" style="width: 300px"> |
3676 | + %if line_group_key == 'credits_to_reconcile': |
3677 | + ${_("Total")} ${_('Credits to reconcile')} |
3678 | + %elif line_group_key == 'debits_to_reconcile': |
3679 | + ${_("Total")} ${_('Debits to reconcile')} |
3680 | + %elif line_group_key == 'incomes_to_register': |
3681 | + ${_("Total")} ${_('Incomes to register')} |
3682 | + %else: |
3683 | + ${_("Total")} ${_('Expenditures to register')} |
3684 | + %endif |
3685 | + </div> |
3686 | + <div class="table-cell" style="width: 70px"> </div> |
3687 | + <div class="table-cell" style="width: 70px"> </div> |
3688 | + <div class="table-cell" style="width: 100px"> </div> |
3689 | + <div class="table-cell" style="width: 100px"> </div> |
3690 | + <div class="table-cell" style="width: 70px"> </div> |
3691 | + <div class="table-cell" style="width: 100px"> </div> |
3692 | + <div class="table-cell last_column amount" style="width: 70px"> |
3693 | + %if account_is_foreign: |
3694 | + ${bank_account.currency_id.symbol} ${formatLang(bank_balance[line_group_key]) or 0.0} |
3695 | + %else: |
3696 | + ${company.currency_id.symbol} ${formatLang(bank_balance[line_group_key]) or 0.0} |
3697 | + %endif |
3698 | + </div> |
3699 | + </div> |
3700 | + </div> |
3701 | + %endfor |
3702 | + <div class="table-row spacer"> |
3703 | + <div class="table-cell"> </div> |
3704 | + </div> |
3705 | + <% |
3706 | + signatures = get_signatures_report(cr, uid, 'Conciliation Bank Report') |
3707 | + cont = 0 |
3708 | + %> |
3709 | + %if len(signatures) > 0: |
3710 | + <div class="table header"> |
3711 | + <div class="table-row"> |
3712 | + <div class="table-cell text"> |
3713 | + <p class="title">${_('Authorized by: ')}</p> |
3714 | + </div> |
3715 | + </div> |
3716 | + </div> |
3717 | + <br/><br/> |
3718 | + <div class="table header"> |
3719 | + <div class="table-row"> |
3720 | + <div class="table-cell text"> |
3721 | + %for user_sign in signatures: |
3722 | + <div class="table-cell text">_________________________________________________________<br/> |
3723 | + <p class="subtitle">${user_sign.name}</p> |
3724 | + <p class="company"><i>${user_sign.job_id.name or ''}</i></p> |
3725 | + </div> |
3726 | + <br/><br/><br/> |
3727 | + </div> |
3728 | + %endfor |
3729 | + </div> |
3730 | + </div> |
3731 | + %endif |
3732 | + <p style="page-break-after:always"></p> |
3733 | + </body> |
3734 | +</html> |
3735 | + |
3736 | |
3737 | === added file 'l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py' |
3738 | --- l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py 1970-01-01 00:00:00 +0000 |
3739 | +++ l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.py 2013-12-06 21:45:38 +0000 |
3740 | @@ -0,0 +1,412 @@ |
3741 | +# -*- coding: utf-8 -*- |
3742 | +############################################################################## |
3743 | +# |
3744 | +# OpenERP, Open Source Management Solution |
3745 | +# Addons modules by CLEARCORP S.A. |
3746 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
3747 | +# |
3748 | +# This program is free software: you can redistribute it and/or modify |
3749 | +# it under the terms of the GNU Affero General Public License as |
3750 | +# published by the Free Software Foundation, either version 3 of the |
3751 | +# License, or (at your option) any later version. |
3752 | +# |
3753 | +# This program is distributed in the hope that it will be useful, |
3754 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3755 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3756 | +# GNU Affero General Public License for more details. |
3757 | +# |
3758 | +# You should have received a copy of the GNU Affero General Public License |
3759 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3760 | +# |
3761 | +############################################################################## |
3762 | + |
3763 | +import time |
3764 | +import pooler |
3765 | +from report import report_sxw |
3766 | +from tools.translate import _ |
3767 | +from openerp.osv import fields, osv |
3768 | + |
3769 | +from openerp.addons.account_report_lib.account_report_base import accountReportbase |
3770 | + |
3771 | +class conciliationBankreport(accountReportbase): |
3772 | + |
3773 | + def __init__(self, cursor, uid, name, context): |
3774 | + #change uid by 1, because 1 is the id for the admin user |
3775 | + #problems with partner read. |
3776 | + super(conciliationBankreport, self).__init__(cursor, 1, name, context=context) |
3777 | + self.pool = pooler.get_pool(self.cr.dbname) |
3778 | + self.cursor = self.cr |
3779 | + |
3780 | + self.localcontext.update({ |
3781 | + 'time': time, |
3782 | + 'cr' : cursor, |
3783 | + 'uid': uid, |
3784 | + 'get_bank_balance': self.get_bank_balance, |
3785 | + 'get_amount': self.get_amount, |
3786 | + 'get_data': self.get_data, |
3787 | + }) |
3788 | + |
3789 | + #Extract bank_balance from wizard. |
3790 | + def get_bank_balance(self, data): |
3791 | + return self._get_form_param('bank_balance', data) |
3792 | + |
3793 | + def get_amount(self,cr, uid, account_move_line, currency): |
3794 | + account_obj = self.pool.get('account.account').browse(cr,uid,account_move_line.account_id.id) |
3795 | + |
3796 | + obj_invoice = self.pool.get('account.invoice') |
3797 | + invoice_search = obj_invoice.search(cr,uid,[('move_id','=',account_move_line.move_id.id)]) |
3798 | + invoice = None |
3799 | + |
3800 | + if invoice_search != []: |
3801 | + invoice = obj_invoice.browse(cr,uid,invoice_search[0]) |
3802 | + |
3803 | + obj_voucher = self.pool.get('account.voucher') |
3804 | + voucher_search = obj_voucher.search(cr,uid,[('move_id','=',account_move_line.move_id.id)]) |
3805 | + |
3806 | + voucher = None |
3807 | + if voucher_search != []: |
3808 | + voucher = obj_voucher.browse(cr,uid,voucher_search[0]) |
3809 | + |
3810 | + res = ('none', 0.0, 0.0) |
3811 | + |
3812 | + amount = 0.0 |
3813 | + |
3814 | + if currency != False: |
3815 | + amount = account_move_line.amount_currency |
3816 | + else: |
3817 | + if account_move_line.debit != 0.0 : |
3818 | + amount = account_move_line.debit |
3819 | + elif account_move_line.credit != 0.0 : |
3820 | + amount = account_move_line.credit * -1 |
3821 | + |
3822 | + # Invoices |
3823 | + if invoice: |
3824 | + if invoice.type == 'out_invoice': # Customer Invoice |
3825 | + res = ('invoice', amount) |
3826 | + elif invoice.type == 'in_invoice': # Supplier Invoice |
3827 | + res = ('invoice', amount) |
3828 | + elif invoice.type == 'in_refund': # Debit Note |
3829 | + res = ('debit', amount) |
3830 | + elif invoice.type == 'out_refund': # Credit Note |
3831 | + res = ('credit', amount) |
3832 | + # Vouchers |
3833 | + elif voucher: |
3834 | + if voucher.type == 'payment': # Payment |
3835 | + res = ('payment', amount) |
3836 | + elif voucher.type == 'sale': # Invoice |
3837 | + res = ('invoice', amount) |
3838 | + elif voucher.type == 'receipt': # Payment |
3839 | + res = ('payment', amount) |
3840 | + # Debit o Credit |
3841 | + else: |
3842 | + if amount > 0.0: |
3843 | + res = ('debit', amount) |
3844 | + else: |
3845 | + res = ('credit', amount) |
3846 | + |
3847 | + |
3848 | + if res[1] == None or (currency != None and res[1] == 0.0): |
3849 | + secundary_amount = (account_move_line.debit != 0.0) and account_move_line.debit or account_move_line.credit |
3850 | + res = (res[0], 0.0, secundary_amount) |
3851 | + else: |
3852 | + res = (res[0], res[1], None) |
3853 | + |
3854 | + return res |
3855 | + |
3856 | + def get_data(self, cr, uid, data, parent_account_id, context=None): |
3857 | + result_bank_balance = {} |
3858 | + result_move_lines = [] |
3859 | + filters = {} |
3860 | + account_foreign = False |
3861 | + filter_data = [] |
3862 | + reconciled_account = None |
3863 | + transit_accounts = [] |
3864 | + transit_account_ids = [] |
3865 | + input_bank_balance = self.get_bank_balance(data) or 0.0 #Extract bank_balance from wizard |
3866 | + bank_balance = 0.0 |
3867 | + accounting_balance = 0.0 |
3868 | + incomes_to_register = 0.0 |
3869 | + credits_to_reconcile = 0.0 |
3870 | + expenditures_to_register = 0.0 |
3871 | + debits_to_reconcile = 0.0 |
3872 | + accounting_total = 0.0 |
3873 | + bank_total = 0.0 |
3874 | + |
3875 | + account_obj = self.pool.get('account.account') |
3876 | + account_webkit_report_library_obj = self.pool.get('account.webkit.report.library') |
3877 | + |
3878 | + #######################Parameters |
3879 | + fiscalyear = self.get_fiscalyear(data) |
3880 | + target_move = self.get_target_move(data) |
3881 | + historic_strict = self.get_historic_strict(data) |
3882 | + special_period = self.get_special_period(data) |
3883 | + filter_type = self.get_filter(data) |
3884 | + |
3885 | + #Build fiscal_year and filter_data |
3886 | + if fiscalyear: |
3887 | + fiscal_year_id = fiscalyear.id |
3888 | + else: |
3889 | + fiscal_year_id = False |
3890 | + |
3891 | + if filter_type == 'filter_date': |
3892 | + period_ids = False |
3893 | + end_date = self.get_date_to(data) |
3894 | + |
3895 | + #Build the filter data |
3896 | + filter_data.append(None) |
3897 | + filter_data.append(end_date) |
3898 | + |
3899 | + elif filter_type == 'filter_period': |
3900 | + period_ids = [self.get_end_period(data).id] |
3901 | + end_date = False |
3902 | + |
3903 | + #Build the filter data |
3904 | + filter_data.append(None) |
3905 | + filter_data.append(self.get_end_period(data)) |
3906 | + |
3907 | + ######################Account configuration |
3908 | + #1. Get acccount_id (parent_account) selected in wizard |
3909 | + parent_account = account_obj.browse(cr, uid, parent_account_id) |
3910 | + |
3911 | + #2. Get child of this account |
3912 | + child_account_ids = account_obj.search(cr, uid, [('parent_id','=',parent_account_id)]) |
3913 | + child_accounts = child_account_ids and account_obj.browse(cr, uid, child_account_ids) or False |
3914 | + |
3915 | + #Return empty values if account doesn't have children. |
3916 | + if not child_accounts: |
3917 | + return result_bank_balance, result_move_lines, account_foreign |
3918 | + |
3919 | + #Check values |
3920 | + for child_account in child_accounts: |
3921 | + ''' |
3922 | + *** NOTE: This part required previous configuration *** |
3923 | + One of child_accounts must have include_conciliation_report attribute checked as True. |
3924 | + This account is reconciled_account, other accounts are transit_accounts. |
3925 | + ''' |
3926 | + #Account with include_conciliation_report checked is reconciled_account |
3927 | + if child_account.user_type.include_conciliation_report == True: |
3928 | + reconciled_account = child_account |
3929 | + else: |
3930 | + #Others accounts are transit accounts. |
3931 | + if child_account.reconcile: |
3932 | + transit_accounts.append(child_account) |
3933 | + transit_account_ids.append(child_account.id) |
3934 | + |
3935 | + #A reconciled_account and at least one transit_account is needed |
3936 | + #Return an error if those accounts don't exist. |
3937 | + if not reconciled_account: |
3938 | + raise osv.except_osv(_('Error !'),_('Reconciled account does not exist. Check your configuration!')) |
3939 | + |
3940 | + elif not transit_accounts: |
3941 | + raise osv.except_osv(_('Error !'),_('Transit account does not exist. Check your configuration!')) |
3942 | + |
3943 | + ####################################################################################################### |
3944 | + |
3945 | + #############If accounts configuration is correct, procedeed with report. |
3946 | + #3. Check currency |
3947 | + if parent_account.report_currency_id: |
3948 | + account_currency = parent_account.report_currency_id |
3949 | + elif parent_account.currency_id: |
3950 | + account_currency = parent_account.currency_id |
3951 | + else: |
3952 | + account_currency = parent_account.company_id.currency_id |
3953 | + |
3954 | + #4. Define if account currency is same that company currency |
3955 | + if account_currency.id == parent_account.company_id.currency_id.id: |
3956 | + account_is_foreign = False |
3957 | + else: |
3958 | + account_is_foreign = True |
3959 | + |
3960 | + ####################################################################### |
3961 | + |
3962 | + #Compute balances. |
3963 | + if account_is_foreign: |
3964 | + bank_balance = account_webkit_report_library_obj.get_account_balance(cr, |
3965 | + 1, |
3966 | + [reconciled_account.id], |
3967 | + ['balance'], |
3968 | + filter_type = filter_type, |
3969 | + end_date=end_date, |
3970 | + period_ids=period_ids, |
3971 | + fiscal_year_id=fiscal_year_id, |
3972 | + context=context)[reconciled_account.id]['balance'] |
3973 | + |
3974 | + accounting_balance = account_webkit_report_library_obj.get_account_balance(cr, |
3975 | + 1, |
3976 | + [parent_account_id], |
3977 | + ['balance'], |
3978 | + filter_type = filter_type, |
3979 | + end_date=end_date, |
3980 | + period_ids=period_ids, |
3981 | + fiscal_year_id=fiscal_year_id, |
3982 | + context=context)[parent_account_id]['balance'] |
3983 | + else: |
3984 | + bank_balance = account_webkit_report_library_obj.get_account_balance(cr, |
3985 | + 1, |
3986 | + [reconciled_account.id], |
3987 | + ['balance'], |
3988 | + filter_type = filter_type, |
3989 | + end_date=end_date, |
3990 | + period_ids=period_ids, |
3991 | + fiscal_year_id=fiscal_year_id, |
3992 | + context=context)[reconciled_account.id]['balance'] |
3993 | + |
3994 | + accounting_balance = account_webkit_report_library_obj.get_account_balance(cr, |
3995 | + 1, |
3996 | + [parent_account_id], |
3997 | + ['balance'], |
3998 | + filter_type = filter_type, |
3999 | + end_date=end_date, |
4000 | + period_ids=period_ids, |
4001 | + fiscal_year_id=fiscal_year_id, |
4002 | + context=context)[parent_account_id]['balance'] |
4003 | + |
4004 | + move_obj = self.pool.get('account.move') |
4005 | + move_line_obj = self.pool.get('account.move.line') |
4006 | + |
4007 | + """ |
4008 | + Cambio realizado el 9 de enero de 2012 |
4009 | + |
4010 | + Anteriormente, el método get_move_lines (del objeto account.webkit.report.library, librería estándar de los reportes, |
4011 | + sólo se utilizaba en el reporte de Conciliación bancaria. El reporte de conciliación bancaria no recibe el período de inicio |
4012 | + por lo que el método de get_move_lines no contempla el período de inicio, necesario en el reporte de saldo de cuenta de bancos. |
4013 | + Se realiza el cambio tanto en el reporte de conciliación bancaria para que el período inicial no se tome en cuenta (inicializado en None) |
4014 | + y en la librería se especifica que si se encuentra en None no lo tome en cuenta y que si trae información lo utilice dentro del filtro |
4015 | + para sacar el rango de periodos que se digita en el wizard. |
4016 | + |
4017 | + Se modifica tanto el reporte de conciliación bancaria, como la librería, para que el método funcione solamente con un período final o bien |
4018 | + con un rango de períodos, como trabaja el reporte de saldo de cuenta de bancos. |
4019 | + |
4020 | + Para el caso de las fechas, se trabaja de la misma forma. (El saldo de cuentas de bancos si toma la fecha de inicio) |
4021 | + |
4022 | + OBSERVACIÓN -> data['form']['historic_strict'],las variables boleanas (historic_strict y special_period) se deben pasar |
4023 | + de esta forma, sino vienen como objetos y no con el valor real (True or False). Esto se hace desde el conciliation_bank.mako |
4024 | + |
4025 | + """ |
4026 | + |
4027 | + unreconciled_move_lines = account_webkit_report_library_obj.get_move_lines(cr, 1, transit_account_ids, filter_type=filter_type, filter_data=filter_data, fiscalyear=fiscalyear, target_move=target_move, unreconcile = True, historic_strict=historic_strict, special_period=special_period, context=context) |
4028 | + |
4029 | + result_move_lines = { |
4030 | + 'credits_to_reconcile' : [], |
4031 | + 'debits_to_reconcile' : [], |
4032 | + 'incomes_to_register' : [], |
4033 | + 'expenditures_to_register' : [], |
4034 | + } |
4035 | + |
4036 | + for line in unreconciled_move_lines: |
4037 | + move = line.move_id |
4038 | + if not move: |
4039 | + if account_is_foreign: |
4040 | + if line.amount_currency > 0: |
4041 | + result_move_lines['incomes_to_register'].append(line) |
4042 | + incomes_to_register += line.amount_currency |
4043 | + else: |
4044 | + result_move_lines['expenditures_to_register'].append(line) |
4045 | + expenditures_to_register -= line.amount_currency |
4046 | + else: |
4047 | + if line.debit > 0: |
4048 | + result_move_lines['incomes_to_register'].append(line) |
4049 | + incomes_to_register += line.debit |
4050 | + else: |
4051 | + result_move_lines['expenditures_to_register'].append(line) |
4052 | + expenditures_to_register += line.credit |
4053 | + print "No move" |
4054 | + continue |
4055 | + |
4056 | + #Select the best contra move line (biggest amount, inverse amount from line) |
4057 | + contra_line = line |
4058 | + for other_line in move.line_id: |
4059 | + if other_line.id == line.id: |
4060 | + continue |
4061 | + elif other_line.debit == line.credit or other_line.credit == line.debit: |
4062 | + contra_line = other_line |
4063 | + break |
4064 | + elif account_is_foreign and (other_line.amount_currency == -1 * line.amount_currency): |
4065 | + contra_line = other_line |
4066 | + break |
4067 | + if (line.debit != 0 and contra_line.credit > other_line.credit) or \ |
4068 | + (line.credit != 0 and contra_line.debit < other_line.debit): |
4069 | + contra_line = other_line |
4070 | + elif (account_is_foreign and |
4071 | + ( |
4072 | + (line.amount_currency > 0 and |
4073 | + contra_line.amount_currency < other_line.amount_currency) |
4074 | + or |
4075 | + (line.amount_currency <= 0 and |
4076 | + contra_line.amount_currency > other_line.amount_currency) |
4077 | + ) |
4078 | + ): |
4079 | + contra_line = other_line |
4080 | + |
4081 | + if line.id == contra_line.id: |
4082 | + if account_is_foreign: |
4083 | + if line.amount_currency > 0: |
4084 | + result_move_lines['incomes_to_register'].append(line) |
4085 | + incomes_to_register += line.amount_currency |
4086 | + else: |
4087 | + result_move_lines['expenditures_to_register'].append(line) |
4088 | + expenditures_to_register -= line.amount_currency |
4089 | + else: |
4090 | + if line.debit > 0: |
4091 | + result_move_lines['incomes_to_register'].append(line) |
4092 | + incomes_to_register += line.debit |
4093 | + else: |
4094 | + result_move_lines['expenditures_to_register'].append(line) |
4095 | + expenditures_to_register += line.credit |
4096 | + else: |
4097 | + #Debit or credit to register: present in statement but not in other accounts |
4098 | + if contra_line.account_id.id == reconciled_account.id: |
4099 | + if account_is_foreign: |
4100 | + if line.amount_currency < 0: |
4101 | + result_move_lines['incomes_to_register'].append(line) |
4102 | + incomes_to_register -= line.amount_currency |
4103 | + else: |
4104 | + result_move_lines['expenditures_to_register'].append(line) |
4105 | + expenditures_to_register += line.amount_currency |
4106 | + else: |
4107 | + if line.credit > 0: |
4108 | + result_move_lines['incomes_to_register'].append(line) |
4109 | + incomes_to_register += line.credit |
4110 | + else: |
4111 | + result_move_lines['expenditures_to_register'].append(line) |
4112 | + expenditures_to_register += line.debit |
4113 | + #Debit or credit to reconcile: present in other accounts but not in statements |
4114 | + else: |
4115 | + if account_is_foreign: |
4116 | + if line.amount_currency > 0: |
4117 | + result_move_lines['credits_to_reconcile'].append(line) |
4118 | + credits_to_reconcile += line.amount_currency |
4119 | + else: |
4120 | + result_move_lines['debits_to_reconcile'].append(line) |
4121 | + debits_to_reconcile -= line.amount_currency |
4122 | + else: |
4123 | + if line.debit > 0: |
4124 | + result_move_lines['credits_to_reconcile'].append(line) |
4125 | + credits_to_reconcile += line.debit |
4126 | + else: |
4127 | + result_move_lines['debits_to_reconcile'].append(line) |
4128 | + debits_to_reconcile += line.credit |
4129 | + |
4130 | + accounting_total = accounting_balance + incomes_to_register - expenditures_to_register |
4131 | + bank_total = bank_balance + credits_to_reconcile - debits_to_reconcile |
4132 | + |
4133 | + result_bank_balance = { |
4134 | + 'input_bank_balance' : input_bank_balance, |
4135 | + 'bank_balance' : bank_balance, |
4136 | + 'accounting_balance' : accounting_balance, |
4137 | + 'incomes_to_register' : incomes_to_register, |
4138 | + 'credits_to_reconcile' : credits_to_reconcile, |
4139 | + 'expenditures_to_register' : expenditures_to_register, |
4140 | + 'debits_to_reconcile' : debits_to_reconcile, |
4141 | + 'accounting_total' : accounting_total, |
4142 | + 'bank_total' : bank_total, |
4143 | + } |
4144 | + |
4145 | + return result_bank_balance, result_move_lines, account_is_foreign |
4146 | + |
4147 | +report_sxw.report_sxw( |
4148 | + 'report.conciliation_bank_report_webkit', |
4149 | + 'account.account', |
4150 | + 'addons/l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako', |
4151 | + parser=conciliationBankreport) |
4152 | + |
4153 | |
4154 | === added file 'l10n_cr_account_conciliation_bank_report/report/report.xml' |
4155 | --- l10n_cr_account_conciliation_bank_report/report/report.xml 1970-01-01 00:00:00 +0000 |
4156 | +++ l10n_cr_account_conciliation_bank_report/report/report.xml 2013-12-06 21:45:38 +0000 |
4157 | @@ -0,0 +1,18 @@ |
4158 | +<?xml version="1.0" encoding="utf-8"?> |
4159 | +<openerp> |
4160 | + <data> |
4161 | + |
4162 | + <record id="conciliation_bank_report_webkit" model="ir.actions.report.xml"> |
4163 | + <field name="report_type">webkit</field> |
4164 | + <field name="report_name">conciliation_bank_report_webkit</field> |
4165 | + <field eval="[(6,0,[])]" name="groups_id"/> |
4166 | + <field name="model">account.account</field> |
4167 | + <field name="type">ir.actions.report.xml</field> |
4168 | + <field name="name">Conciliation Bank Report</field> |
4169 | + <field name="report_rml">l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako</field> |
4170 | + <field name="report_file">l10n_cr_account_conciliation_bank_report/report/l10n_cr_account_conciliation_bank_report.mako</field> |
4171 | + <field name="webkit_header" ref="report_webkit_lib.webkit_header_clearcorp_official_portrait" /> |
4172 | + </record> |
4173 | + |
4174 | + </data> |
4175 | +</openerp> |
4176 | |
4177 | === added file 'l10n_cr_account_conciliation_bank_report/report_menus.xml' |
4178 | --- l10n_cr_account_conciliation_bank_report/report_menus.xml 1970-01-01 00:00:00 +0000 |
4179 | +++ l10n_cr_account_conciliation_bank_report/report_menus.xml 2013-12-06 21:45:38 +0000 |
4180 | @@ -0,0 +1,11 @@ |
4181 | +<?xml version="1.0" encoding="utf-8"?> |
4182 | +<openerp> |
4183 | + <data> |
4184 | + |
4185 | + <menuitem icon="STOCK_PRINT" |
4186 | + name="Conciliation Bank" |
4187 | + parent="account.next_id_22" |
4188 | + action="action_conciliation_bank_report_menu_webkit" |
4189 | + id="menu_conciliation_bank"/> |
4190 | + </data> |
4191 | +</openerp> |
4192 | |
4193 | === added directory 'l10n_cr_account_conciliation_bank_report/wizard' |
4194 | === added file 'l10n_cr_account_conciliation_bank_report/wizard/__init__.py' |
4195 | --- l10n_cr_account_conciliation_bank_report/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
4196 | +++ l10n_cr_account_conciliation_bank_report/wizard/__init__.py 2013-12-06 21:45:38 +0000 |
4197 | @@ -0,0 +1,23 @@ |
4198 | +# -*- coding: utf-8 -*- |
4199 | +############################################################################## |
4200 | +# |
4201 | +# OpenERP, Open Source Management Solution |
4202 | +# Addons modules by CLEARCORP S.A. |
4203 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4204 | +# |
4205 | +# This program is free software: you can redistribute it and/or modify |
4206 | +# it under the terms of the GNU Affero General Public License as |
4207 | +# published by the Free Software Foundation, either version 3 of the |
4208 | +# License, or (at your option) any later version. |
4209 | +# |
4210 | +# This program is distributed in the hope that it will be useful, |
4211 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4212 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4213 | +# GNU Affero General Public License for more details. |
4214 | +# |
4215 | +# You should have received a copy of the GNU Affero General Public License |
4216 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4217 | +# |
4218 | +############################################################################## |
4219 | + |
4220 | +import l10n_cr_account_conciliation_bank_report_wizard |
4221 | |
4222 | === added file 'l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.py' |
4223 | --- l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.py 1970-01-01 00:00:00 +0000 |
4224 | +++ l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.py 2013-12-06 21:45:38 +0000 |
4225 | @@ -0,0 +1,94 @@ |
4226 | +# -*- coding: utf-8 -*- |
4227 | +############################################################################## |
4228 | +# |
4229 | +# OpenERP, Open Source Management Solution |
4230 | +# Addons modules by CLEARCORP S.A. |
4231 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4232 | +# |
4233 | +# This program is free software: you can redistribute it and/or modify |
4234 | +# it under the terms of the GNU Affero General Public License as |
4235 | +# published by the Free Software Foundation, either version 3 of the |
4236 | +# License, or (at your option) any later version. |
4237 | +# |
4238 | +# This program is distributed in the hope that it will be useful, |
4239 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4240 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4241 | +# GNU Affero General Public License for more details. |
4242 | +# |
4243 | +# You should have received a copy of the GNU Affero General Public License |
4244 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4245 | +# |
4246 | +############################################################################## |
4247 | + |
4248 | +from osv import fields, osv |
4249 | +from openerp.tools.translate import _ |
4250 | + |
4251 | +class conciliationBankreportWizard(osv.osv_memory): |
4252 | + |
4253 | + _inherit = "account.report.wiz" |
4254 | + _name = "conciliation.bank.report.wiz" |
4255 | + _description = "Conciliation Bank Report Wizard" |
4256 | + |
4257 | + def _get_parent_accounts(self, cr, uid, context=None): |
4258 | + |
4259 | + if context is None: |
4260 | + context = {} |
4261 | + |
4262 | + res = [] |
4263 | + account_obj = self.pool.get('account.account') |
4264 | + |
4265 | + #Search accounts that have in user_type checked include_conciliation_report attribute. Then, return a tuple list with name and id for |
4266 | + #parent_id for this accounts |
4267 | + #Include accounts with type == 'view' |
4268 | + account_ids = account_obj.search(cr, uid, [('user_type.include_conciliation_report', '=', True)], context=context) |
4269 | + |
4270 | + if account_ids: |
4271 | + accounts = account_obj.browse(cr, uid, account_ids, context) |
4272 | + for account in accounts: |
4273 | + if account.parent_id: |
4274 | + res.append((account.parent_id.id, account.parent_id.name)) #Append parent_id.id and parent_id.name for account. |
4275 | + |
4276 | + return res |
4277 | + |
4278 | + ''' |
4279 | + account_ids is define as a selection field, because with a domain can't obtain necessary data. |
4280 | + account_ids are all accounts that their parents user_type have include_conciliation_report attribute mark as True. |
4281 | + This configuration solves the problem of searching for a specific code in accounts and makes configurable the accounts that |
4282 | + you want in the bank reconciliation report |
4283 | + ''' |
4284 | + _columns = { |
4285 | + 'bank_balance': fields.float('Bank Balance'), |
4286 | + 'filter': fields.selection([('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by"), |
4287 | + 'account_ids': fields.selection(_get_parent_accounts, 'Bank Account'), |
4288 | + } |
4289 | + |
4290 | + |
4291 | + _defaults = { |
4292 | + 'filter': 'filter_period', |
4293 | + } |
4294 | + |
4295 | + def pre_print_report(self, cr, uid, ids, data, context=None): |
4296 | + |
4297 | + if context is None: |
4298 | + context = {} |
4299 | + |
4300 | + # read the bank_banlance, because this field don't belongs to the account.report.wiz |
4301 | + # this field is added by conciliation.bank.report.wiz and add to data['form'] |
4302 | + vals = self.read(cr, uid, ids,['bank_balance'], context=context)[0] #this method read the field and included it in the form (account.common.report has this method) |
4303 | + |
4304 | + data['form'].update(vals) |
4305 | + |
4306 | + return data |
4307 | + |
4308 | + def _print_report(self, cursor, uid, ids, data, context=None): |
4309 | + |
4310 | + context = context or {} |
4311 | + # we update form with display account value |
4312 | + |
4313 | + data = self.pre_print_report(cursor, uid, ids, data, context=context) |
4314 | + |
4315 | + return { |
4316 | + 'type': 'ir.actions.report.xml', |
4317 | + 'report_name': 'conciliation_bank_report_webkit', |
4318 | + 'datas': data |
4319 | + } |
4320 | \ No newline at end of file |
4321 | |
4322 | === added file 'l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.xml' |
4323 | --- l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.xml 1970-01-01 00:00:00 +0000 |
4324 | +++ l10n_cr_account_conciliation_bank_report/wizard/l10n_cr_account_conciliation_bank_report_wizard.xml 2013-12-06 21:45:38 +0000 |
4325 | @@ -0,0 +1,92 @@ |
4326 | +<?xml version="1.0" encoding="utf-8"?> |
4327 | +<openerp> |
4328 | + <data> |
4329 | + |
4330 | + <record id="conciliation_bank_report_view_webkit" model="ir.ui.view"> |
4331 | + <field name="name">Conciliation Bank</field> |
4332 | + <field name="model">conciliation.bank.report.wiz</field> |
4333 | + <field name="type">form</field> |
4334 | + <field name="inherit_id" ref="account_report_lib.account_report_lib_wizard_view"/> |
4335 | + <field name="arch" type="xml"> |
4336 | + <data> |
4337 | + <xpath expr="/form/label[@string='']" position="replace"> |
4338 | + <separator string="Conciliation Bank" colspan="4"/> |
4339 | + <label nolabel="1" colspan="4" string="This report allows you to print or generate a pdf of your conciliation bank with details of all your payable/receivable account"/> |
4340 | + </xpath> |
4341 | + |
4342 | + <group string="Account Financial Report" position="attributes"> |
4343 | + <attribute name="attrs">{'invisible': True}</attribute> |
4344 | + </group> |
4345 | + |
4346 | + <field name="filter" position="attributes"> |
4347 | + <attribute name="attrs">{'required': True}</attribute> |
4348 | + </field> |
4349 | + |
4350 | + <group string="Accounts" position="replace"> |
4351 | + <group string="Accounts"> |
4352 | + <field name="account_ids" colspan="2" required="True" readonly="False"/> |
4353 | + </group> |
4354 | + </group> |
4355 | + |
4356 | + <field name="amount_currency" position="attributes"> |
4357 | + <attribute name="invisible">True</attribute> |
4358 | + </field> |
4359 | + |
4360 | + <group string="Accounts" position="inside"> |
4361 | + <field name="bank_balance" required="True"/> |
4362 | + </group> |
4363 | + |
4364 | + <field name="chart_account_id" position="attributes"> |
4365 | + <attribute name="attrs">{'required': True}</attribute> |
4366 | + </field> |
4367 | + |
4368 | + <field name="target_move" position="attributes"> |
4369 | + <attribute name="attrs">{'required': True}</attribute> |
4370 | + </field> |
4371 | + <field name="fiscalyear_id" position="attributes"> |
4372 | + <attribute name="attrs">{'required': True}</attribute> |
4373 | + </field> |
4374 | + <field name="period_from" position="attributes"> |
4375 | + <attribute name="attrs">{'invisible': True, 'required': False}</attribute> |
4376 | + </field> |
4377 | + <field name="date_from" position="attributes"> |
4378 | + <attribute name="attrs">{'invisible': True, 'required': False}</attribute> |
4379 | + </field> |
4380 | + <field name="period_to" position="attributes"> |
4381 | + <attribute name="attrs">{'required':[('filter', '=', 'filter_period')]}</attribute> |
4382 | + </field> |
4383 | + <field name="date_to" position="attributes"> |
4384 | + <attribute name="attrs">{'required': [('filter', '=', 'filter_date')]}</attribute> |
4385 | + </field> |
4386 | + |
4387 | + <group string="Journals" position="attributes"> |
4388 | + <attribute name="attrs">{'invisible': True}</attribute> |
4389 | + </group> |
4390 | + |
4391 | + </data> |
4392 | + </field> |
4393 | + </record> |
4394 | + |
4395 | + <record id="action_conciliation_bank_report_menu_webkit" model="ir.actions.act_window"> |
4396 | + <field name="name">Conciliation Bank Report</field> |
4397 | + <field name="type">ir.actions.act_window</field> |
4398 | + <field name="res_model">conciliation.bank.report.wiz</field> |
4399 | + <field name="view_type">form</field> |
4400 | + <field name="view_mode">form</field> |
4401 | + <field name="view_id" ref="conciliation_bank_report_view_webkit"/> |
4402 | + <field name="target">new</field> |
4403 | + </record> |
4404 | + |
4405 | + <record model="ir.values" id="action_account_conciliation_bank_report_webkit"> |
4406 | + <field name="model_id" ref="account.model_account_account"/> |
4407 | + <field name="object" eval="1"/> |
4408 | + <field name="name">Conciliation Bank Report</field> |
4409 | + <field name="key2">client_print_multi</field> |
4410 | + <field name="value" |
4411 | + eval="'ir.actions.act_window,' +str(ref('action_conciliation_bank_report_menu_webkit'))"/> |
4412 | + <field name="key">action</field> |
4413 | + <field name="model">account.account</field> |
4414 | + </record> |
4415 | + |
4416 | + </data> |
4417 | +</openerp> |
4418 | |
4419 | === added directory 'l10n_cr_account_invoice_D-151' |
4420 | === added file 'l10n_cr_account_invoice_D-151/__init__.py' |
4421 | --- l10n_cr_account_invoice_D-151/__init__.py 1970-01-01 00:00:00 +0000 |
4422 | +++ l10n_cr_account_invoice_D-151/__init__.py 2013-12-06 21:45:38 +0000 |
4423 | @@ -0,0 +1,26 @@ |
4424 | +# -*- coding: utf-8 -*- |
4425 | +############################################################################## |
4426 | +# |
4427 | +# OpenERP, Open Source Management Solution |
4428 | +# Addons modules by CLEARCORP S.A. |
4429 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4430 | +# |
4431 | +# This program is free software: you can redistribute it and/or modify |
4432 | +# it under the terms of the GNU Affero General Public License as |
4433 | +# published by the Free Software Foundation, either version 3 of the |
4434 | +# License, or (at your option) any later version. |
4435 | +# |
4436 | +# This program is distributed in the hope that it will be useful, |
4437 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4438 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4439 | +# GNU Affero General Public License for more details. |
4440 | +# |
4441 | +# You should have received a copy of the GNU Affero General Public License |
4442 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4443 | +# |
4444 | +############################################################################## |
4445 | + |
4446 | +import l10n_cr_account_invoice_line |
4447 | +import l10n_cr_account_invoice_report |
4448 | + |
4449 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4450 | |
4451 | === added file 'l10n_cr_account_invoice_D-151/__openerp__.py' |
4452 | --- l10n_cr_account_invoice_D-151/__openerp__.py 1970-01-01 00:00:00 +0000 |
4453 | +++ l10n_cr_account_invoice_D-151/__openerp__.py 2013-12-06 21:45:38 +0000 |
4454 | @@ -0,0 +1,41 @@ |
4455 | +# -*- coding: utf-8 -*- |
4456 | +############################################################################## |
4457 | +# |
4458 | +# OpenERP, Open Source Management Solution |
4459 | +# Addons modules by CLEARCORP S.A. |
4460 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4461 | +# |
4462 | +# This program is free software: you can redistribute it and/or modify |
4463 | +# it under the terms of the GNU Affero General Public License as |
4464 | +# published by the Free Software Foundation, either version 3 of the |
4465 | +# License, or (at your option) any later version. |
4466 | +# |
4467 | +# This program is distributed in the hope that it will be useful, |
4468 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4469 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4470 | +# GNU Affero General Public License for more details. |
4471 | +# |
4472 | +# You should have received a copy of the GNU Affero General Public License |
4473 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4474 | +# |
4475 | +############################################################################## |
4476 | +{ |
4477 | + 'name': 'D-151 for Account Invoice', |
4478 | + 'version': '1.0', |
4479 | + 'category': 'Accounting & Finance', |
4480 | + 'description': """ |
4481 | + Add category to account.invoice.line for apply the D-151 |
4482 | + Add category in the account.move |
4483 | + """, |
4484 | + 'author': 'CLEARCORP S.A.', |
4485 | + 'website': 'http://www.clearcorp.co.cr', |
4486 | + 'depends': [ |
4487 | + 'account', |
4488 | + ], |
4489 | + 'data': ['l10n_cr_account_invoice_line.xml', |
4490 | + 'l10n_cr_account_invoice_report.xml' ], |
4491 | + 'installable': True, |
4492 | + 'auto_install': False, |
4493 | +} |
4494 | + |
4495 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4496 | |
4497 | === added directory 'l10n_cr_account_invoice_D-151/i18n' |
4498 | === added file 'l10n_cr_account_invoice_D-151/i18n/es_CR.po' |
4499 | --- l10n_cr_account_invoice_D-151/i18n/es_CR.po 1970-01-01 00:00:00 +0000 |
4500 | +++ l10n_cr_account_invoice_D-151/i18n/es_CR.po 2013-12-06 21:45:38 +0000 |
4501 | @@ -0,0 +1,91 @@ |
4502 | +# Translation of OpenERP Server. |
4503 | +# This file contains the translation of the following modules: |
4504 | +# * l10n_cr_account_invoice_D-151 |
4505 | +# |
4506 | +msgid "" |
4507 | +msgstr "" |
4508 | +"Project-Id-Version: OpenERP Server 7.0\n" |
4509 | +"Report-Msgid-Bugs-To: \n" |
4510 | +"POT-Creation-Date: 2013-06-20 21:03+0000\n" |
4511 | +"PO-Revision-Date: 2013-06-20 21:03+0000\n" |
4512 | +"Last-Translator: <>\n" |
4513 | +"Language-Team: \n" |
4514 | +"MIME-Version: 1.0\n" |
4515 | +"Content-Type: text/plain; charset=UTF-8\n" |
4516 | +"Content-Transfer-Encoding: \n" |
4517 | +"Plural-Forms: \n" |
4518 | + |
4519 | +#. module: l10n_cr_account_invoice_D-151 |
4520 | +#: view:account.invoice.report:0 |
4521 | +msgid "Refund" |
4522 | +msgstr "Factura rectificativa" |
4523 | + |
4524 | +#. module: l10n_cr_account_invoice_D-151 |
4525 | +#: selection:account.invoice.line,d_151_type:0 |
4526 | +#: selection:account.invoice.report,d_151_type:0 |
4527 | +msgid "Interest" |
4528 | +msgstr "Intereses" |
4529 | + |
4530 | +#. module: l10n_cr_account_invoice_D-151 |
4531 | +#: selection:account.invoice.line,d_151_type:0 |
4532 | +#: selection:account.invoice.report,d_151_type:0 |
4533 | +msgid "Goods and services sales" |
4534 | +msgstr "Ventas de bienes y servicios" |
4535 | + |
4536 | +#. module: l10n_cr_account_invoice_D-151 |
4537 | +#: selection:account.invoice.line,d_151_type:0 |
4538 | +#: selection:account.invoice.report,d_151_type:0 |
4539 | +msgid "Commissions" |
4540 | +msgstr "Comisiones" |
4541 | + |
4542 | +#. module: l10n_cr_account_invoice_D-151 |
4543 | +#: selection:account.invoice.line,d_151_type:0 |
4544 | +#: selection:account.invoice.report,d_151_type:0 |
4545 | +msgid "Goods and services purchases" |
4546 | +msgstr "Compras de bienes y servicios" |
4547 | + |
4548 | +#. module: l10n_cr_account_invoice_D-151 |
4549 | +#: model:ir.model,name:l10n_cr_account_invoice_D-151.model_account_invoice_line |
4550 | +msgid "Invoice Line" |
4551 | +msgstr "Línea de factura" |
4552 | + |
4553 | +#. module: l10n_cr_account_invoice_D-151 |
4554 | +#: selection:account.invoice.line,d_151_type:0 |
4555 | +#: selection:account.invoice.report,d_151_type:0 |
4556 | +msgid "Rent" |
4557 | +msgstr "Renta" |
4558 | + |
4559 | +#. module: l10n_cr_account_invoice_D-151 |
4560 | +#: model:ir.model,name:l10n_cr_account_invoice_D-151.model_account_invoice |
4561 | +msgid "Invoice" |
4562 | +msgstr "Factura" |
4563 | + |
4564 | +#. module: l10n_cr_account_invoice_D-151 |
4565 | +#: field:account.invoice,type_invoice:0 |
4566 | +#: field:account.invoice.line,type_invoice:0 |
4567 | +msgid "Invoice type" |
4568 | +msgstr "Tipo de Factura" |
4569 | + |
4570 | +#. module: l10n_cr_account_invoice_D-151 |
4571 | +#: field:account.invoice.line,d_151_type:0 |
4572 | +#: view:account.invoice.report:0 |
4573 | +#: field:account.invoice.report,d_151_type:0 |
4574 | +msgid "D-151 Type" |
4575 | +msgstr "D-151" |
4576 | + |
4577 | +#. module: l10n_cr_account_invoice_D-151 |
4578 | +#: view:account.invoice.report:0 |
4579 | +msgid "Type" |
4580 | +msgstr "Tipo" |
4581 | + |
4582 | +#. module: l10n_cr_account_invoice_D-151 |
4583 | +#: model:ir.model,name:l10n_cr_account_invoice_D-151.model_account_invoice_report |
4584 | +msgid "Invoices Statistics" |
4585 | +msgstr "Estadísticas de facturas" |
4586 | + |
4587 | +#. module: l10n_cr_account_invoice_D-151 |
4588 | +#: selection:account.invoice.line,d_151_type:0 |
4589 | +#: selection:account.invoice.report,d_151_type:0 |
4590 | +msgid "Profesional services" |
4591 | +msgstr "Servicios profesionales" |
4592 | + |
4593 | |
4594 | === added file 'l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.py' |
4595 | --- l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.py 1970-01-01 00:00:00 +0000 |
4596 | +++ l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.py 2013-12-06 21:45:38 +0000 |
4597 | @@ -0,0 +1,72 @@ |
4598 | +# -*- coding: utf-8 -*- |
4599 | +############################################################################## |
4600 | +# |
4601 | +# OpenERP, Open Source Management Solution |
4602 | +# Addons modules by CLEARCORP S.A. |
4603 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4604 | +# |
4605 | +# This program is free software: you can redistribute it and/or modify |
4606 | +# it under the terms of the GNU Affero General Public License as |
4607 | +# published by the Free Software Foundation, either version 3 of the |
4608 | +# License, or (at your option) any later version. |
4609 | +# |
4610 | +# This program is distributed in the hope that it will be useful, |
4611 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4612 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4613 | +# GNU Affero General Public License for more details. |
4614 | +# |
4615 | +# You should have received a copy of the GNU Affero General Public License |
4616 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4617 | +# |
4618 | +############################################################################## |
4619 | + |
4620 | +from openerp.osv import fields, osv, orm |
4621 | + |
4622 | +class accountInvoiceD151(orm.Model): |
4623 | + |
4624 | + _name = 'account.invoice' |
4625 | + _inherit = 'account.invoice' |
4626 | + |
4627 | + #Work arround to get the type of the invoice from context |
4628 | + def _get_type_invoice(self, cr, uid, context=None): |
4629 | + if context is None: |
4630 | + context = {} |
4631 | + return context.get('type') |
4632 | + |
4633 | + #This field add category D-151 to invoice line. |
4634 | + _columns = { |
4635 | + 'type_invoice': fields.char(string='Invoice type', size=64) |
4636 | + } |
4637 | + |
4638 | + #Get the type of invoice for category D-151 |
4639 | + _defaults = { |
4640 | + 'type_invoice': _get_type_invoice, |
4641 | + } |
4642 | + |
4643 | +class accountInvoicelineD151(orm.Model): |
4644 | + |
4645 | + _name = 'account.invoice.line' |
4646 | + _inherit = 'account.invoice.line' |
4647 | + |
4648 | + #Work arround to get the type of the invoice from context |
4649 | + def _get_type_invoice(self, cr, uid, context=None): |
4650 | + if context is None: |
4651 | + context = {} |
4652 | + return context.get('type') |
4653 | + |
4654 | + #This field add category D-151 to invoice line. |
4655 | + _columns = { |
4656 | + 'd_151_type':fields.selection([('V','Goods and services sales'), |
4657 | + ('C','Goods and services purchases'), |
4658 | + ('A','Rent'), |
4659 | + ('SP','Profesional services'), |
4660 | + ('M','Commissions'), |
4661 | + ('I','Interest')], string="D-151 Type"), |
4662 | + |
4663 | + 'type_invoice': fields.char(string='Invoice type', size=64) |
4664 | + } |
4665 | + |
4666 | + #Get the type of invoice for category D-151 |
4667 | + _defaults = { |
4668 | + 'type_invoice': _get_type_invoice, |
4669 | + } |
4670 | |
4671 | === added file 'l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.xml' |
4672 | --- l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.xml 1970-01-01 00:00:00 +0000 |
4673 | +++ l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_line.xml 2013-12-06 21:45:38 +0000 |
4674 | @@ -0,0 +1,32 @@ |
4675 | +<?xml version="1.0" encoding="UTF-8" ?> |
4676 | +<openerp> |
4677 | + <data> |
4678 | + <!--Account invoice line --> |
4679 | + <record id="invoice_supplier_form_inherit_D_151" model="ir.ui.view"> |
4680 | + <field name = "name">invoice.supplier.form.inherit.D151</field> |
4681 | + <field name = "model">account.invoice</field> |
4682 | + <field name = "type">form</field> |
4683 | + <field name="inherit_id" ref="account.invoice_supplier_form"/> |
4684 | + <field name = "arch" type = "xml"> |
4685 | + <xpath expr="/form/sheet[@string='Supplier Invoice']/notebook/page[@string='Invoice']/field/tree/field[@name='name']" position="after"> |
4686 | + <field name="type_invoice" invisible="1"/> |
4687 | + <field name="d_151_type" attrs="{'required':[('type_invoice', '=','in_invoice')]}"/> |
4688 | + </xpath> |
4689 | + </field> |
4690 | + </record> |
4691 | + |
4692 | + <record model = "ir.ui.view" id = "account_type_D151_inherit"> |
4693 | + <field name = "name">account.type.D151.inherit</field> |
4694 | + <field name = "model">account.invoice.line</field> |
4695 | + <field name = "type">tree</field> |
4696 | + <field name="inherit_id" ref="account.view_invoice_line_form"/> |
4697 | + <field name = "arch" type = "xml"> |
4698 | + <field name="price_unit" position="after"> |
4699 | + <field name="type_invoice" invisible="1"/> |
4700 | + <field name="d_151_type" attrs="{'invisible':[('type_invoice', '!=','in_invoice')], 'required':[('type_invoice', '=','in_invoice')]}"/> |
4701 | + </field> |
4702 | + </field> |
4703 | + </record> |
4704 | + |
4705 | + </data> |
4706 | +</openerp> |
4707 | |
4708 | === added file 'l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.py' |
4709 | --- l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.py 1970-01-01 00:00:00 +0000 |
4710 | +++ l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.py 2013-12-06 21:45:38 +0000 |
4711 | @@ -0,0 +1,61 @@ |
4712 | +# -*- coding: utf-8 -*- |
4713 | +############################################################################## |
4714 | +# |
4715 | +# OpenERP, Open Source Management Solution |
4716 | +# Addons modules by CLEARCORP S.A. |
4717 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4718 | +# |
4719 | +# This program is free software: you can redistribute it and/or modify |
4720 | +# it under the terms of the GNU Affero General Public License as |
4721 | +# published by the Free Software Foundation, either version 3 of the |
4722 | +# License, or (at your option) any later version. |
4723 | +# |
4724 | +# This program is distributed in the hope that it will be useful, |
4725 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4726 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4727 | +# GNU Affero General Public License for more details. |
4728 | +# |
4729 | +# You should have received a copy of the GNU Affero General Public License |
4730 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4731 | +# |
4732 | +############################################################################## |
4733 | + |
4734 | +from openerp.osv import fields, osv, orm |
4735 | + |
4736 | +class accountInvoicereportInherit(osv.osv): |
4737 | + |
4738 | + _name = 'account.invoice.report' |
4739 | + _inherit = 'account.invoice.report' |
4740 | + |
4741 | + _columns = { |
4742 | + 'd_151_type':fields.selection([('V','Goods and services sales'), |
4743 | + ('C','Goods and services purchases'), |
4744 | + ('A','Rent'), |
4745 | + ('SP','Profesional services'), |
4746 | + ('M','Commissions'), |
4747 | + ('I','Interest')], 'D-151 Type',readonly=True), |
4748 | + } |
4749 | + |
4750 | + #Add into query the D-151-type field |
4751 | + def _select (self): |
4752 | + select_str = super(accountInvoicereportInherit, self)._select() |
4753 | + new_str = select_str.replace('SELECT sub.id,', 'SELECT sub.id, sub.d_151_type,') |
4754 | + |
4755 | + return new_str |
4756 | + |
4757 | + #Add into query the D-151-type field |
4758 | + def _sub_select(self): |
4759 | + select_str = super(accountInvoicereportInherit,self)._sub_select() |
4760 | + new_str = select_str.replace('ai.payment_term, ai.period_id,', 'ai.payment_term, ai.period_id, ail.d_151_type AS d_151_type,') |
4761 | + |
4762 | + return new_str |
4763 | + |
4764 | + #Add into query the D-151-type field |
4765 | + def _group_by(self): |
4766 | + group_by_str = super(accountInvoicereportInherit,self)._group_by() |
4767 | + new_str = group_by_str.replace('GROUP BY ail.product_id,', 'GROUP BY ail.product_id, ail.d_151_type,') |
4768 | + |
4769 | + return new_str |
4770 | + |
4771 | +accountInvoicereportInherit() |
4772 | + |
4773 | \ No newline at end of file |
4774 | |
4775 | === added file 'l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.xml' |
4776 | --- l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.xml 1970-01-01 00:00:00 +0000 |
4777 | +++ l10n_cr_account_invoice_D-151/l10n_cr_account_invoice_report.xml 2013-12-06 21:45:38 +0000 |
4778 | @@ -0,0 +1,31 @@ |
4779 | +<?xml version="1.0" encoding="UTF-8" ?> |
4780 | +<openerp> |
4781 | + <data> |
4782 | + <!--Account invoice report --> |
4783 | + <record id="view_account_invoice_report_tree_inherit" model="ir.ui.view"> |
4784 | + <field name = "name">account.invoice.report.tree.inherit</field> |
4785 | + <field name = "model">account.invoice.report</field> |
4786 | + <field name="inherit_id" ref="account.view_account_invoice_report_tree"/> |
4787 | + <field name = "arch" type = "xml"> |
4788 | + <xpath expr="/tree/field[@name='account_line_id']" position="after"> |
4789 | + <field name="d_151_type" invisible="1"/> |
4790 | + </xpath> |
4791 | + </field> |
4792 | + </record> |
4793 | + |
4794 | + <record id="view_account_invoice_report_search_inherit" model="ir.ui.view"> |
4795 | + <field name = "name">account.invoice.report.search.inherit</field> |
4796 | + <field name = "model">account.invoice.report</field> |
4797 | + <field name = "type">form</field> |
4798 | + <field name="inherit_id" ref="account.view_account_invoice_report_search"/> |
4799 | + <field name = "arch" type = "xml"> |
4800 | + <filter string="Refund" position="after"> |
4801 | + <field name="d_151_type"/> |
4802 | + </filter> |
4803 | + <filter string="Type" position="after"> |
4804 | + <filter string="D-151 Type" icon="terp-stock_symbol-selection" context="{'group_by':'d_151_type'}"/> |
4805 | + </filter> |
4806 | + </field> |
4807 | + </record> |
4808 | + </data> |
4809 | +</openerp> |
4810 | |
4811 | === added directory 'l10n_cr_account_profit_statement_report' |
4812 | === added file 'l10n_cr_account_profit_statement_report/__init__.py' |
4813 | --- l10n_cr_account_profit_statement_report/__init__.py 1970-01-01 00:00:00 +0000 |
4814 | +++ l10n_cr_account_profit_statement_report/__init__.py 2013-12-06 21:45:38 +0000 |
4815 | @@ -0,0 +1,25 @@ |
4816 | +# -*- coding: utf-8 -*- |
4817 | +############################################################################## |
4818 | +# |
4819 | +# OpenERP, Open Source Management Solution |
4820 | +# Addons modules by CLEARCORP S.A. |
4821 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4822 | +# |
4823 | +# This program is free software: you can redistribute it and/or modify |
4824 | +# it under the terms of the GNU Affero General Public License as |
4825 | +# published by the Free Software Foundation, either version 3 of the |
4826 | +# License, or (at your option) any later version. |
4827 | +# |
4828 | +# This program is distributed in the hope that it will be useful, |
4829 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4830 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4831 | +# GNU Affero General Public License for more details. |
4832 | +# |
4833 | +# You should have received a copy of the GNU Affero General Public License |
4834 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4835 | +# |
4836 | +############################################################################## |
4837 | + |
4838 | +import l10n_cr_account_profit_statement_report |
4839 | +import report |
4840 | +import wizard |
4841 | \ No newline at end of file |
4842 | |
4843 | === added file 'l10n_cr_account_profit_statement_report/__openerp__.py' |
4844 | --- l10n_cr_account_profit_statement_report/__openerp__.py 1970-01-01 00:00:00 +0000 |
4845 | +++ l10n_cr_account_profit_statement_report/__openerp__.py 2013-12-06 21:45:38 +0000 |
4846 | @@ -0,0 +1,47 @@ |
4847 | +# -*- coding: utf-8 -*- |
4848 | +############################################################################## |
4849 | +# |
4850 | +# OpenERP, Open Source Management Solution |
4851 | +# Addons modules by CLEARCORP S.A. |
4852 | +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). |
4853 | +# |
4854 | +# This program is free software: you can redistribute it and/or modify |
4855 | +# it under the terms of the GNU Affero General Public License as |
4856 | +# published by the Free Software Foundation, either version 3 of the |
4857 | +# License, or (at your option) any later version. |
4858 | +# |
4859 | +# This program is distributed in the hope that it will be useful, |
4860 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4861 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4862 | +# GNU Affero General Public License for more details. |
4863 | +# |
4864 | +# You should have received a copy of the GNU Affero General Public License |
4865 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4866 | +# |
4867 | +############################################################################## |
4868 | + |
4869 | +{ |
4870 | + 'name': 'Profit Statement Report Webkit', |
4871 | + 'description': "Create the Profit Statement report", |
4872 | + 'version': '1.0', |
4873 | + 'author': 'CLEARCORP S.A.', |
4874 | + 'category': 'Finance', |
4875 | + 'website': "http://clearcorp.co.cr", |
4876 | + 'images': [], |
4877 | + 'depends': ['account', |
4878 | + 'account_report_lib', |
4879 | + 'account_report_signatures',], |
4880 | + 'init_xml': [], |
4881 | + 'demo_xml' : [], |
4882 | + 'update_xml': [ |
4883 | + 'report/report.xml', |
4884 | + 'l10n_cr_account_profit_statement_report.xml', |
4885 | + 'wizard/l10n_cr_account_profit_statement_wizard_view.xml', |
4886 | + 'report_menus.xml' |
4887 | + ], |
4888 | + 'test': [], |
4889 | + 'active': False, |
4890 | + 'installable': True, |
4891 | + 'license': 'AGPL-3', |
4892 | +} |
4893 | + |
4894 | |
4895 | === added directory 'l10n_cr_account_profit_statement_report/i18n' |
4896 | === added file 'l10n_cr_account_profit_statement_report/i18n/es_CR.po' |
4897 | --- l10n_cr_account_profit_statement_report/i18n/es_CR.po 1970-01-01 00:00:00 +0000 |
4898 | +++ l10n_cr_account_profit_statement_report/i18n/es_CR.po 2013-12-06 21:45:38 +0000 |
4899 | @@ -0,0 +1,285 @@ |
4900 | +# Translation of OpenERP Server. |
4901 | +# This file contains the translation of the following modules: |
4902 | +# * l10n_cr_account_profit_statement_report |
4903 | +# |
4904 | +msgid "" |
4905 | +msgstr "" |
4906 | +"Project-Id-Version: OpenERP Server 7.0\n" |
4907 | +"Report-Msgid-Bugs-To: \n" |
4908 | +"POT-Creation-Date: 2013-08-12 20:08+0000\n" |
4909 | +"PO-Revision-Date: 2013-08-12 20:08+0000\n" |
4910 | +"Last-Translator: <>\n" |
4911 | +"Language-Team: \n" |
4912 | +"MIME-Version: 1.0\n" |
4913 | +"Content-Type: text/plain; charset=UTF-8\n" |
4914 | +"Content-Transfer-Encoding: \n" |
4915 | +"Plural-Forms: \n" |
4916 | + |
4917 | +#. module: l10n_cr_account_profit_statement_report |
4918 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:32 |
4919 | +msgid "Previous period" |
4920 | +msgstr "Período anterior" |
4921 | + |
4922 | +#. module: l10n_cr_account_profit_statement_report |
4923 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:22 |
4924 | +msgid "Until Period:" |
4925 | +msgstr "Período hasta:" |
4926 | + |
4927 | +#. module: l10n_cr_account_profit_statement_report |
4928 | +#: view:profit.statement.report.wiz:0 |
4929 | +msgid "{'required':True}" |
4930 | +msgstr "{'required':True}" |
4931 | + |
4932 | +#. module: l10n_cr_account_profit_statement_report |
4933 | +#: view:profit.statement.report.wiz:0 |
4934 | +msgid "[('type', '=', 'sum'),('account_type.code','=','PROSTA')]" |
4935 | +msgstr "[('type', '=', 'sum'),('account_type.code','=','PROSTA')]" |
4936 | + |
4937 | +#. module: l10n_cr_account_profit_statement_report |
4938 | +#: help:profit.statement.report.wiz,amount_currency:0 |
4939 | +msgid "It adds the currency column on report if the currency differs from the company currency." |
4940 | +msgstr "Añade la columna de moneda en el reporte si la moneda es diferente de la moneda de la compañía." |
4941 | + |
4942 | +#. module: l10n_cr_account_profit_statement_report |
4943 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:38 |
4944 | +msgid "Acum. Fiscal Year" |
4945 | +msgstr "Acum. Año Fiscal" |
4946 | + |
4947 | +#. module: l10n_cr_account_profit_statement_report |
4948 | +#: field:profit.statement.report.wiz,base_compare_account:0 |
4949 | +msgid "Base Income Account" |
4950 | +msgstr "Cuenta base de Ingreso" |
4951 | + |
4952 | +#. module: l10n_cr_account_profit_statement_report |
4953 | +#: view:account.account.type:0 |
4954 | +msgid "Configuration for Profit Statement Report" |
4955 | +msgstr "Configuración para el reporte de Estado de Resultados" |
4956 | + |
4957 | +#. module: l10n_cr_account_profit_statement_report |
4958 | +#: view:profit.statement.report.wiz:0 |
4959 | +msgid "Period" |
4960 | +msgstr "Período" |
4961 | + |
4962 | +#. module: l10n_cr_account_profit_statement_report |
4963 | +#: model:ir.model,name:l10n_cr_account_profit_statement_report.model_account_account_type |
4964 | +msgid "Account Type" |
4965 | +msgstr "Tipo de cuenta" |
4966 | + |
4967 | +#. module: l10n_cr_account_profit_statement_report |
4968 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:21 |
4969 | +#: view:profit.statement.report.wiz:0 |
4970 | +msgid "Profit Statement" |
4971 | +msgstr "Estado de Resultados" |
4972 | + |
4973 | +#. module: l10n_cr_account_profit_statement_report |
4974 | +#: help:profit.statement.report.wiz,historic_strict:0 |
4975 | +msgid "If selected, will display a historical unreconciled lines, taking into account the end of the period or date selected" |
4976 | +msgstr "Si se selecciona, se desplegará el histórico de las líneas no conciliadas, tomando en cuenta el final del período o la fecha seleccionada" |
4977 | + |
4978 | +#. module: l10n_cr_account_profit_statement_report |
4979 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:31 |
4980 | +msgid "Account<br />Name" |
4981 | +msgstr "Account<br />Name" |
4982 | + |
4983 | +#. module: l10n_cr_account_profit_statement_report |
4984 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:34 |
4985 | +msgid "Selected period" |
4986 | +msgstr "Período seleccionado" |
4987 | + |
4988 | +#. module: l10n_cr_account_profit_statement_report |
4989 | +#: field:profit.statement.report.wiz,company_id:0 |
4990 | +msgid "Company" |
4991 | +msgstr "Compañía" |
4992 | + |
4993 | +#. module: l10n_cr_account_profit_statement_report |
4994 | +#: field:profit.statement.report.wiz,amount_currency:0 |
4995 | +msgid "With Currency" |
4996 | +msgstr "Con moneda" |
4997 | + |
4998 | +#. module: l10n_cr_account_profit_statement_report |
4999 | +#: report:addons/l10n_cr_account_profit_statement_report/report/l10n_cr_account_profit_statement_report.mako:36 |
5000 | +msgid "Variation" |