diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index b0ef5bc6641..c170076cfc8 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -119,7 +119,7 @@ module named account_voucher. 'project/project_demo.xml', 'project/analytic_account_demo.xml', 'demo/account_minimal.xml', - #'account_unit_test.xml', +# 'account_unit_test.xml', ], 'test': [ 'test/account_customer_invoice.yml', diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index aaabc86d865..41da96bdd98 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -77,6 +77,7 @@ account.fiscalyear form tree,form,search + Define your company's fiscal year depending on the period you have chosen to follow. A fiscal year is a 1 year period over which a company budgets its spending. It may run over any period of 12 months. The fiscal year is referred to by the date in which it ends. For example, if a company's fiscal year ends November 30, 2011, then everything between December 1, 2010 and November 30, 2011 would be referred to as FY 2011. Not using the actual calendar year gives many companies an advantage, allowing them to close their books at a time which is most convenient for them. @@ -144,6 +145,7 @@ form tree,form,search {'search_default_draft': 1} + Here, you can define a period, an interval of time between successive closings of the books of your company. An accounting period typically is a month or a quarter, corresponding to the tax year used by the business. Create and manage them from here and decide whether a period should be left open or closed depending on your company's activities over a specific period. @@ -254,6 +256,7 @@ tree,form,graph + Create and manage accounts you will need to record financial entries in. Accounts are financial records of your company that register all financial transactions. Companies present their annual accounts in two main parts: the balance sheet and the income statement (profit and loss account). The annual accounts of a company are required by law to disclose a certain amount of information. They have to be certified by an external auditor yearly. @@ -351,6 +354,7 @@ form tree,form + Here you can personalize and create each view of your financial journals by selecting the fields you want to appear and the sequence they will appear. @@ -463,6 +467,7 @@ account.journal form tree,form + Create and manage your company's financial journals from this menu. A journal is a business diary in which all financial data related to the day to day business transactions of your company is recorded using double-entry book keeping system. Depending on the nature of its activities and number of daily transactions, a company may keep several types of specialized journals such as a cash journal, purchases journal, and sales journal. @@ -742,6 +747,7 @@ form tree,form + An account type is a name or code given to an account that indicates its purpose. For example, the account type could be linked to an asset account, expense account or payable account. From this view, you can create and manage the account types you need to be used for your company management. - - - - - - - - - - - [[ company.name ]] - Tax Report - - - - [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]] - Page - - - - - 1cm 27.7cm 20cm 27.7cm - - - - + diff --git a/addons/account/report/account_voucher_print.py b/addons/account/report/account_voucher_print.py index 44587b3e689..912e0794a9c 100644 --- a/addons/account/report/account_voucher_print.py +++ b/addons/account/report/account_voucher_print.py @@ -6,22 +6,21 @@ # $Id$ # # 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 +# 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 General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ############################################################################## import time - from report import report_sxw from tools import amount_to_text_en diff --git a/addons/account/report/rml_parse.py b/addons/account/report/rml_parse.py deleted file mode 100644 index cf33d1c6ae0..00000000000 --- a/addons/account/report/rml_parse.py +++ /dev/null @@ -1,148 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - -import time - -import re -import sys - -from report import report_sxw - -class rml_parse(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(rml_parse, self).__init__(cr, uid, name, context=context) - self.localcontext.update({ - 'comma_me': self.comma_me, - 'format_date': self._get_and_change_date_format_for_swiss, - 'strip_name': self._strip_name, - 'explode_name': self._explode_name, - }) - - def comma_me(self,amount): - #print "#" + str(amount) + "#" - if not amount: - amount = 0.0 - if type(amount) is float: - amount = str('%.2f'%amount) - else: - amount = str(amount) - if (amount == '0'): - return ' ' - orig = amount - new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) - if orig == new: - return new - else: - return self.comma_me(new) - def _ellipsis(self, string, maxlen=100, ellipsis = '...'): - ellipsis = ellipsis or '' - try: - return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen] - except: - return False - def _strip_name(self, name, maxlen=50): - return self._ellipsis(name, maxlen, '...') - - def _get_and_change_date_format_for_swiss(self,date_to_format): - date_formatted='' - if date_to_format: - date_formatted = strptime(date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y') - return date_formatted - - def _explode_name(self,chaine,length): - # We will test if the size is less then account - full_string = '' - if (len(str(chaine)) <= length): - return chaine - # - else: - chaine = unicode(chaine,'utf8').encode('iso-8859-1') - rup = 0 - for carac in chaine: - rup = rup + 1 - if rup == length: - full_string = full_string + '\n' - full_string = full_string + carac - rup = 0 - else: - full_string = full_string + carac - - return full_string - - def makeAscii(self,str): - try: - Stringer = str.encode("utf-8") - except UnicodeDecodeError: - try: - Stringer = str.encode("utf-16") - except UnicodeDecodeError: - print "UTF_16 Error" - Stringer = str - else: - return Stringer - else: - return Stringer - return Stringer - def explode_this(self,chaine,length): - chaine = chaine.rstrip() - ast = list(chaine) - i = length - while i <= len(ast): - ast.insert(i,'\n') - i = i + length - chaine = str("".join(ast)) - return chaine - def repair_string(self, chaine): - ast = list(chaine) - UnicodeAst = [] - i = 0 - while i < len(ast): - elem = ast[i] - try: - elem.encode("utf-8") - except UnicodeDecodeError: - to_reencode = elem + ast[i+1] - print str(to_reencode) - Good_char = to_reencode.decode('utf-8') - UnicodeAst.append(Good_char) - i += i +2 - else: - UnicodeAst.append(elem) - i += i + 1 - - - return "".join(UnicodeAst) - - def ReencodeAscii(self,str): - print sys.stdin.encoding - try: - Stringer = str.decode("ascii") - except UnicodeEncodeError: - print "REENCODING ERROR" - return str.encode("ascii") - except UnicodeDecodeError: - print "DECODING ERROR" - return str.encode("ascii") - - else: - return Stringer - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 9fcd976a235..0e0ddfb3e99 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -16,7 +16,7 @@ - !python {model: account.invoice}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('test_invoice_1')], {}, {}) + (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.account_invoice_customer0')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data) @@ -38,41 +38,6 @@ if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data) -- - Demo data for Account tax code -- - !record {model: account.tax.code, id: account_tax_code_0}: - name : Tax Code Test - sign : 10.00 -- - Print Tax Code entries report -- - !python {model: account.tax.code}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref('account_tax_code_0')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data) - - -- - Print Vat Declaration Report -- - !python {model: account.tax.code}: | - import netsvc, tools, os - data_dict = {'model': 'ir.ui.menu', 'form': {'based_on': 'invoices','company_id':ref('base.main_company'),'periods':[]}} - (data, format) = netsvc.LocalService('report.account.vat.declaration').create(cr, uid, [ref("account_move_0")], data_dict, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-vat-declaration.'+format), 'wb+').write(data) - -- - In order to test the PDF reports defined on an invoice, we will print an invoice -- - !python {model: account.invoice}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('test_invoice_1')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data) - - Print the Aged Partner Balance Report - diff --git a/addons/account/test/account_use_model.yml b/addons/account/test/account_use_model.yml index 4eb03a13026..ddb18c1a7d4 100644 --- a/addons/account/test/account_use_model.yml +++ b/addons/account/test/account_use_model.yml @@ -10,6 +10,7 @@ name: test1 sequence: 0.0 quantity: 0.0 + partner_id: base.res_partner_3 name: My Test Model - diff --git a/addons/account/wizard/account_report_aged_partner_balance_view.xml b/addons/account/wizard/account_report_aged_partner_balance_view.xml index ad9c90b2e36..aea2fba2528 100644 --- a/addons/account/wizard/account_report_aged_partner_balance_view.xml +++ b/addons/account/wizard/account_report_aged_partner_balance_view.xml @@ -9,6 +9,9 @@
+ +