From 86ddcd03e2387f139608084acff137e092fd1b8a Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Wed, 30 Jul 2014 14:18:20 -0400 Subject: [PATCH 01/25] account_chart_report: Initialize module --- account_chart_report/__init__.py | 24 +++++++ account_chart_report/__init__.pyc | Bin 0 -> 285 bytes account_chart_report/__openerp__.py | 47 +++++++++++++ account_chart_report/account_report.xml | 15 ++++ account_chart_report/report/__init__.py | 23 +++++++ account_chart_report/report/__init__.pyc | Bin 0 -> 264 bytes .../report/chart_of_accounts.py | 60 ++++++++++++++++ .../report/chart_of_accounts.pyc | Bin 0 -> 2085 bytes .../report/chart_of_accounts.rml | 64 ++++++++++++++++++ account_chart_report/static/src/img/icon.png | Bin 0 -> 8262 bytes account_chart_report/wizard/__init__.py | 23 +++++++ account_chart_report/wizard/__init__.pyc | Bin 0 -> 278 bytes .../wizard/account_report_chart_of_account.py | 47 +++++++++++++ .../account_report_chart_of_account.pyc | Bin 0 -> 1595 bytes .../account_report_chart_of_account.xml | 41 +++++++++++ 15 files changed, 344 insertions(+) create mode 100644 account_chart_report/__init__.py create mode 100644 account_chart_report/__init__.pyc create mode 100644 account_chart_report/__openerp__.py create mode 100644 account_chart_report/account_report.xml create mode 100644 account_chart_report/report/__init__.py create mode 100644 account_chart_report/report/__init__.pyc create mode 100644 account_chart_report/report/chart_of_accounts.py create mode 100644 account_chart_report/report/chart_of_accounts.pyc create mode 100644 account_chart_report/report/chart_of_accounts.rml create mode 100644 account_chart_report/static/src/img/icon.png create mode 100644 account_chart_report/wizard/__init__.py create mode 100644 account_chart_report/wizard/__init__.pyc create mode 100644 account_chart_report/wizard/account_report_chart_of_account.py create mode 100644 account_chart_report/wizard/account_report_chart_of_account.pyc create mode 100644 account_chart_report/wizard/account_report_chart_of_account.xml diff --git a/account_chart_report/__init__.py b/account_chart_report/__init__.py new file mode 100644 index 00000000..ebe217eb --- /dev/null +++ b/account_chart_report/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import report +from . import wizard diff --git a/account_chart_report/__init__.pyc b/account_chart_report/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..980603dae0c6d2af1ec19f1ba7ebff3a6fd75a54 GIT binary patch literal 285 zcmYL_!Ab)$5QdXo5h)1X`T`#IQs)JV2#Tj7#l7_sVluRm-6UjYDfJC}6W`AlaI#7r zGGG3mnIU1?@9V|a(`WD0Uo>(*NYbsq%h763YSe0{m9D;-eWP}b_*V7Zg){~&=qmV9 zP%x*$|Na<0Z1FE$TN@x_A*s_qQRBH@rmgwa`|i4*kC8`zfgj!f`4z2SDS#K94y zj1fzQh{sjJ71`)dun&ALSnpFLu+F6^vT+An*!+GDj0rKYF?adISMun3Onw^hekq#j H7H;$pZh1kR literal 0 HcmV?d00001 diff --git a/account_chart_report/__openerp__.py b/account_chart_report/__openerp__.py new file mode 100644 index 00000000..8ec0640d --- /dev/null +++ b/account_chart_report/__openerp__.py @@ -0,0 +1,47 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2014 Savoir-faire Linux +# (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + + +{ + 'name': 'Print chart of accounts', + 'version': '1.0', + 'category': 'Reports/pdf', + 'description': """Print chart of accounts. + +Contributors +------------ +* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) + + """, + 'author': 'Savoir-faire Linux', + 'website': 'http://www.savoirfairelinux.com', + 'depends': [ + 'base', + 'account', + ], + 'data': [ + 'account_report.xml', + 'wizard/account_report_chart_of_account.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/account_chart_report/account_report.xml b/account_chart_report/account_report.xml new file mode 100644 index 00000000..4d511857 --- /dev/null +++ b/account_chart_report/account_report.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/account_chart_report/report/__init__.py b/account_chart_report/report/__init__.py new file mode 100644 index 00000000..75edec50 --- /dev/null +++ b/account_chart_report/report/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import chart_of_accounts diff --git a/account_chart_report/report/__init__.pyc b/account_chart_report/report/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..293c7b2b007085486fc5de163abbcd30e4a30d73 GIT binary patch literal 264 zcmY+8L23gr3`Ol^Qvz880=dF$Qe7aFLQ7VmgwC!T). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.report import report_sxw + + +class account_char(report_sxw.rml_parse): + _name = 'report.account.print.chart' + + def __init__(self, cr, uid, name, context=None): + super(account_char, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + "get_lst_account": self._get_lst_account, + "cr": cr, + "uid": uid, + "actual_context": context, + }) + + def _get_lst_account(self, cr, uid, account_id, context): + account_obj = self.pool.get("account.account") + actual_account = account_obj.browse(cr, uid, account_id, + context=context) + lst_account = [] + self._fill_list_account_with_child(lst_account, actual_account) + return lst_account + + def _fill_list_account_with_child(self, lst_account, account): + # no more child + lst_account.append(account) + if not account.child_id: + return + for child in account.child_id: + self._fill_list_account_with_child(lst_account, child) + + +report_sxw.report_sxw( + 'report.account.print.chart', + 'account.account', + 'account_chart_report/report/chart_of_accounts.rml', + parser=account_char, +) diff --git a/account_chart_report/report/chart_of_accounts.pyc b/account_chart_report/report/chart_of_accounts.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bf375629d27ee30641aad068222722c1c29dd768 GIT binary patch literal 2085 zcmd5--;2~p5Ux&Uvp;UtJwZjm2SsEabb>GYbR36@zQ`aM zg0Q~&Kl$#T;~$`3RWj>%2)^zl-Capnx~jgfswVz=W#`N1Pm_ZBUxM`?4F3X?!L6tw znk$+rQYIp+Xcp0-A`{a`qI06R(^%f()quBX6)1uqnrE(Na?Yg+jL&!-Y!Kcp_2ljQ9`%o4> zb&aiU+oZKUdFG6dG~_Tmv~^7aDyR5pyX_WmK#5l3yOu@vxJU_&Nk(fn3fO{&IAQ%GGt=L zo|#*vQ@?f~F?fPo<6I>y0_?z^9JKDl+rTdC!?LP$RsNt|pOoPkd0$p$$gXD`)EX09 zEGvXcBc{S1Ywz5_Y&}(aRZ&?>uFFOtNAM7%r|`PEuC`U8_Ef@~3c z6AweS+i`FMk`(O(eC#4)^Ga#uL{>c!6B>S>RQe3+D|*L zB!8N`^|l>Lx=8)?-EPz!kl|no{J)0}v?xov{!xb_U5b7x3G!E$5`W)<%Tknk@$I{b Iig6|CJN7XV)c^nh literal 0 HcmV?d00001 diff --git a/account_chart_report/report/chart_of_accounts.rml b/account_chart_report/report/chart_of_accounts.rml new file mode 100644 index 00000000..da8ac8bd --- /dev/null +++ b/account_chart_report/report/chart_of_accounts.rml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Chart of accounts + + + + + + + + + + + + + + + + + + Code + Account + + + [[ repeatIn(get_lst_account(cr, uid, data["form"]["id_account"], actual_context), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] + + + + + + + diff --git a/account_chart_report/static/src/img/icon.png b/account_chart_report/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0dc49cddce5c465ea760900bb64418783bf1af22 GIT binary patch literal 8262 zcmV-MAi3X(P)~?k4S5;qqRrS5Px<^=+C4~^EAf=>Uo(|`JV7u)-Z2U&sYNXv-_=Z{_ zr39$Ud@EYywe(;@gl_zQ)l~$Dx_kwSz9qT5;+kg(g(XvKYpm%b; z^mrGb*5Fhvru@2e!2fT$ z;(qZBXZv}#Aq1}?rxD!>_R2w>T-4z>?FH?MAf58C@PqERTfZK@YX_)|P_Js4Zcu;^ zUkA0?55m>;UC&CpUwn03y0Phum3zgnOh6D*YFS2V{)61QK|3*Mvb{Ufi?3^^9=^9+ zXOuh${E(Id3L|t3)}?Fhm`3qcVyiSjNm^y`0TTOKE(OX;ul!FS5CV*HAKodhXYDjX z|AWL2c`IyJvFcV*y>t+>9Vkgjv1GATEV8*(U?ZO=lP{1h6xb@2D3&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1v>^azO>3W&s^f~&tGA5c7a^Uaz79D zIzo15R7I7NU&ax_J_ZsGg$Nr47IwHfTP#v4e?Y0Cd(<}TwQosUViBGi+Rg90?-5=c z8KS$nsU{EVF}fbq6hYf(`Fl?Z- zm^;shkaVMcm7`Sc_E`TWrl4s>_g&m(Fq z!tLtGAbjEdJ>ekjeZOf3F5aEzl}pz-d3~JG`K8J)X!xLFB{?gVs^#K&08}Nu4!+tv z5RZiEO(i)#(95R}@8`t>d)bjnDkMC3KKKHM(gtmZwPv}VND7(&uywFfQ?Tsc2lKCB)m-#2+2N*3rlS{E!hU%>5;AFx$2hX1n@=7Z=2M6FvA3fQ zFFXvH@5K-NElG!f?J6MMqy@#5(p!1nyEDVL&tK*2l>M_+OB)%A#S%p|Tzo%J?mHv| zkw}QXR5Qa}?L0HIi_aY$v0n(U@w;N`xO8Rp}1L;xd^`7Nk|RXoOMS2|n>7tJlh({d)uLsV4S!cW`{5myeGO@!{d!G({rr zMIrn@dsu56+c8RN;s07DpjIF2xh*D^RvBAd;nwmBHx`zeT(*BjZ($=tdTWbZu|%<0 zLe&M4P>6UqL`y76Pb$gI))ad?TG`jx&hGXWhC18X)!ITNY-;=8?l>Ok1T@-6BLqV2 zNvowBz-DR5vM5=SlC)UQ=2^?-NayV9YSw;RKT{}BEENHRXvjWx*bWmR@eo#1KyZ8?!7SxCX). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import account_report_chart_of_account diff --git a/account_chart_report/wizard/__init__.pyc b/account_chart_report/wizard/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee035c9f16d86932e553bf4d0899062793ab9b69 GIT binary patch literal 278 zcmY+8&1wQc4992mQVP8Z9=-0x<^_rfN>4?kd+TMG&O{yAoh*|qi+zK>N#Cz8&@9?Q zL-NZPB>(C6!~NIxvkvBF6U}Q4o++ZbHH|T?HE-6~I5BlK)kU(3YJ@BlJ_PEsxPl!O zapB~Zba1!%t{Sh3hIt)P{Ra=)!--miHhAV<2). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import fields, orm + + +class chart_of_account_report(orm.TransientModel): + _name = 'account.print.chart.accounts.report' + _description = 'Chart of accounts Report' + + domain_char_account = [('parent_id', '=', False)] + _columns = { + 'chart_account_id': fields.many2one('account.account', + 'Chart of Account', + help='Select Charts of Accounts', + required=True, + domain=domain_char_account), + } + + def print_report(self, cr, uid, ids, data, context=None): + res = self.read(cr, uid, ids, context=context)[0] + account_id = res["chart_account_id"][0] + data["form"] = {"id_account": account_id} + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'account.print.chart', + 'datas': data + } diff --git a/account_chart_report/wizard/account_report_chart_of_account.pyc b/account_chart_report/wizard/account_report_chart_of_account.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b2f1f0eb3be341d60d4d29c071267a6279e924b5 GIT binary patch literal 1595 zcmd5+O>fgc5FN*9+VqR>k8+_B2XbjFfz(q$Kv7RnRY@g8BxD)yq;+L`&F+RaD4g00 z7k&r-j~@VU)=t}>&^R9N?#%AId2j6S@7nU8_rHcIHNOzgH@NLf7=?d8IZ+YND4?Q6 zqZS3KMcks3kj4S2kS>VMi9V0oq}nv>Enr{v55HauBiDf$XPhhRYQAmJ*%-p7NNJm&%pe!Kn(8;2JPz$6w zq%dA0ULw^cUZC?s0cNl4t!oF*<8NO-zigO#<$`G8c9oLXif3U=7C7)R}EW_`ijjST;z@YjZt*03yz93v3BBg zG~D|T9TU>g^ zHR1bk59DKT#q3R`cOZT91h>5p(+P03?t;>;jBu@m`~Jh{yRuQdukClw$G|tFXmMzg d(q{NReAJ3_f9TDx-3zx + + + + + Print chart of accounts + account.print.chart.accounts.report + +
+ + + +
+
+
+
+
+ + + Print chart of accounts + ir.actions.act_window + account.print.chart.accounts.report + form + form + new + + + + +
+
From 3042627a5fec89a080f7d40f943daf19d65e7a1e Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Wed, 30 Jul 2014 14:20:58 -0400 Subject: [PATCH 02/25] account_chart_report: Cleaning module --- account_chart_report/__init__.pyc | Bin 285 -> 0 bytes account_chart_report/report/__init__.pyc | Bin 264 -> 0 bytes .../report/chart_of_accounts.pyc | Bin 2085 -> 0 bytes account_chart_report/static/src/img/icon.png | Bin 8262 -> 0 bytes account_chart_report/wizard/__init__.pyc | Bin 278 -> 0 bytes .../wizard/account_report_chart_of_account.pyc | Bin 1595 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 account_chart_report/__init__.pyc delete mode 100644 account_chart_report/report/__init__.pyc delete mode 100644 account_chart_report/report/chart_of_accounts.pyc delete mode 100644 account_chart_report/static/src/img/icon.png delete mode 100644 account_chart_report/wizard/__init__.pyc delete mode 100644 account_chart_report/wizard/account_report_chart_of_account.pyc diff --git a/account_chart_report/__init__.pyc b/account_chart_report/__init__.pyc deleted file mode 100644 index 980603dae0c6d2af1ec19f1ba7ebff3a6fd75a54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 285 zcmYL_!Ab)$5QdXo5h)1X`T`#IQs)JV2#Tj7#l7_sVluRm-6UjYDfJC}6W`AlaI#7r zGGG3mnIU1?@9V|a(`WD0Uo>(*NYbsq%h763YSe0{m9D;-eWP}b_*V7Zg){~&=qmV9 zP%x*$|Na<0Z1FE$TN@x_A*s_qQRBH@rmgwa`|i4*kC8`zfgj!f`4z2SDS#K94y zj1fzQh{sjJ71`)dun&ALSnpFLu+F6^vT+An*!+GDj0rKYF?adISMun3Onw^hekq#j H7H;$pZh1kR diff --git a/account_chart_report/report/__init__.pyc b/account_chart_report/report/__init__.pyc deleted file mode 100644 index 293c7b2b007085486fc5de163abbcd30e4a30d73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmY+8L23gr3`Ol^Qvz880=dF$Qe7aFLQ7VmgwC!TGYbR36@zQ`aM zg0Q~&Kl$#T;~$`3RWj>%2)^zl-Capnx~jgfswVz=W#`N1Pm_ZBUxM`?4F3X?!L6tw znk$+rQYIp+Xcp0-A`{a`qI06R(^%f()quBX6)1uqnrE(Na?Yg+jL&!-Y!Kcp_2ljQ9`%o4> zb&aiU+oZKUdFG6dG~_Tmv~^7aDyR5pyX_WmK#5l3yOu@vxJU_&Nk(fn3fO{&IAQ%GGt=L zo|#*vQ@?f~F?fPo<6I>y0_?z^9JKDl+rTdC!?LP$RsNt|pOoPkd0$p$$gXD`)EX09 zEGvXcBc{S1Ywz5_Y&}(aRZ&?>uFFOtNAM7%r|`PEuC`U8_Ef@~3c z6AweS+i`FMk`(O(eC#4)^Ga#uL{>c!6B>S>RQe3+D|*L zB!8N`^|l>Lx=8)?-EPz!kl|no{J)0}v?xov{!xb_U5b7x3G!E$5`W)<%Tknk@$I{b Iig6|CJN7XV)c^nh diff --git a/account_chart_report/static/src/img/icon.png b/account_chart_report/static/src/img/icon.png deleted file mode 100644 index 0dc49cddce5c465ea760900bb64418783bf1af22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8262 zcmV-MAi3X(P)~?k4S5;qqRrS5Px<^=+C4~^EAf=>Uo(|`JV7u)-Z2U&sYNXv-_=Z{_ zr39$Ud@EYywe(;@gl_zQ)l~$Dx_kwSz9qT5;+kg(g(XvKYpm%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IxvkvBF6U}Q4o++ZbHH|T?HE-6~I5BlK)kU(3YJ@BlJ_PEsxPl!O zapB~Zba1!%t{Sh3hIt)P{Ra=)!--miHhAV<2fgc5FN*9+VqR>k8+_B2XbjFfz(q$Kv7RnRY@g8BxD)yq;+L`&F+RaD4g00 z7k&r-j~@VU)=t}>&^R9N?#%AId2j6S@7nU8_rHcIHNOzgH@NLf7=?d8IZ+YND4?Q6 zqZS3KMcks3kj4S2kS>VMi9V0oq}nv>Enr{v55HauBiDf$XPhhRYQAmJ*%-p7NNJm&%pe!Kn(8;2JPz$6w zq%dA0ULw^cUZC?s0cNl4t!oF*<8NO-zigO#<$`G8c9oLXif3U=7C7)R}EW_`ijjST;z@YjZt*03yz93v3BBg zG~D|T9TU>g^ zHR1bk59DKT#q3R`cOZT91h>5p(+P03?t;>;jBu@m`~Jh{yRuQdukClw$G|tFXmMzg d(q{NReAJ3_f9TDx-3zx Date: Wed, 30 Jul 2014 14:29:28 -0400 Subject: [PATCH 03/25] account_chart_report: PEP8 complience + update description --- account_chart_report/__init__.py | 24 ------- account_chart_report/__openerp__.py | 47 -------------- account_chart_report/account_report.xml | 15 ----- account_chart_report/report/__init__.py | 23 ------- .../report/chart_of_accounts.py | 60 ----------------- .../report/chart_of_accounts.rml | 64 ------------------- account_chart_report/wizard/__init__.py | 23 ------- .../wizard/account_report_chart_of_account.py | 47 -------------- .../account_report_chart_of_account.xml | 41 ------------ 9 files changed, 344 deletions(-) delete mode 100644 account_chart_report/__init__.py delete mode 100644 account_chart_report/__openerp__.py delete mode 100644 account_chart_report/account_report.xml delete mode 100644 account_chart_report/report/__init__.py delete mode 100644 account_chart_report/report/chart_of_accounts.py delete mode 100644 account_chart_report/report/chart_of_accounts.rml delete mode 100644 account_chart_report/wizard/__init__.py delete mode 100644 account_chart_report/wizard/account_report_chart_of_account.py delete mode 100644 account_chart_report/wizard/account_report_chart_of_account.xml diff --git a/account_chart_report/__init__.py b/account_chart_report/__init__.py deleted file mode 100644 index ebe217eb..00000000 --- a/account_chart_report/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import report -from . import wizard diff --git a/account_chart_report/__openerp__.py b/account_chart_report/__openerp__.py deleted file mode 100644 index 8ec0640d..00000000 --- a/account_chart_report/__openerp__.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################### -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Savoir-faire Linux -# (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################### - - -{ - 'name': 'Print chart of accounts', - 'version': '1.0', - 'category': 'Reports/pdf', - 'description': """Print chart of accounts. - -Contributors ------------- -* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) - - """, - 'author': 'Savoir-faire Linux', - 'website': 'http://www.savoirfairelinux.com', - 'depends': [ - 'base', - 'account', - ], - 'data': [ - 'account_report.xml', - 'wizard/account_report_chart_of_account.xml', - ], - 'installable': True, - 'auto_install': False, -} diff --git a/account_chart_report/account_report.xml b/account_chart_report/account_report.xml deleted file mode 100644 index 4d511857..00000000 --- a/account_chart_report/account_report.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/account_chart_report/report/__init__.py b/account_chart_report/report/__init__.py deleted file mode 100644 index 75edec50..00000000 --- a/account_chart_report/report/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import chart_of_accounts diff --git a/account_chart_report/report/chart_of_accounts.py b/account_chart_report/report/chart_of_accounts.py deleted file mode 100644 index 19d8f6a6..00000000 --- a/account_chart_report/report/chart_of_accounts.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- - -# ############################################################################# -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.report import report_sxw - - -class account_char(report_sxw.rml_parse): - _name = 'report.account.print.chart' - - def __init__(self, cr, uid, name, context=None): - super(account_char, self).__init__(cr, uid, name, context=context) - self.localcontext.update({ - "get_lst_account": self._get_lst_account, - "cr": cr, - "uid": uid, - "actual_context": context, - }) - - def _get_lst_account(self, cr, uid, account_id, context): - account_obj = self.pool.get("account.account") - actual_account = account_obj.browse(cr, uid, account_id, - context=context) - lst_account = [] - self._fill_list_account_with_child(lst_account, actual_account) - return lst_account - - def _fill_list_account_with_child(self, lst_account, account): - # no more child - lst_account.append(account) - if not account.child_id: - return - for child in account.child_id: - self._fill_list_account_with_child(lst_account, child) - - -report_sxw.report_sxw( - 'report.account.print.chart', - 'account.account', - 'account_chart_report/report/chart_of_accounts.rml', - parser=account_char, -) diff --git a/account_chart_report/report/chart_of_accounts.rml b/account_chart_report/report/chart_of_accounts.rml deleted file mode 100644 index da8ac8bd..00000000 --- a/account_chart_report/report/chart_of_accounts.rml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Chart of accounts - - - - - - - - - - - - - - - - - - Code - Account - - - [[ repeatIn(get_lst_account(cr, uid, data["form"]["id_account"], actual_context), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] - [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] - - - - - - - diff --git a/account_chart_report/wizard/__init__.py b/account_chart_report/wizard/__init__.py deleted file mode 100644 index 4b7dba05..00000000 --- a/account_chart_report/wizard/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import account_report_chart_of_account diff --git a/account_chart_report/wizard/account_report_chart_of_account.py b/account_chart_report/wizard/account_report_chart_of_account.py deleted file mode 100644 index 7782ebec..00000000 --- a/account_chart_report/wizard/account_report_chart_of_account.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import fields, orm - - -class chart_of_account_report(orm.TransientModel): - _name = 'account.print.chart.accounts.report' - _description = 'Chart of accounts Report' - - domain_char_account = [('parent_id', '=', False)] - _columns = { - 'chart_account_id': fields.many2one('account.account', - 'Chart of Account', - help='Select Charts of Accounts', - required=True, - domain=domain_char_account), - } - - def print_report(self, cr, uid, ids, data, context=None): - res = self.read(cr, uid, ids, context=context)[0] - account_id = res["chart_account_id"][0] - data["form"] = {"id_account": account_id} - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.print.chart', - 'datas': data - } diff --git a/account_chart_report/wizard/account_report_chart_of_account.xml b/account_chart_report/wizard/account_report_chart_of_account.xml deleted file mode 100644 index af53cf83..00000000 --- a/account_chart_report/wizard/account_report_chart_of_account.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Print chart of accounts - account.print.chart.accounts.report - -
- - - -
-
-
-
-
- - - Print chart of accounts - ir.actions.act_window - account.print.chart.accounts.report - form - form - new - - - - -
-
From 069d00e4db3e67e9595b0244f33cefb1ee519a8b Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Wed, 30 Jul 2014 14:58:52 -0400 Subject: [PATCH 04/25] account_chart_report_rml: rename module + add translation pot file + add fr translation --- account_chart_report_rml/__init__.py | 24 ++++++ account_chart_report_rml/__openerp__.py | 53 +++++++++++++ account_chart_report_rml/account_report.xml | 15 ++++ .../i18n/account_chart_report_rml.pot | 78 +++++++++++++++++++ account_chart_report_rml/i18n/fr.po | 78 +++++++++++++++++++ account_chart_report_rml/report/__init__.py | 23 ++++++ .../report/chart_of_accounts.py | 60 ++++++++++++++ .../report/chart_of_accounts.rml | 64 +++++++++++++++ account_chart_report_rml/wizard/__init__.py | 23 ++++++ .../wizard/account_report_chart_of_account.py | 47 +++++++++++ .../account_report_chart_of_account.xml | 41 ++++++++++ 11 files changed, 506 insertions(+) create mode 100644 account_chart_report_rml/__init__.py create mode 100644 account_chart_report_rml/__openerp__.py create mode 100644 account_chart_report_rml/account_report.xml create mode 100644 account_chart_report_rml/i18n/account_chart_report_rml.pot create mode 100644 account_chart_report_rml/i18n/fr.po create mode 100644 account_chart_report_rml/report/__init__.py create mode 100644 account_chart_report_rml/report/chart_of_accounts.py create mode 100644 account_chart_report_rml/report/chart_of_accounts.rml create mode 100644 account_chart_report_rml/wizard/__init__.py create mode 100644 account_chart_report_rml/wizard/account_report_chart_of_account.py create mode 100644 account_chart_report_rml/wizard/account_report_chart_of_account.xml diff --git a/account_chart_report_rml/__init__.py b/account_chart_report_rml/__init__.py new file mode 100644 index 00000000..c2451dfb --- /dev/null +++ b/account_chart_report_rml/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +############################################################################### +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + +from . import report +from . import wizard diff --git a/account_chart_report_rml/__openerp__.py b/account_chart_report_rml/__openerp__.py new file mode 100644 index 00000000..9569f452 --- /dev/null +++ b/account_chart_report_rml/__openerp__.py @@ -0,0 +1,53 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2014 Savoir-faire Linux +# (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + + +{ + 'name': 'Print chart of accounts', + 'version': '1.0', + 'category': 'Reports/pdf', + 'description': """Print chart of accounts. + +This module add the menu Accounting \ Charts \ Print chart of Accounts +and allow to print the selected chart of accounts. + +This module is based on the old RML engine report. + +Contributors +------------ +* Marc Cassuto (marc.cassuto@savoirfairelinux.com) +* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) + + """, + 'author': 'Savoir-faire Linux', + 'website': 'http://www.savoirfairelinux.com', + 'depends': [ + 'base', + 'account', + ], + 'data': [ + 'account_report.xml', + 'wizard/account_report_chart_of_account.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/account_chart_report_rml/account_report.xml b/account_chart_report_rml/account_report.xml new file mode 100644 index 00000000..b0f4d55d --- /dev/null +++ b/account_chart_report_rml/account_report.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/account_chart_report_rml/i18n/account_chart_report_rml.pot b/account_chart_report_rml/i18n/account_chart_report_rml.pot new file mode 100644 index 00000000..05687a7b --- /dev/null +++ b/account_chart_report_rml/i18n/account_chart_report_rml.pot @@ -0,0 +1,78 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_chart_report +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-07-30 18:52+0000\n" +"PO-Revision-Date: 2014-07-30 18:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_chart_report +#: report:account.print.chart:0 +msgid "Account" +msgstr "" + +#. module: account_chart_report +#: report:account.print.chart:0 +msgid "Code" +msgstr "" + +#. module: account_chart_report +#: model:ir.actions.act_window,name:account_chart_report.action_print_chart_menu +#: model:ir.ui.menu,name:account_chart_report.menu_wizard_print_chart_account +msgid "Print chart of accounts" +msgstr "" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "Print" +msgstr "" + +#. module: account_chart_report +#: model:ir.model,name:account_chart_report.model_account_print_chart_accounts_report +msgid "Chart of accounts Report" +msgstr "" + +#. module: account_chart_report +#: model:ir.actions.report.xml,name:account_chart_report.account_chart_account +msgid "Print chart account" +msgstr "" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "Cancel" +msgstr "" + +#. module: account_chart_report +#: field:account.print.chart.accounts.report,chart_account_id:0 +msgid "Chart of Account" +msgstr "" + +#. module: account_chart_report +#: report:account.print.chart:0 +msgid "Chart of accounts" +msgstr "" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "or" +msgstr "" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "Report Options" +msgstr "" + +#. module: account_chart_report +#: help:account.print.chart.accounts.report,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "" + diff --git a/account_chart_report_rml/i18n/fr.po b/account_chart_report_rml/i18n/fr.po new file mode 100644 index 00000000..18d88c26 --- /dev/null +++ b/account_chart_report_rml/i18n/fr.po @@ -0,0 +1,78 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_chart_report +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-07-30 18:52+0000\n" +"PO-Revision-Date: 2014-07-30 14:56-0500\n" +"Last-Translator: Marc Cassuto \n" +"Language-Team: Savoir-faire Linux\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"Language: fr\n" + +#. module: account_chart_report +#: report:account.print.chart:0 +msgid "Account" +msgstr "Compte" + +#. module: account_chart_report +#: report:account.print.chart:0 +msgid "Code" +msgstr "Code" + +#. module: account_chart_report +#: model:ir.actions.act_window,name:account_chart_report.action_print_chart_menu +#: model:ir.ui.menu,name:account_chart_report.menu_wizard_print_chart_account +msgid "Print chart of accounts" +msgstr "Imprimer la charte de comptes" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "Print" +msgstr "Imprimer" + +#. module: account_chart_report +#: model:ir.model,name:account_chart_report.model_account_print_chart_accounts_report +msgid "Chart of accounts Report" +msgstr "Charte de comptes" + +#. module: account_chart_report +#: model:ir.actions.report.xml,name:account_chart_report.account_chart_account +msgid "Print chart account" +msgstr "Imprimer la charte de comptes" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "Cancel" +msgstr "Annuler" + +#. module: account_chart_report +#: field:account.print.chart.accounts.report,chart_account_id:0 +msgid "Chart of Account" +msgstr "Charte de comptes" + +#. module: account_chart_report +#: report:account.print.chart:0 +msgid "Chart of accounts" +msgstr "Charte de comptes" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "or" +msgstr "ou" + +#. module: account_chart_report +#: view:account.print.chart.accounts.report:0 +msgid "Report Options" +msgstr "Options du rapport" + +#. module: account_chart_report +#: help:account.print.chart.accounts.report,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "Charte de compte à imprimer" diff --git a/account_chart_report_rml/report/__init__.py b/account_chart_report_rml/report/__init__.py new file mode 100644 index 00000000..89ef0951 --- /dev/null +++ b/account_chart_report_rml/report/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +############################################################################### +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + +from . import chart_of_accounts diff --git a/account_chart_report_rml/report/chart_of_accounts.py b/account_chart_report_rml/report/chart_of_accounts.py new file mode 100644 index 00000000..6905edb5 --- /dev/null +++ b/account_chart_report_rml/report/chart_of_accounts.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- + +############################################################################### +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + +from openerp.report import report_sxw + + +class account_char(report_sxw.rml_parse): + _name = 'report.account.print.chart' + + def __init__(self, cr, uid, name, context=None): + super(account_char, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + "get_lst_account": self._get_lst_account, + "cr": cr, + "uid": uid, + "actual_context": context, + }) + + def _get_lst_account(self, cr, uid, account_id, context): + account_obj = self.pool.get("account.account") + actual_account = account_obj.browse(cr, uid, account_id, + context=context) + lst_account = [] + self._fill_list_account_with_child(lst_account, actual_account) + return lst_account + + def _fill_list_account_with_child(self, lst_account, account): + # no more child + lst_account.append(account) + if not account.child_id: + return + for child in account.child_id: + self._fill_list_account_with_child(lst_account, child) + + +report_sxw.report_sxw( + 'report.account.print.chart', + 'account.account', + 'account_chart_report/report/chart_of_accounts.rml', + parser=account_char, +) diff --git a/account_chart_report_rml/report/chart_of_accounts.rml b/account_chart_report_rml/report/chart_of_accounts.rml new file mode 100644 index 00000000..da8ac8bd --- /dev/null +++ b/account_chart_report_rml/report/chart_of_accounts.rml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Chart of accounts + + + + + + + + + + + + + + + + + + Code + Account + + + [[ repeatIn(get_lst_account(cr, uid, data["form"]["id_account"], actual_context), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] + + + + + + + diff --git a/account_chart_report_rml/wizard/__init__.py b/account_chart_report_rml/wizard/__init__.py new file mode 100644 index 00000000..4b7dba05 --- /dev/null +++ b/account_chart_report_rml/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import account_report_chart_of_account diff --git a/account_chart_report_rml/wizard/account_report_chart_of_account.py b/account_chart_report_rml/wizard/account_report_chart_of_account.py new file mode 100644 index 00000000..7782ebec --- /dev/null +++ b/account_chart_report_rml/wizard/account_report_chart_of_account.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2014 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import fields, orm + + +class chart_of_account_report(orm.TransientModel): + _name = 'account.print.chart.accounts.report' + _description = 'Chart of accounts Report' + + domain_char_account = [('parent_id', '=', False)] + _columns = { + 'chart_account_id': fields.many2one('account.account', + 'Chart of Account', + help='Select Charts of Accounts', + required=True, + domain=domain_char_account), + } + + def print_report(self, cr, uid, ids, data, context=None): + res = self.read(cr, uid, ids, context=context)[0] + account_id = res["chart_account_id"][0] + data["form"] = {"id_account": account_id} + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'account.print.chart', + 'datas': data + } diff --git a/account_chart_report_rml/wizard/account_report_chart_of_account.xml b/account_chart_report_rml/wizard/account_report_chart_of_account.xml new file mode 100644 index 00000000..af53cf83 --- /dev/null +++ b/account_chart_report_rml/wizard/account_report_chart_of_account.xml @@ -0,0 +1,41 @@ + + + + + + Print chart of accounts + account.print.chart.accounts.report + +
+ + + +
+
+
+
+
+ + + Print chart of accounts + ir.actions.act_window + account.print.chart.accounts.report + form + form + new + + + + +
+
From 4478736b28fb829f42811a0414c3a6298f6921fa Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Wed, 30 Jul 2014 15:49:33 -0400 Subject: [PATCH 05/25] account_chart_report_rml: renamming the module broke the report = Fixed ! --- account_chart_report_rml/account_report.xml | 2 +- account_chart_report_rml/report/chart_of_accounts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account_chart_report_rml/account_report.xml b/account_chart_report_rml/account_report.xml index b0f4d55d..01f277f6 100644 --- a/account_chart_report_rml/account_report.xml +++ b/account_chart_report_rml/account_report.xml @@ -7,7 +7,7 @@ menu="False" model="account.account" name="account.print.chart" - rml="account_chart_report/report/chart_of_accounts.rml" + rml="account_chart_report_rml/report/chart_of_accounts.rml" string="Print chart account" report_type="pdf" /> diff --git a/account_chart_report_rml/report/chart_of_accounts.py b/account_chart_report_rml/report/chart_of_accounts.py index 6905edb5..e13cdad7 100644 --- a/account_chart_report_rml/report/chart_of_accounts.py +++ b/account_chart_report_rml/report/chart_of_accounts.py @@ -55,6 +55,6 @@ class account_char(report_sxw.rml_parse): report_sxw.report_sxw( 'report.account.print.chart', 'account.account', - 'account_chart_report/report/chart_of_accounts.rml', + 'account_chart_report_rml/report/chart_of_accounts.rml', parser=account_char, ) From 84341575a45cf76bdfe6a1eace3d782b461b7bab Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Sat, 2 Aug 2014 22:12:51 -0400 Subject: [PATCH 06/25] account_chart_report : * CamelCase fixed * back to the original name * self.pool.get replaced * margins fixed --- .../__init__.py | 0 .../__openerp__.py | 0 .../account_report.xml | 2 +- .../i18n/account_chart_report.pot | 0 .../i18n/fr.po | 0 .../report/__init__.py | 0 .../report/chart_of_accounts.py | 10 +++++----- .../report/chart_of_accounts.rml | 8 ++++---- .../wizard/__init__.py | 0 .../wizard/account_report_chart_of_account.py | 4 ++-- .../wizard/account_report_chart_of_account.xml | 0 account_financial_report/i18n/es.mo | Bin 8893 -> 0 bytes 12 files changed, 12 insertions(+), 12 deletions(-) rename {account_chart_report_rml => account_chart_report}/__init__.py (100%) rename {account_chart_report_rml => account_chart_report}/__openerp__.py (100%) rename {account_chart_report_rml => account_chart_report}/account_report.xml (81%) rename account_chart_report_rml/i18n/account_chart_report_rml.pot => account_chart_report/i18n/account_chart_report.pot (100%) rename {account_chart_report_rml => account_chart_report}/i18n/fr.po (100%) rename {account_chart_report_rml => account_chart_report}/report/__init__.py (100%) rename {account_chart_report_rml => account_chart_report}/report/chart_of_accounts.py (88%) rename {account_chart_report_rml => account_chart_report}/report/chart_of_accounts.rml (91%) rename {account_chart_report_rml => account_chart_report}/wizard/__init__.py (100%) rename {account_chart_report_rml => account_chart_report}/wizard/account_report_chart_of_account.py (94%) rename {account_chart_report_rml => account_chart_report}/wizard/account_report_chart_of_account.xml (100%) delete mode 100644 account_financial_report/i18n/es.mo diff --git a/account_chart_report_rml/__init__.py b/account_chart_report/__init__.py similarity index 100% rename from account_chart_report_rml/__init__.py rename to account_chart_report/__init__.py diff --git a/account_chart_report_rml/__openerp__.py b/account_chart_report/__openerp__.py similarity index 100% rename from account_chart_report_rml/__openerp__.py rename to account_chart_report/__openerp__.py diff --git a/account_chart_report_rml/account_report.xml b/account_chart_report/account_report.xml similarity index 81% rename from account_chart_report_rml/account_report.xml rename to account_chart_report/account_report.xml index 01f277f6..b0f4d55d 100644 --- a/account_chart_report_rml/account_report.xml +++ b/account_chart_report/account_report.xml @@ -7,7 +7,7 @@ menu="False" model="account.account" name="account.print.chart" - rml="account_chart_report_rml/report/chart_of_accounts.rml" + rml="account_chart_report/report/chart_of_accounts.rml" string="Print chart account" report_type="pdf" /> diff --git a/account_chart_report_rml/i18n/account_chart_report_rml.pot b/account_chart_report/i18n/account_chart_report.pot similarity index 100% rename from account_chart_report_rml/i18n/account_chart_report_rml.pot rename to account_chart_report/i18n/account_chart_report.pot diff --git a/account_chart_report_rml/i18n/fr.po b/account_chart_report/i18n/fr.po similarity index 100% rename from account_chart_report_rml/i18n/fr.po rename to account_chart_report/i18n/fr.po diff --git a/account_chart_report_rml/report/__init__.py b/account_chart_report/report/__init__.py similarity index 100% rename from account_chart_report_rml/report/__init__.py rename to account_chart_report/report/__init__.py diff --git a/account_chart_report_rml/report/chart_of_accounts.py b/account_chart_report/report/chart_of_accounts.py similarity index 88% rename from account_chart_report_rml/report/chart_of_accounts.py rename to account_chart_report/report/chart_of_accounts.py index e13cdad7..1d99a1f9 100644 --- a/account_chart_report_rml/report/chart_of_accounts.py +++ b/account_chart_report/report/chart_of_accounts.py @@ -23,11 +23,11 @@ from openerp.report import report_sxw -class account_char(report_sxw.rml_parse): +class AccountChar(report_sxw.rml_parse): _name = 'report.account.print.chart' def __init__(self, cr, uid, name, context=None): - super(account_char, self).__init__(cr, uid, name, context=context) + super(AccountChar, self).__init__(cr, uid, name, context=context) self.localcontext.update({ "get_lst_account": self._get_lst_account, "cr": cr, @@ -36,7 +36,7 @@ class account_char(report_sxw.rml_parse): }) def _get_lst_account(self, cr, uid, account_id, context): - account_obj = self.pool.get("account.account") + account_obj = self.pool['account.account'] actual_account = account_obj.browse(cr, uid, account_id, context=context) lst_account = [] @@ -55,6 +55,6 @@ class account_char(report_sxw.rml_parse): report_sxw.report_sxw( 'report.account.print.chart', 'account.account', - 'account_chart_report_rml/report/chart_of_accounts.rml', - parser=account_char, + 'account_chart_report/report/chart_of_accounts.rml', + parser=AccountChar, ) diff --git a/account_chart_report_rml/report/chart_of_accounts.rml b/account_chart_report/report/chart_of_accounts.rml similarity index 91% rename from account_chart_report_rml/report/chart_of_accounts.rml rename to account_chart_report/report/chart_of_accounts.rml index da8ac8bd..3beb5b47 100644 --- a/account_chart_report_rml/report/chart_of_accounts.rml +++ b/account_chart_report/report/chart_of_accounts.rml @@ -1,8 +1,8 @@ -