From 10af1c94eaa5c4ab579ebbcd8155e25c9b4ee4c8 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Mon, 29 Dec 2008 16:14:24 +0530 Subject: [PATCH] Added Balance sheet and PnL reoprts for l10n_fr bzr revid: jvo@tinyerp.com-20081229104424-a8mcjvfjgut0zfst --- addons/l10n_fr/__init__.py | 1 + addons/l10n_fr/__terp__.py | 2 +- addons/l10n_fr/fr_wizard.xml | 28 +- addons/l10n_fr/report/__init__.py | 30 ++ addons/l10n_fr/report/base_report.py | 125 +++++ addons/l10n_fr/report/report_bilan.py | 36 ++ addons/l10n_fr/report/report_bilan.rml | 3 + addons/l10n_fr/report/report_cdr.py | 36 ++ addons/l10n_fr/report/report_cdr.rml | 655 +++++++++++++++++++++++++ addons/l10n_fr/wizard/__init__.py | 2 + addons/l10n_fr/wizard/wizard_bilan.py | 57 +++ addons/l10n_fr/wizard/wizard_cdr.py | 57 +++ 12 files changed, 1026 insertions(+), 6 deletions(-) create mode 100755 addons/l10n_fr/report/__init__.py create mode 100755 addons/l10n_fr/report/base_report.py create mode 100755 addons/l10n_fr/report/report_bilan.py create mode 100755 addons/l10n_fr/report/report_bilan.rml create mode 100755 addons/l10n_fr/report/report_cdr.py create mode 100755 addons/l10n_fr/report/report_cdr.rml create mode 100755 addons/l10n_fr/wizard/wizard_bilan.py create mode 100755 addons/l10n_fr/wizard/wizard_cdr.py diff --git a/addons/l10n_fr/__init__.py b/addons/l10n_fr/__init__.py index 747566bf5d1..db9b32b8027 100644 --- a/addons/l10n_fr/__init__.py +++ b/addons/l10n_fr/__init__.py @@ -22,6 +22,7 @@ import l10n_fr import wizard +import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_fr/__terp__.py b/addons/l10n_fr/__terp__.py index d632dbae9ff..4aed0b86471 100644 --- a/addons/l10n_fr/__terp__.py +++ b/addons/l10n_fr/__terp__.py @@ -48,7 +48,7 @@ """, "init_xml" : ["fr_data.xml"], "update_xml" : ["l10n_fr_view.xml","types.xml", "plan-99-03_societe.xml", - "taxes.xml","fr_wizard.xml"], + "taxes.xml","fr_wizard.xml",], "demo_xml" : [], "installable": True } diff --git a/addons/l10n_fr/fr_wizard.xml b/addons/l10n_fr/fr_wizard.xml index b6468872879..e84269fd279 100755 --- a/addons/l10n_fr/fr_wizard.xml +++ b/addons/l10n_fr/fr_wizard.xml @@ -7,11 +7,29 @@ - Generate Chart of Accounts from a Chart Template - Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated. -This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template. - - + Generate Chart of Accounts from a Chart Template + Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated. + This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template. + + + + + + + + + + diff --git a/addons/l10n_fr/report/__init__.py b/addons/l10n_fr/report/__init__.py new file mode 100755 index 00000000000..c9ddc4485e7 --- /dev/null +++ b/addons/l10n_fr/report/__init__.py @@ -0,0 +1,30 @@ +############################################################################## +# +# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import base_report +import report_bilan +import report_cdr diff --git a/addons/l10n_fr/report/base_report.py b/addons/l10n_fr/report/base_report.py new file mode 100755 index 00000000000..755dcfadaf4 --- /dev/null +++ b/addons/l10n_fr/report/base_report.py @@ -0,0 +1,125 @@ +############################################################################## +# +# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import time +from report import report_sxw + +class base_report(report_sxw.rml_parse): + def __init__(self, cr, uid, name, context): + super(base_report, self).__init__(cr, uid, name, context) + self.localcontext.update( { + 'time': time, + '_load': self._load, + '_get_variable': self._get_variable, + '_set_variable': self._set_variable, + }) + self.context = context + + def _load(self,name,form): + fiscalyear=self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear']) + + periods=self.pool.get('account.period').search(self.cr, self.uid,[('fiscalyear_id','=',form['fiscalyear'])]) + period_query_cond=str(tuple(periods)) + + query = "SELECT MIN(date_start) AS date_start, MAX(date_stop) AS date_stop FROM account_period WHERE id IN "+str(period_query_cond) + self.cr.execute(query) + dates =self.cr.dictfetchall() + self._set_variable('date_start', dates[0]['date_start']) + self._set_variable('date_stop', dates[0]['date_stop']) + + query = "SELECT l10n_fr_line.code,definition FROM l10n_fr_line LEFT JOIN l10n_fr_report ON l10n_fr_report.id=report_id WHERE l10n_fr_report.code='"+name+"'" + self.cr.execute(query) + datas =self.cr.dictfetchall() + + for line in datas: + self._load_accounts(form,line['code'],eval(line['definition']),fiscalyear,period_query_cond) + + def _set_variable(self,variable,valeur): + self.localcontext.update({variable:valeur}) + + def _get_variable(self,variable): + return self.localcontext[variable] + + def _load_accounts(self,form,code,definition,fiscalyear,period_query_cond): + + #self.context.copy() + accounts={} + for x in definition['load']: + p=x.split(":") + accounts[p[1]]=[p[0],p[2]] + + sum=0.0 + + if fiscalyear.state!='done' or not code.startswith('bpcheck'): + + query_cond="(" + for account in accounts: + query_cond += "aa.code LIKE '"+account+"%' OR " + query_cond = query_cond[:-4]+")" + + if len(definition['except'])>0: + query_cond = query_cond+" and (" + for account in definition['except']: + query_cond += "aa.code NOT LIKE '"+account+"%' AND " + query_cond = query_cond[:-5]+")" + + closed_cond="" + + if fiscalyear.state=='done': + closed_cond=" AND (aml.move_id NOT IN (SELECT account_move.id as move_id FROM account_move WHERE period_id IN "+str(period_query_cond)+" AND journal_id=(SELECT res_id FROM ir_model_data WHERE name='closing_journal' AND module='l10n_fr')) OR (aa.type != 'income' AND aa.type !='expense'))" + + query = "SELECT aa.code AS code, SUM(debit) as debit, SUM(credit) as credit FROM account_move_line aml LEFT JOIN account_account aa ON aa.id=aml.account_id WHERE "+query_cond+closed_cond+" AND aml.state='valid' AND aml.period_id IN "+str(period_query_cond)+" GROUP BY code" + + self.cr.execute(query) + + lines =self.cr.dictfetchall() + + for line in lines: + for account in accounts: + if(line["code"].startswith(account)): + operator=accounts[account][0] + type=accounts[account][1] + + value=0.0 + + if(type=="S"): + value=line["debit"]-line["credit"] + elif(type=="D"): + value=line["debit"]-line["credit"] + if(value<0.001): value=0.0 + elif(type=="C"): + value=line["credit"]-line["debit"] + if(value<0.001): value=0.0 + + if(operator=='+'): + sum+=value + else: + sum-=value + + break + + self._set_variable(code, sum) diff --git a/addons/l10n_fr/report/report_bilan.py b/addons/l10n_fr/report/report_bilan.py new file mode 100755 index 00000000000..290735e8ee7 --- /dev/null +++ b/addons/l10n_fr/report/report_bilan.py @@ -0,0 +1,36 @@ +############################################################################## +# +# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import base_report +from report import report_sxw + +class bilan(base_report.base_report): + def __init__(self, cr, uid, name, context): + super(bilan, self).__init__(cr, uid, name, context) + +report_sxw.report_sxw('report.l10n.fr.bilan', 'account.move.line','addons/l10n_fr/report/report_bilan.rml', parser=bilan, header=False) + diff --git a/addons/l10n_fr/report/report_bilan.rml b/addons/l10n_fr/report/report_bilan.rml new file mode 100755 index 00000000000..a462f61404e --- /dev/null +++ b/addons/l10n_fr/report/report_bilan.rml @@ -0,0 +1,3 @@ + +[[ _load('bilan',data['form'])]][[ _set_variable('at1a',bavar1+bavar2+bavar3+bavar4+bavar5+bavar6+bavar7+bavar8+bavar9+bavar10+bavar11+bavar12+bavar13+bavar14+bavar15+bavar16+bavar17+bavar18+bavar19+bavar20)]][[ _set_variable('at1b', bavar2b+bavar3b+bavar4b+bavar5b+bavar6b+bavar7b+bavar9b+bavar10b+bavar11b+bavar12b+bavar13b+bavar15b+ bavar16b+bavar17b+bavar18b+bavar19b+bavar20b)]][[ _set_variable('at1', at1a+at1b)]][[ _set_variable('at2a', bavar21+bavar22+bavar23+bavar24+bavar25+bavar26+bavar27+bavar28+bavar29+bavar30+bavar31+bavar32+bavar33)]][[ _set_variable('at2b', bavar21b+bavar22b+bavar23b+bavar24b+bavar26b+bavar27b+bavar29b+bavar30b)]][[ _set_variable('at2', at2a+at2b)]][[ _set_variable('actif', at1+at2+bavar34+bavar35+bavar36)]][[ _set_variable('pt1', bpvar1+bpvar2+bpvar3+bpvar4+bpvar5+bpvar6+bpvar7+bpvar8+bpvar9+bpvar10+bpvar11+bpvar12)]][[ _set_variable('pt2', bpvar13+bpvar14)]][[ _set_variable('pt3', bpvar15+bpvar16+bpvar17+bpvar18+bpvar19+bpvar20+bpvar21+bpvar22+bpvar23+bpvar24+bpvar25)]][[ _set_variable('passif', pt1+pt2+pt3+bpvar26)]][[ company.name ]]au [[ time.strftime('%d-%m-%Y',time.strptime(date_stop,'%Y-%m-%d'))]]BilanImprimé le : [[ time.strftime('%d-%m-%Y') ]] Tenue de Compte : [[ company.currency_id.name ]]ACTIF BrutAmortissements et dépréciationsNetCapital souscrit - non appelé[[bavar1]] [[bavar1]]ACTIF IMMOBILISÉ IMMOBILISATIONS INCORPORELLES Frais d'établissement[[bavar2]][[-bavar2b]][[bavar2+bavar2b]]Frais de recherche et de développement[[bavar3]][[-bavar3b]][[bavar3+bavar3b]]Concessions, brevets, licences,..., droits et valeurs similaires[[bavar4]][[-bavar4b]][[bavar4+bavar4b]]Fonds commercial[[bavar5]][[-bavar5b]][[bavar5+bavar5b]]Autres[[bavar6]][[-bavar6b]][[bavar6+bavar6b]]Immobilisations incorporelles en cours[[bavar7]][[-bavar7b]][[bavar7+bavar7b]]Avances et acomptes[[bavar8]] [[bavar8]]IMMOBILISATIONS CORPORELLES Terrains[[bavar9]][[-bavar9b]][[bavar9+bavar9b]]Constructions[[bavar10]][[-bavar10b]][[bavar10+bavar10b]]Installations techniques,matériel et outillage[[bavar11]][[-bavar11b]][[bavar11+bavar11b]]Autres [[bavar12]][[-bavar12b]][[bavar12+bavar12b]]Immobilisations corporelles en cours[[bavar13]][[-bavar13b]][[bavar13+bavar13b]]Avances et acomptes[[bavar14]] [[bavar14]]IMMOBILISATIONS FINANCIÉRES Participations[[bavar15]][[-bavar15b]][[bavar15+bavar15b]]Créances rattachées à des participations[[bavar16]][[-bavar16b]][[bavar16+bavar16b]]Titres immobilisés de l'activité de portefeuille[[bavar17]][[-bavar17b]][[bavar17+bavar17b]]Autres titres immobilisés[[bavar18]][[-bavar18b]][[bavar18+bavar18b]]Prêts[[bavar19]][[-bavar19b]][[bavar19+bavar19b]]Autres[[bavar20]][[-bavar20b]][[bavar20+bavar20b]]TOTAL I[[at1a]][[-at1b]][[at1]]ACTIF CIRCULANT STOCK EN COURS Matières premières et autres approvisionnements[[bavar21]][[-bavar21b]][[bavar21+bavar21b]]En-cours de production [biens et services][[bavar22]][[-bavar22b]][[bavar22+bavar22b]]Produits intermédiaires et finis[[bavar23]][[-bavar23b]][[bavar23+bavar23b]]Marchandises[[bavar24]][[-bavar24b]][[bavar24+bavar24b]]Avances et acomptes versés sur commandes[[bavar25]] [[bavar25]]CRÉANCES Créances clients et comptes rattachés[[bavar26]][[-bavar26b]][[bavar26+bavar26b]]Autres[[bavar27]][[-bavar27b]][[bavar27+bavar27b]]Capital souscrit - appelé , non versé[[bavar28]] [[bavar28]]VALEURS MOBILIÈRES DE PLACEMENT Actions propres[[bavar29]][[-bavar29b]][[bavar29+bavar29b]]Autres titres[[bavar30]][[-bavar30b]][[bavar30+bavar30b]]Instruments de trésorerie[[bavar31]] [[bavar31]]Disponibilités[[bavar32]] [[bavar32]]Charges constatés d'avance[[bavar33]] [[bavar33]]TOTAL II[[at2a]][[-at2b]][[at2]]Charges à répartir sur plusieurs exercices ( III )[[bavar34]] [[bavar34]]Primes de remboursement des emprunts ( IV )[[bavar35]] [[bavar35]]Écarts de conversion actif ( V )[[bavar36]] [[bavar36]]TOTAL ACTIF ( I + II + III + IV + V )[[at1a+at2a]][[-at1b-at2b]][[actif]]PASSIFCAPITAUX PROPRES Capital [dont versé...][[bpvar1]]Primes d'émission, de fusion, d'apport[[bpvar2]]Écarts de réévaluation[[bpvar3]]Écart d'équivalence[[bpvar4]]RÉSERVES Réserve légale[[bpvar5]]Réserves statutaires ou contractuelles[[bpvar6]]Réserves réglementées[[bpvar7]]Autres réserves[[bpvar8]]Report à nouveau[[bpvar9]]RÉSULTAT DE L'EXERCICE [bénéfice ou perte][[bpvar10]]Subventions d'investissement[[bpvar11]]Provisions réglementées[[bpvar12]]TOTAL I[[pt1]]PROVISIONS Provisions pour risques[[bpvar13]]Provisions pour charges[[bpvar14]]TOTAL II[[pt2]]DETTES Emprunts obligataires convertibles[[bpvar15]]Autres emprunts obligataires[[bpvar16]]Emprunts et dettes auprès des établissements de crédit[[bpvar17]]Emprunts et dettes financières diverses[[bpvar18]]Avances et acomptes reçus sur commandes en cours[[bpvar19]]Dettes fournisseurs et comptes rattachés [[bpvar20]]Dettes fiscales et sociales[[bpvar21]]Dettes sur immobilisations et comptes rattachés[[bpvar22]]Autres dettes[[bpvar23]]Instruments de trésorerie[[bpvar24]]Produits constatés d'avance[[bpvar25]]TOTAL III[[pt3]]Écarts de conversion passif ( IV )[[bpvar26]]TOTAL GÉNÉRAL (I + II + III + IV)[[passif]]ACTIF - PASSIF[[round(actif-passif,2)]] [[ abs(bpcheck)<0.0001 and removeParentNode('para') ]] Attention, pour que votre bilan soit correct, vous devez solder les comptes 120 ou 129 (Résultat de l'exercice précédant) dans un compte de report à nouveau (compte 110 ou 119) ou dans le compte 108. Renseignez vous sur votre structure juridique et son fonctionnement comptable. + diff --git a/addons/l10n_fr/report/report_cdr.py b/addons/l10n_fr/report/report_cdr.py new file mode 100755 index 00000000000..ac884c1fabb --- /dev/null +++ b/addons/l10n_fr/report/report_cdr.py @@ -0,0 +1,36 @@ +############################################################################## +# +# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import base_report +from report import report_sxw + +class cdr(base_report.base_report): + def __init__(self, cr, uid, name, context): + super(cdr, self).__init__(cr, uid, name, context) + +report_sxw.report_sxw('report.l10n.fr.cdr', 'account.move.line','addons/l10n_fr/report/report_cdr.rml', parser=cdr, header=False) + diff --git a/addons/l10n_fr/report/report_cdr.rml b/addons/l10n_fr/report/report_cdr.rml new file mode 100755 index 00000000000..a311556c7d5 --- /dev/null +++ b/addons/l10n_fr/report/report_cdr.rml @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[[ _load('cdr',data['form'])]] +[[ _set_variable('ct1', cdrc1+cdrc2+cdrc3+cdrc4+cdrc5+cdrc6+cdrc7+cdrc8+cdrc9+cdrc10+cdrc11+cdrc12+cdrc13+cdrc14+cdrc15)]] +[[ _set_variable('ct3', cdrc17+cdrc18+cdrc19+cdrc20)]] +[[ _set_variable('ct4', cdrc21+cdrc22+cdrc23)]] +[[ _set_variable('charges', ct1+cdrc16+ct3+ct4+cdrc24+cdrc25)]] +[[ _set_variable('pta', cdrp1+cdrp2)]] +[[ _set_variable('ptb', cdrp3+cdrp4+cdrp5+cdrp6+cdrp7)]] +[[ _set_variable('pt1', pta+ptb)]] +[[ _set_variable('pt3', cdrp9+cdrp10+cdrp11+cdrp12+cdrp13+cdrp14)]] +[[ _set_variable('pt4', cdrp15+cdrp16+cdrp17)]] +[[ _set_variable('produits', pt1+cdrp8+pt3+pt4)]] + + + +[[ company.name ]] +période du [[ time.strftime('%d-%m-%Y',time.strptime(date_start,'%Y-%m-%d'))]] au [[ time.strftime('%d-%m-%Y',time.strptime(date_stop,'%Y-%m-%d'))]] + + +Compte de résultat + + +Imprimé le : [[ time.strftime('%d-%m-%Y') ]] + + + + + + + + + + + + + + +Tenue de Compte : [[ company.currency_id.name ]] + + + + + + + + + +CHARGES ( hors taxes ) + + + + + + + + + +CHARGES D'EXPLOITATION + + + + + + + + + +Achat de marchandises + + +[[ '%.2f' % cdrc1 ]] + + + + +Variation des stocks + + +[[cdrc2]] + + + + +Achats de matières premières et autres approvisionnements + + +[[cdrc3]] + + + + +Variation des stocks + + +[[cdrc4]] + + + + +Autres achats et charges externes + + +[[cdrc5]] + + + + +Redevances de crédit-bail mobilier + + +[[cdrc6]] + + + + +Redevances de crédit-bail immobilier + + +[[cdrc7]] + + + + +Impôts, taxes et versements assimilés + + +[[cdrc8]] + + + + +Salaires et traitements + + +[[cdrc9]] + + + + +Charges sociales + + +[[cdrc10]] + + + + +Dotation aux amortissements et aux dépréciations + + + + + + + + + +Sur immobilisations : dotations aux amortissements + + +[[cdrc11]] + + + + +Sur immobilisations : dotations aux dépréciations + + +[[cdrc12]] + + + + +Sur actif circulant : dotations aux dépréciations + + +[[cdrc13]] + + + + +Dotations aux provisions + + +[[cdrc14]] + + + + +Autres charges + + +[[cdrc15]] + + + + +TOTAL I + + +[[ct1]] + + + + +Quotes-parts de résultat sur opérations faites en commun ( II ) + + +[[cdrc16]] + + + + +CHARGES FINANCIÈRES + + + + + + + + + +Dotations aux amortissements, aux dépréciations et aux provisions + + +[[cdrc17]] + + + + +Intérêts et charges assimilées + + +[[cdrc18]] + + + + +Différences négatives de change + + +[[cdrc19]] + + + + +Charges nettes sur cessions de valeurs mobilières de placement + + +[[cdrc20]] + + + + +TOTAL III + + +[[ct3]] + + + + +CHARGES EXCEPTIONNELLES + + + + + + + + + +Sur opérations de gestion + + +[[cdrc21]] + + + + +Sur opérations en capital + + +[[cdrc22]] + + + + +Dotations aux amortissements, aux dépréciations et aux provisions + + +[[cdrc23]] + + + + +TOTAL IV + + +[[ct4]] + + + + +Participation des salariés aux résultats ( V ) + + + +[[cdrc24]] + + + + +Impôts sur les bénéfices ( VI ) + + + +[[cdrc25]] + + + + +TOTAL CHARGES ( I + II + III + IV+ V+ VI ) + + +[[charges]] + + + + + + + + + + + + + + + + +PRODUITS (hors taxes) + + + + + + + + + +PRODUITS D'EXPLOITATION + + + + + + + + + +Vente de marchandises + + +[[cdrp1]] + + + + +Production vendue [biens et services] + + +[[cdrp2]] + + + + +Sous-total A - Montant net du chiffre d'affaires + + +[[pta]] + + + + +Production stockée + + +[[cdrp3]] + + + + +Production immobilisée + + +[[cdrp4]] + + + + +Subventions d'exploitation + + +[[cdrp5]] + + + + +Reprises sur provisions, dépréciations (et amortissements) et transferts de charges + + +[[cdrp6]] + + + + +Autres produits + + +[[cdrp7]] + + + + +Sous-total B + + +[[ptb]] + + + + +TOTAL I ( A + B ) + + +[[pt1]] + + + + +Quotes-parts de résultat sur opérations faites en commun (II) + + +[[cdrp8]] + + + + +PRODUITS FINANCIERS + + + + + + + + + +De participation + + +[[cdrp9]] + + + + +D'autres valeurs mobilières et créances de l'actif immobilisé + + +[[cdrp10]] + + + + +Autres intérêts et produits assimilés + + +[[cdrp11]] + + + + +Reprises sur provisions, dépréciations et transferts de charges + + +[[cdrp12]] + + + + +Différences positives de change + + +[[cdrp13]] + + + + +Produits nets sur cessions de valeurs mobilières de placement + + +[[cdrp14]] + + + + +TOTAL III + + +[[pt3]] + + + + +PRODUITS EXCEPTIONNELS + + + + + + + + + +Sur opérations de gestion + + +[[cdrp15]] + + + + +Sur opérations en capital + + +[[cdrp16]] + + + + +Reprises sur provisions, dépréciations et transferts de charges + + +[[cdrp17]] + + + + +TOTAL IV + + +[[pt4]] + + + + +TOTAL DES PRODUITS ( I + II + III + IV ) + + +[[produits]] + + + + +PRODUITS - CHARGES + + +[[produits-charges]] + + + + + + + + + diff --git a/addons/l10n_fr/wizard/__init__.py b/addons/l10n_fr/wizard/__init__.py index 6d5ce39192d..baef99be2ee 100644 --- a/addons/l10n_fr/wizard/__init__.py +++ b/addons/l10n_fr/wizard/__init__.py @@ -21,6 +21,8 @@ ############################################################################## import wizard_chart_report +import wizard_bilan +import wizard_cdr # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_fr/wizard/wizard_bilan.py b/addons/l10n_fr/wizard/wizard_bilan.py new file mode 100755 index 00000000000..cec3bd9add4 --- /dev/null +++ b/addons/l10n_fr/wizard/wizard_bilan.py @@ -0,0 +1,57 @@ +############################################################################## +# +# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import wizard +import pooler + +dates_form = ''' +
+ +''' + +dates_fields = { + 'fiscalyear': {'string': 'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear', 'required': True} +} + +class wizard_report(wizard.interface): + def _get_defaults(self, cr, uid, data, context): + fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear') + data['form']['fiscalyear'] =fiscalyear_obj.find(cr, uid) + return data['form'] + + states = { + 'init': { + 'actions': [_get_defaults], + 'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel'),('report','Print')]} + }, + 'report': { + 'actions': [], + 'result': {'type':'print', 'report':'l10n.fr.bilan', 'state':'end'} + } + } +wizard_report('l10n.fr.bilan.report') + diff --git a/addons/l10n_fr/wizard/wizard_cdr.py b/addons/l10n_fr/wizard/wizard_cdr.py new file mode 100755 index 00000000000..4ccfa908414 --- /dev/null +++ b/addons/l10n_fr/wizard/wizard_cdr.py @@ -0,0 +1,57 @@ +############################################################################## +# +# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import wizard +import pooler + +dates_form = ''' +
+ +''' + +dates_fields = { + 'fiscalyear': {'string': 'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear', 'required': True} +} + +class wizard_report(wizard.interface): + def _get_defaults(self, cr, uid, data, context): + fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear') + data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid) + return data['form'] + + states = { + 'init': { + 'actions': [_get_defaults], + 'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel'),('report','Print')]} + }, + 'report': { + 'actions': [], + 'result': {'type':'print', 'report':'l10n.fr.cdr', 'state':'end'} + } + } +wizard_report('l10n.fr.cdr.report') +