diff --git a/addons/account/account.py b/addons/account/account.py index 5de913c45a7..8ef5004df04 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1215,7 +1215,8 @@ class account_move(osv.osv): # # TODO: Check if period is closed ! # - def create(self, cr, uid, vals, context={}): + def create(self, cr, uid, vals, context=None): + context = context or {} if 'line_id' in vals and context.get('copy'): for l in vals['line_id']: if not l[0]: @@ -1256,6 +1257,7 @@ class account_move(osv.osv): return result def copy(self, cr, uid, id, default={}, context={}): + context = context or {} default.update({ 'state':'draft', 'name':'/', @@ -1265,7 +1267,8 @@ class account_move(osv.osv): }) return super(account_move, self).copy(cr, uid, id, default, context) - def unlink(self, cr, uid, ids, context={}, check=True): + def unlink(self, cr, uid, ids, context=None, check=True): + context = context or {} toremove = [] obj_move_line = self.pool.get('account.move.line') for move in self.browse(cr, uid, ids, context): @@ -1605,7 +1608,7 @@ class account_tax_code(osv.osv): if isinstance(ids, (int, long)): ids = [ids] reads = self.read(cr, uid, ids, ['name','code'], context, load='_classic_write') - return [(x['id'], (x['code'] and x['code'] + ' - ' or '') + x['name']) \ + return [(x['id'], (x['code'] and (x['code'] + ' - ') or '') + x['name']) \ for x in reads] def _default_company(self, cr, uid, context={}): @@ -2544,9 +2547,17 @@ class wizard_multi_charts_accounts(osv.osv_memory): if ids: return ids[0] return False + + def _get_default_accounts(self, cr, uid, context=None): + accounts = [{'acc_name':'Current','account_type':'bank'}, + {'acc_name':'Deposit','account_type':'bank'}, + {'acc_name':'Cash','account_type':'cash'}] + return accounts + _defaults = { 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, [uid], c)[0].company_id.id, 'chart_template_id': _get_chart, + 'bank_accounts_id': _get_default_accounts, 'code_digits': 6, 'seq_journal': True } diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index a982ca51182..f3c2b71122f 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -24,8 +24,6 @@ import time from osv import fields from osv import osv from tools.translate import _ -import tools -from tools import config class account_analytic_line(osv.osv): _inherit = 'account.analytic.line' @@ -82,12 +80,13 @@ class account_analytic_line(osv.osv): return {} product_obj = self.pool.get('product.product') analytic_journal_obj =self.pool.get('account.analytic.journal') + company_obj = self.pool.get('res.company') + product_price_type_obj = self.pool.get('product.price.type') j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context) prod = product_obj.browse(cr, uid, prod_id) if not company_id: company_id = j_id.company_id.id result = 0.0 - is_purchase = False if j_id.type <> 'sale': a = prod.product_tmpl_id.property_account_expense.id @@ -99,8 +98,6 @@ class account_analytic_line(osv.osv): 'for this product: "%s" (id:%d)') % \ (prod.name, prod.id,)) amount_unit = prod.price_get('standard_price', context)[prod.id] - is_purchase = True - else: a = prod.product_tmpl_id.property_account_income.id if not a: @@ -128,9 +125,8 @@ class account_analytic_line(osv.osv): if pricetype.field == 'list_price': flag = True amount_unit = prod.price_get(pricetype.field, context)[prod.id] - amount = amount_unit*unit_amount or 1.0 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') - amount = amount_unit*unit_amount or 1.0 + amount = amount_unit*unit or 1.0 result = round(amount, prec) if not flag: result *= -1 diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 0b240663943..cf50a1ab62e 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -378,7 +378,7 @@ class account_bank_statement(osv.osv): self.create_move_from_st_line(cr, uid, st_line.id, company_currency_id, st_line_number, context) self.write(cr, uid, [st.id], {'name': st_number}, context=context) - self.log(cr, uid, st.id, 'Statement %s is confirmed and entries are created.' % st_number) + self.log(cr, uid, st.id, _('Statement %s is confirmed, journal items are created.') % (st_number,)) done.append(st.id) return self.write(cr, uid, ids, {'state':'confirm'}, context=context) @@ -501,4 +501,4 @@ class account_bank_statement_line(osv.osv): account_bank_statement_line() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 76efc00c1df..4d4b0a3022f 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -430,7 +430,7 @@ [('type','=','out_invoice')] {'type':'out_invoice', 'journal_type': 'sale'} - Most of customer invoices are automatically generated in draft mode by OpenERP flows, following a purchase order for instance. Review, confirm or cancel, pay or refund your customers' invoices here. A manual invoice can be created here. + Customer Invoices allows you create and manage invoices issued to your customers. OpenERP generates draft of invoices automatically so that you only have to confirm them before sending them to your customers. @@ -458,7 +458,7 @@ [('type','=','in_invoice')] {'type':'in_invoice', 'journal_type': 'purchase'} - Proposal for supplier invoices are usually automatically generate by OpenERP, following a procurement order or a production order for instance. To consult and to check for, or to manually create a customer invoice, use this menu. You can review, confirm or cancel, pay or refund an invoice from the view from of the invoices. + Supplier Invoices allows you to enter and manage invoices issued by your suppliers. OpenERP generates draft of supplier invoices automatically so that you can control what you received from your supplier according to what you purchased or received. @@ -471,7 +471,7 @@ [('type','=','out_refund')] {'type':'out_refund', 'journal_type': 'sale_refund'} - A customer refund is a credit note to your customer that cancel invoice or a part of it. + Customer Refunds helps you manage the credit notes issued/to be issued for your customers. A refund invoice is a document that cancels an invoice or a part of it. You can easily generate refunds and reconcile them from the invoice form. @@ -510,22 +510,5 @@ res_model="account.invoice" src_model="account.journal"/> - - - - diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 49de367122b..8217522715e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -635,6 +635,7 @@ [('journal_id.type', '=', 'bank')] {'journal_type':'bank'} + A bank statement is a summary of all financial transactions occurring over a given period of time on a deposit account, a credit card, or any other type of account. Start by encoding the starting and closing balance, then record all lines of your statement. When you are in the Payment column of the a line, you can press F1 to open the reconciliation form. @@ -956,7 +957,7 @@ [('parent_id','=',False)] tree - Chart of Taxes is a tree view reflecting the structure of the Tax Cases (or tax codes) and shows the current tax situation. The tax chart represents the amount of each area of the tax declaration for your country. It’s presented in a hierarchical structure, which can be modified to fit your needs. + The chart of taxes is used to generate your periodic tax statement. You will see here the taxes with codes related to your legal statement according to your country. diff --git a/addons/account/i18n/mn.po b/addons/account/i18n/mn.po index 7c955886d37..ea1d2cfeba4 100644 --- a/addons/account/i18n/mn.po +++ b/addons/account/i18n/mn.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-10-15 03:35+0000\n" -"Last-Translator: sugi \n" +"PO-Revision-Date: 2010-10-17 07:44+0000\n" +"Last-Translator: OpenERP Administrators \n" "Language-Team: Mongolian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-10-15 04:42+0000\n" +"X-Launchpad-Export-Date: 2010-10-18 04:55+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -647,7 +647,7 @@ msgstr "Харилцагчийн төлбөрийн нөхцөл" #. module: account #: view:account.move.reconcile:0 msgid "Account Entry Reconcile" -msgstr "Дансны бичилт гүйцээлт" +msgstr "Дансны бичилт бууралт" #. module: account #: wizard_button:account.move.bank.reconcile,init,open:0 @@ -3119,7 +3119,7 @@ msgstr "Аналитик Журнал" #. module: account #: rml:account.general.ledger:0 msgid "Entry Label" -msgstr "Бичлэгийн нэр" +msgstr "Гүйлгээний нэр" #. module: account #: model:process.transition,note:account.process_transition_paymentreconcile0 @@ -3498,7 +3498,9 @@ msgstr "Өдрийн огноо" msgid "" "The amount expressed in an optional other currency if it is a multi-currency " "entry." -msgstr "Өөр валютаар илэрхийлсэн дүн байна" +msgstr "" +"Хэрэв энэ гүйлгээ гадаад валютаар хийгдсэн бол гүйлгээний дүнг гадаад " +"валютаар илэрхийлнэ." #. module: account #: field:account.tax,parent_id:0 @@ -3599,7 +3601,7 @@ msgstr "Шинэ нийлүүлэгчийн буцаалт" #. module: account #: view:account.model:0 msgid "Entry Model" -msgstr "Гүйлгээний модель" +msgstr "Гүйлгээний загвар" #. module: account #: wizard_field:account.general.ledger.report,checktype,amount_currency:0 @@ -3764,7 +3766,7 @@ msgstr "Биелэх огноо" #. module: account #: view:account.subscription:0 msgid "Entry Subscription" -msgstr "захиалгын бичилт" +msgstr "Гүйлгээний тэмдэглэл" #. module: account #: selection:account.print.journal.report,init,sort_selection:0 @@ -4126,6 +4128,8 @@ msgid "" "You can check this box to mark the entry line as a litigation with the " "associated partner" msgstr "" +"Журналын бичилт нь холбогдох харилцагчийн хувьд маргаантай гэж үзвэл энэ " +"нүдийг сонгох хэрэгтэй" #. module: account #: model:ir.actions.act_window,name:account.action_invoice_tree1 @@ -4478,7 +4482,7 @@ msgstr "Санхүүгийн жилийн дарааллууд" #. module: account #: view:account.model.line:0 msgid "Entry Model Line" -msgstr "Бүртгэл загвар шугам" +msgstr "Гүйлгээний загварын мөр" #. module: account #: view:account.tax.template:0 @@ -4542,7 +4546,7 @@ msgstr "Дансны бичилт" #. module: account #: model:ir.actions.act_window,name:account.act_account_partner_account_move_unreconciled msgid "Receivables & Payables" -msgstr "Авлагын данс болон төлбөр" +msgstr "Авлага & Өглөг" #. module: account #: rml:account.general.ledger:0 @@ -4625,7 +4629,7 @@ msgstr "Нийлүүлэгчийн санхүү бүртгэл" #. module: account #: view:account.analytic.account:0 msgid "Analytic Account Statistics" -msgstr "" +msgstr "Аналитик санхүүгийн статистик" #. module: account #: view:wizard.multi.charts.accounts:0 @@ -4657,7 +4661,7 @@ msgstr "Аналитик дансны мод" #. module: account #: wizard_field:account.aged.trial.balance,init,result_selection:0 msgid "Filter on Partners" -msgstr "" +msgstr "Харилцагч дээр шүүлт хийх" #. module: account #: field:account.tax,price_include:0 @@ -4837,7 +4841,7 @@ msgstr "А/к дугаар" #: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree_month #: model:ir.ui.menu,name:account.report_account_analytic_journal_print_month msgid "Account cost and revenue by journal (This Month)" -msgstr "" +msgstr "Дансны өртөг, орлого журналаар" #. module: account #: selection:account.partner.balance.report,init,result_selection:0 @@ -5036,7 +5040,7 @@ msgstr "Татварын тайлбар" #. module: account #: help:account.invoice,move_id:0 msgid "Link to the automatically generated account moves." -msgstr "" +msgstr "Дансны автомат үүссэн шилжилтүүд рүү холбох" #. module: account #: wizard_field:account.automatic.reconcile,reconcile,reconciled:0 @@ -5058,7 +5062,7 @@ msgstr "/" #: model:process.node,note:account.process_node_invoiceinvoice0 #: model:process.node,note:account.process_node_supplierinvoiceinvoice0 msgid "Have a number and entries are generated" -msgstr "" +msgstr "Үүсгэгдсэн тоо болон бичлэгүүдийг агуулж байна" #. module: account #: rml:account.analytic.account.analytic.check:0 @@ -5094,7 +5098,7 @@ msgstr "Журналын бүтэц" #. module: account #: view:account.subscription.line:0 msgid "Subscription lines" -msgstr "" +msgstr "Бүртгэлийн мөрүүд" #. module: account #: field:account.chart.template,property_account_income:0 @@ -5276,9 +5280,7 @@ msgstr "Томьёолол" #. module: account #: help:account.move.line,currency_id:0 msgid "The optional other currency if it is a multi-currency entry." -msgstr "" -"Тухайн дансны валютаас өөр валютаар бичилт хийх үед хэрэглэгдэх валютын " -"төрөл." +msgstr "Гадаад валютын гүйлгээ бол валютыг сонгоно." #. module: account #: view:account.invoice:0 @@ -5368,7 +5370,7 @@ msgstr "PRO-FORMA" #. module: account #: field:account.move.reconcile,line_partial_ids:0 msgid "Partial Entry lines" -msgstr "" +msgstr "Хэсэгчилсэн журналын бичилт" #. module: account #: help:account.move.line,statement_id:0 @@ -5425,7 +5427,7 @@ msgstr "Төлөлтийн нөхцөл" #. module: account #: selection:account.aged.trial.balance,init,result_selection:0 msgid "Receivable and Payable" -msgstr "" +msgstr "Авлага болон өглөг" #. module: account #: rml:account.account.balance:0 @@ -5528,7 +5530,7 @@ msgstr "Ерөнхий журнал" #: rml:account.third_party_ledger:0 #: rml:account.third_party_ledger_other:0 msgid "Balance" -msgstr "Тэнцэл" +msgstr "Баланс" #. module: account #: rml:account.invoice:0 @@ -5899,7 +5901,7 @@ msgstr "Бичилт тулгах" #. module: account #: field:account.subscription.line,move_id:0 msgid "Entry" -msgstr "Бичилт" +msgstr "Ажил гүйлгээ" #. module: account #: model:process.node,note:account.process_node_paidinvoice0 @@ -6044,7 +6046,7 @@ msgstr "Хэрэглэгч уг дансны гүйлгээг банкны ху #. module: account #: wizard_button:account.subscription.generate,init,generate:0 msgid "Compute Entry Dates" -msgstr "" +msgstr "Гүйлгээний огноо тооцоолол" #. module: account #: view:board.board:0 @@ -6077,7 +6079,7 @@ msgstr "Үнийн нэхэмжлэл" #. module: account #: view:board.board:0 msgid "Aged receivables" -msgstr "Насжилтын авлагын данс" +msgstr "Авлагын насжилт" #. module: account #: model:ir.module.module,shortdesc:account.module_meta_information @@ -6326,7 +6328,7 @@ msgstr "Дансны төрлөөр" #. module: account #: model:ir.model,name:report_account.model_report_aged_receivable msgid "Aged Receivable Till Today" -msgstr "" +msgstr "Өнөөдрийг хүртэлх авлагын насжилт" #. module: account #: model:ir.model,name:report_account.model_report_account_receivable @@ -6368,7 +6370,7 @@ msgstr "Үүсгэх огноо" #: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph #: view:report.aged.receivable:0 msgid "Aged Receivable" -msgstr "Насжилтын авлага" +msgstr "Авлагын насжилт" #. module: account #: view:report.invoice.created:0 diff --git a/addons/account/installer.py b/addons/account/installer.py index b85b2dc21e2..b689697d7a8 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -604,8 +604,7 @@ class account_installer(osv.osv_memory): new_paid_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals_paid_tax_code) sales_tax = obj_tax.create(cr, uid, - {'name':'TAX%s%%'%(s_tax*100), - 'description':'TAX%s%%'%(s_tax*100), + {'name':'TAX %s%%'%(s_tax*100), 'amount':s_tax, 'base_code_id':new_tax_code, 'tax_code_id':new_paid_tax_code, @@ -640,8 +639,7 @@ class account_installer(osv.osv_memory): new_paid_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals_paid_tax_code) purchase_tax = obj_tax.create(cr, uid, - {'name':'TAX%s%%'%(p_tax*100), - 'description':'TAX%s%%'%(p_tax*100), + {'name':'TAX %s%%'%(p_tax*100), 'amount':p_tax, 'base_code_id':new_tax_code, 'tax_code_id':new_paid_tax_code, diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 806d73bb5e1..ab9b90d7361 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -351,7 +351,7 @@ class account_invoice(osv.osv): if view_type == 'tree': doc = etree.XML(res['arch']) nodes = doc.xpath("//field[@name='partner_id']") - partner_string = 'Customer' + partner_string = _('Customer') if context.get('type', 'out_invoice') in ('in_invoice', 'in_refund'): partner_string = _('Supplier') for node in nodes: @@ -363,7 +363,7 @@ class account_invoice(osv.osv): try: res = super(account_invoice, self).create(cr, uid, vals, context) for inv_id, name in self.name_get(cr, uid, [res], context=context): - message = _('Invoice ') + " '" + name + "' "+ _("is waiting for validation.") + message = _("Invoice '%s' is waiting for validation.") % name self.log(cr, uid, inv_id, message) return res except Exception, e: @@ -375,6 +375,9 @@ class account_invoice(osv.osv): def confirm_paid(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'paid'}, context=context) + for inv_id, name in self.name_get(cr, uid, ids, context=context): + message = _("Invoice '%s' is paid.") % name + self.log(cr, uid, inv_id, message) return True def unlink(self, cr, uid, ids, context=None): @@ -666,7 +669,7 @@ class account_invoice(osv.osv): return (ref or '').replace('/','') def _get_analytic_lines(self, cr, uid, id): - inv = self.browse(cr, uid, [id])[0] + inv = self.browse(cr, uid, id) cur_obj = self.pool.get('res.currency') company_currency = inv.company_id.currency_id.id @@ -682,6 +685,8 @@ class account_invoice(osv.osv): ref = inv.reference else: ref = self._convert_ref(cr, uid, inv.number) + if not inv.journal_id.analytic_journal_id: + raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,)) il['analytic_lines'] = [(0,0, { 'name': il['name'], 'date': inv['date_invoice'], @@ -691,7 +696,7 @@ class account_invoice(osv.osv): 'product_id': il['product_id'], 'product_uom_id': il['uos_id'], 'general_account_id': il['account_id'], - 'journal_id': self._get_journal_analytic(cr, uid, inv.type), + 'journal_id': inv.journal_id.analytic_journal_id.id, 'ref': ref, })] return iml @@ -1210,12 +1215,13 @@ class account_invoice(osv.osv): inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0] if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id: - self.log(cr, uid, inv_id, _('Invoice ') + " '" + name + "' "+ _("is totally paid.")) self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context) else: code = invoice.currency_id.code - amt = str(pay_amount) + code + ' on ' + str(invoice.amount_total) + code + ' (' + str(total) + code + ' remaining)' - self.log(cr, uid, inv_id, _('Invoice ') + " '" + name + "' "+ _("is paid partially: ") + amt) + # TODO: use currency's formatting function + msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)") % \ + (name, pay_amount, code, invoice.amount_total, code, total, code) + self.log(cr, uid, inv_id, msg) self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context) # Update the stored value (fields.function), so we write to trigger recompute @@ -1281,14 +1287,6 @@ class account_invoice_line(osv.osv): 'price_unit': _price_unit_default, } - def product_id_change_unit_price_inv(self, cr, uid, tax_id, price_unit, qty, address_invoice_id, product, partner_id, context=None): - tax_obj = self.pool.get('account.tax') - if price_unit: - taxes = tax_obj.browse(cr, uid, tax_id) - for tax in tax_obj.compute_inv(cr, uid, taxes, price_unit, qty, address_invoice_id, product, partner_id): - price_unit = price_unit - tax['amount'] - return {'price_unit': price_unit,'invoice_line_tax_id': tax_id} - def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} @@ -1353,7 +1351,7 @@ class account_invoice_line(osv.osv): else: app_acc_in = in_acc_cate app_acc_exp = ex_acc_cate - if app_acc_in.company_id.id != company_id and app_acc_exp.company_id.id != company_id: + if app_acc_in and app_acc_in.company_id.id != company_id and app_acc_exp and app_acc_exp.company_id.id != company_id: in_res_id = account_obj.search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)]) exp_res_id = account_obj.search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)]) if not in_res_id and not exp_res_id: @@ -1388,8 +1386,7 @@ class account_invoice_line(osv.osv): taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False) tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes) if type in ('in_invoice', 'in_refund'): - to_update = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit or res.standard_price, qty, address_invoice_id, product, partner_id, context=context) - result.update(to_update) + result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} ) else: result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id}) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 6795ae6a0f8..9a482155b4f 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -129,7 +129,7 @@ tree [('parent_id','=',False)] - Analytic Charts of Accounts allows you to access to reports by analytic accounts (or cost accounts) . From this menu you can access to analytic balance, a report that relates the analytic accounts to the general accounts. It is useful for analyzing the profitability of projects, giving you the profitability of a project for the different operations that you used to carry out the project. + The normal chart of accounts has a structure defined by the legal requirement of the country. The analytic chart of account structure should reflect your own business needs in term of costs/revenues reporting. They are usually structured by contracts, projects, products or departements. Most of the OpenERP operations (invoices, timesheets, expenses, etc) generate analytic entries on the related account. diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml index fdf044c048e..f41302408c5 100644 --- a/addons/account/report/account_general_journal.rml +++ b/addons/account/report/account_general_journal.rml @@ -287,7 +287,7 @@ Currency - Total:([[ company.currency_id.code]]) + Total: [[ formatLang(sum_debit()) ]] [[ formatLang( sum_credit()) ]] diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index 324cf378177..75dc04c507b 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -266,10 +266,10 @@ [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - [[ formatLang(sum_debit_account(o), dp='Account') ]] - [[ formatLang(sum_credit_account(o), dp='Account') ]] - [[ formatLang(sum_balance_account(o), dp='Account') ]] [[ company.currency_id.symbol ]] - [[ o.currency_id and formatLang(sum_currency_amount_account(o), dp='Account') + o.currency_id.code or '' ]] + [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] + [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] + [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]] @@ -292,9 +292,9 @@ [[ line['move'] ]] [[ line['lname'] ]] [[ strip_name(line['line_corresp'].replace(', ',','),40) ]] - [[ formatLang(line['debit'], dp='Account') ]] - [[ formatLang(line['credit'], dp='Account') ]] - [[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] + [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] + [[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']] @@ -352,9 +352,9 @@ [[ line['move'] ]] [[ line['lname'] ]] [[ strip_name(line['line_corresp'],15) ]] - [[ formatLang(line['debit'], dp='Account') ]] - [[ formatLang(line['credit'], dp='Account') ]] - [[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] + [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] + [[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_partner_ledger.py b/addons/account/report/account_partner_ledger.py index 44a90decf94..04ff5cbb5fd 100644 --- a/addons/account/report/account_partner_ledger.py +++ b/addons/account/report/account_partner_ledger.py @@ -140,7 +140,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): else: RECONCILE_TAG = "AND l.reconcile_id IS NULL" self.cr.execute( - "SELECT l.id, l.date, j.code, acc.code as a_code, acc.name as a_name, l.ref, m.name as move_name, l.name, l.debit, l.credit, l.amount_currency, c.symbol AS currency_code " \ + "SELECT l.id, l.date, j.code, acc.code as a_code, acc.name as a_name, l.ref, m.name as move_name, l.name, l.debit, l.credit, l.amount_currency,l.currency_id, c.symbol AS currency_code " \ "FROM account_move_line l " \ "LEFT JOIN account_journal j " \ "ON (l.journal_id = j.id) " \ diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml index ae273ba5647..139d9bb16cd 100644 --- a/addons/account/report/account_partner_ledger.rml +++ b/addons/account/report/account_partner_ledger.rml @@ -487,7 +487,7 @@ [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '' ]] + [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml index 7d7dd035c3f..644077eec84 100644 --- a/addons/account/report/account_partner_ledger_other.rml +++ b/addons/account/report/account_partner_ledger_other.rml @@ -627,7 +627,7 @@ [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '' ]] + [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml index 9e0782c1805..87f3bb770ba 100644 --- a/addons/account/report/account_print_invoice.rml +++ b/addons/account/report/account_print_invoice.rml @@ -1,6 +1,6 @@ - -