diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index bb13f1a5776..e579f76f0ed 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -112,13 +112,29 @@ class account_analytic_line(osv.osv): (prod.name, prod_id,)) amount_unit = prod.price_get('list_price', context)[prod_id] - prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') - amount = amount_unit * quantity or 1.0 - result = round(amount, prec) - if is_purchase: - result *= -1 - return { - 'value': { + if not company_id: + company_id=company_obj._company_default_get(cr, uid, 'account.analytic.line', context) + flag = False + # Compute based on pricetype + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context) + pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] + if journal_id: + journal = analytic_journal_obj.browse(cr, uid, journal_id) + if journal.type == 'sale': + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context) + if product_price_type_ids: + pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] + # Take the company currency as the reference one + 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 + result = round(amount, prec) + if not flag: + result *= -1 + return {'value': { 'amount': result, 'general_account_id': a, } diff --git a/addons/account/account_unit_test.xml b/addons/account/account_unit_test.xml index 97fba380214..e4178517361 100644 --- a/addons/account/account_unit_test.xml +++ b/addons/account/account_unit_test.xml @@ -14,6 +14,13 @@ Test invoice 1 + + Test Tax + 5.00 + 100.00 + + + Basic computer with Dvorak keyboard and left-handed mouse @@ -27,7 +34,7 @@ 800 2 - + EUR diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 36ee5255523..ba1bd98fc04 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -236,6 +236,17 @@ + + account.treasory.graph + account.account + graph + + + + + + + Accounts account.account @@ -2337,7 +2348,7 @@ - + diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml index 5ae2890fd20..89767eb1507 100644 --- a/addons/account/board_account_view.xml +++ b/addons/account/board_account_view.xml @@ -20,7 +20,22 @@ graph,tree [('type','=','income')] - + + Company Analysis + account.entries.report + form + tree,graph + {'group_by':['user_type'], 'group_by_no_leaf':1} + + + + Treasory + account.account + form + graph,tree + [('type','=','liquidity')] + + board.account.form board.board @@ -30,10 +45,12 @@ + + - + @@ -51,6 +68,6 @@ - + diff --git a/addons/account/i18n/de.po b/addons/account/i18n/de.po index c31fc1b5cf8..94f0c92c017 100644 --- a/addons/account/i18n/de.po +++ b/addons/account/i18n/de.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-09-29 10:39+0000\n" -"Last-Translator: OpenERP Administrators \n" +"PO-Revision-Date: 2010-10-11 07:18+0000\n" +"Last-Translator: Ferdinand-chricar \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-09-30 04:40+0000\n" +"X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -630,7 +630,7 @@ msgstr "(frei lassen um aktuelle Einstellung zu verwenden)" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_account msgid "Accounts Fiscal Mapping" -msgstr "" +msgstr "Konten Steuer Umschlüsselung" #. module: account #: field:account.analytic.account,contact_id:0 @@ -1030,7 +1030,7 @@ msgstr "Nettosumme:" #: model:ir.model,name:account.model_account_fiscal_position #: field:res.partner,property_account_position:0 msgid "Fiscal Mapping" -msgstr "" +msgstr "Steuer Umschlüsselung" #. module: account #: field:account.analytic.line,product_uom_id:0 @@ -1052,7 +1052,7 @@ msgstr "(Sub-)" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_tax msgid "Taxes Fiscal Mapping" -msgstr "" +msgstr "Steuern Umschlüsselung" #. module: account #: model:ir.actions.act_window,name:account.action_invoice_tree2_new @@ -1141,7 +1141,7 @@ msgstr "Neues Analytisches Konto" #: model:ir.actions.act_window,name:account.action_account_fiscal_position_template_form #: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form_template msgid "Fiscal Mapping Templates" -msgstr "" +msgstr "Steuer Umschlüsselung Vorlagen" #. module: account #: rml:account.invoice:0 @@ -1173,7 +1173,7 @@ msgstr "optionaler Betrag in anderer Währung" #: view:account.fiscal.position.template:0 #: field:account.fiscal.position.template,name:0 msgid "Fiscal Mapping Template" -msgstr "" +msgstr "Steuer Umschlüsselung Vorlage" #. module: account #: field:account.payment.term,line_ids:0 @@ -1244,7 +1244,7 @@ msgstr "Betriebl. Währung" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_account_template msgid "Template Account Fiscal Mapping" -msgstr "" +msgstr "Konten Steuerumschlüsselung Vorlagen" #. module: account #: field:account.analytic.account,parent_id:0 @@ -1828,6 +1828,7 @@ msgid "" "The fiscal mapping will determine taxes and the accounts used for the " "partner." msgstr "" +"Die Steuerumschlüsselung legt Steuern und Konten für diesen PArtner fest." #. module: account #: rml:account.analytic.account.cost_ledger:0 @@ -2102,7 +2103,7 @@ msgstr "Prozess Abrechnung von Kundenaufträgen" #. module: account #: rml:account.invoice:0 msgid "Fiscal Mapping Remark :" -msgstr "" +msgstr "Steuer Umschlüsselung Anmerkung:" #. module: account #: wizard_field:account.fiscalyear.close,init,period_id:0 @@ -3701,7 +3702,7 @@ msgstr "Sequenzer" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_template msgid "Template for Fiscal Mapping" -msgstr "" +msgstr "Steuerumschlüsselung Vorlage" #. module: account #: view:account.bank.statement:0 @@ -3808,7 +3809,7 @@ msgstr "Entwurf Rechnungen" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_tax_template msgid "Template Tax Fiscal Mapping" -msgstr "" +msgstr "Steuer Umschlüsselung Vorlage" #. module: account #: rml:account.invoice:0 @@ -6007,7 +6008,7 @@ msgstr "Zahlungsbedingung" #: model:ir.actions.act_window,name:account.action_account_fiscal_position_form #: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form msgid "Fiscal Mappings" -msgstr "" +msgstr "Steuer Umschlüsselung" #. module: account #: model:process.process,name:account.process_process_statementprocess0 diff --git a/addons/account/i18n/mn.po b/addons/account/i18n/mn.po index 8103e44a07c..82262de0ce2 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-09-29 08:55+0000\n" +"PO-Revision-Date: 2010-10-11 07:18+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-09-30 04:41+0000\n" +"X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -1983,7 +1983,7 @@ msgstr "Шилжүүлэлт" #. module: account #: rml:account.overdue:0 msgid "Li." -msgstr "" +msgstr "Ли." #. module: account #: wizard_view:account.chart,init:0 @@ -2262,7 +2262,7 @@ msgstr "Дансны мод" #. module: account #: model:account.journal,name:account.check_journal msgid "x Checks Journal" -msgstr "" +msgstr "x Чекийн журнал" #. module: account #: model:ir.actions.wizard,name:account.wizard_generate_subscription @@ -4413,7 +4413,7 @@ msgstr "Батлагдсан" #: view:account.tax:0 #: view:account.tax.template:0 msgid "Credit Notes" -msgstr "" +msgstr "Орлогын тэмдэглэл" #. module: account #: field:account.config.wizard,date2:0 @@ -4430,12 +4430,12 @@ msgstr "Нээлтийн бичилтийг цуцлах" #. module: account #: model:process.transition,name:account.process_transition_invoicemanually0 msgid "Manually statement" -msgstr "" +msgstr "Гараар үүсгэсэн тайлан" #. module: account #: field:account.payment.term.line,days2:0 msgid "Day of the Month" -msgstr "" +msgstr "Сарын өдөр" #. module: account #: field:account.analytic.journal,line_ids:0 @@ -4493,12 +4493,12 @@ msgstr "" #. module: account #: wizard_view:account.wizard_paid_open,init:0 msgid "Open Invoice" -msgstr "" +msgstr "Нэхэмжлэл нээх" #. module: account #: model:process.node,note:account.process_node_draftstatement0 msgid "Set starting and ending balance for control" -msgstr "" +msgstr "Балансын удирдлагын эхлэл төгсгөлийг тохируулах" #. module: account #: wizard_view:account.wizard_paid_open,init:0 @@ -4537,22 +4537,22 @@ msgstr "Төлөв байдал" #: model:process.node,name:account.process_node_accountingentries0 #: model:process.node,name:account.process_node_supplieraccountingentries0 msgid "Accounting Entries" -msgstr "" +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 msgid "General Ledger -" -msgstr "" +msgstr "Ерөнхий дэвтэр" #. module: account #: field:report.hr.timesheet.invoice.journal,quantity:0 msgid "Quantities" -msgstr "" +msgstr "Тоо хэмжээ" #. module: account #: field:account.analytic.account,date_start:0 @@ -4579,7 +4579,7 @@ msgstr "Бичигдсэн журналын бичилтийн тоо" #: model:process.transition,name:account.process_transition_suppliervalidentries0 #: model:process.transition,name:account.process_transition_validentries0 msgid "Valid Entries" -msgstr "" +msgstr "Хүчинтэй бичилт" #. module: account #: model:ir.actions.wizard,name:account.wizard_account_use_model @@ -4605,7 +4605,7 @@ msgstr "Огноогоор" #: model:ir.actions.act_window,name:account.action_invoice_tree4 #: model:ir.ui.menu,name:account.menu_action_invoice_tree4 msgid "Supplier Refunds" -msgstr "" +msgstr "Нийлүүлэгчид бүцааж төлөх" #. module: account #: help:account.model.line,date:0 @@ -4615,7 +4615,7 @@ msgstr "" #. module: account #: wizard_button:account.invoice.refund,init,modify_invoice:0 msgid "Modify Invoice" -msgstr "" +msgstr "Нэхэмжлэл засварлах" #. module: account #: view:res.partner:0 @@ -4699,7 +4699,7 @@ msgstr "Компани" #. module: account #: rml:account.general.ledger:0 msgid "Crebit" -msgstr "" +msgstr "Орлого" #. module: account #: selection:account.subscription,state:0 @@ -4733,7 +4733,7 @@ msgstr "" #. module: account #: selection:account.automatic.reconcile,init,power:0 msgid "4" -msgstr "" +msgstr "4" #. module: account #: model:ir.actions.act_window,name:account.action_account_fiscalyear_form @@ -4756,23 +4756,23 @@ msgstr "" #. module: account #: xsl:account.transfer:0 msgid "Change" -msgstr "" +msgstr "Солих" #. module: account #: field:account.journal.period,icon:0 msgid "Icon" -msgstr "" +msgstr "Дүрс" #. module: account #: model:ir.model,name:account.model_account_journal_period msgid "Journal - Period" -msgstr "" +msgstr "Журналын мөчлөг" #. module: account #: wizard_field:account.move.line.reconcile,init_full,credit:0 #: wizard_field:account.move.line.reconcile,init_partial,credit:0 msgid "Credit amount" -msgstr "" +msgstr "Орлогын хэмжээ" #. module: account #: view:account.fiscalyear:0 @@ -4782,7 +4782,7 @@ msgstr "Сарын мөчлөг үүсгэх" #. module: account #: wizard_button:account.aged.trial.balance,init,print:0 msgid "Print Aged Trial Balance" -msgstr "" +msgstr "Насжилтын баланс хэвлэх" #. module: account #: field:account.analytic.line,ref:0 @@ -4802,7 +4802,7 @@ msgstr "Нэхэмжлэх хаяг" #. module: account #: rml:account.analytic.account.analytic.check:0 msgid "General Credit" -msgstr "" +msgstr "Ерөнхий орлого" #. module: account #: help:account.journal,centralisation:0 @@ -4831,7 +4831,7 @@ msgstr "Төлбөрийн огноо" #. module: account #: rml:account.journal.period.print:0 msgid "A/c No." -msgstr "" +msgstr "А/к дугаар" #. module: account #: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree_month @@ -4854,17 +4854,17 @@ msgstr "Тулгагдаагүй бичилтийг нээх" #: field:account.bank.statement.reconcile,statement_line:0 #: model:ir.model,name:account.model_account_bank_statement_line msgid "Bank Statement Line" -msgstr "" +msgstr "Банкны мэдэгдлийн мөр" #. module: account #: wizard_button:account.automatic.reconcile,reconcile,end:0 msgid "OK" -msgstr "" +msgstr "Тийм" #. module: account #: model:process.node,name:account.process_node_supplierinvoiceinvoice0 msgid "Control Invoice" -msgstr "" +msgstr "Нэхэмжлэлийн удирдлага" #. module: account #: selection:account.account,type:0 @@ -4899,12 +4899,12 @@ msgstr "НӨАТ:" #: rml:account.general.journal:0 #: rml:account.invoice:0 msgid "Total:" -msgstr "" +msgstr "Нийт:" #. module: account #: model:ir.model,name:account.model_account_analytic_journal msgid "account.analytic.journal" -msgstr "" +msgstr "Аналитик дансны журнал" #. module: account #: view:account.fiscal.position:0 @@ -5533,7 +5533,7 @@ msgstr "Тэнцэл" #. module: account #: rml:account.invoice:0 msgid "Refund" -msgstr "" +msgstr "Буцааж төлөх" #. module: account #: model:ir.model,name:account.model_account_invoice_tax @@ -5600,7 +5600,7 @@ msgstr "Хаах" #. module: account #: field:account.bank.statement.line,move_ids:0 msgid "Moves" -msgstr "" +msgstr "Шилжүүлэх" #. module: account #: selection:account.invoice,state:0 @@ -5649,7 +5649,7 @@ msgstr "" #: wizard_field:account.analytic.account.chart,init,to_date:0 #: wizard_field:account.analytic.line,init,to_date:0 msgid "To" -msgstr "" +msgstr "Хүртэл" #. module: account #: model:ir.actions.act_window,name:account.action_account_analytic_journal_open_form @@ -5669,7 +5669,7 @@ msgstr "" #. module: account #: selection:account.move,type:0 msgid "Journal Sale" -msgstr "" +msgstr "Хувалдан авалтын журнал" #. module: account #: wizard_field:account.fiscalyear.close,init,fy_id:0 @@ -5769,7 +5769,7 @@ msgstr "Ангилалын код" #. module: account #: selection:account.automatic.reconcile,init,power:0 msgid "5" -msgstr "" +msgstr "5" #. module: account #: field:product.category,property_account_income_categ:0 @@ -5797,7 +5797,7 @@ msgstr "Дансны модел" #: view:account.invoice:0 #: model:ir.actions.act_window,name:account.act_account_analytic_account_2_account_invoice_line msgid "Invoice lines" -msgstr "" +msgstr "Нэхэмжлэлийн мөр" #. module: account #: selection:account.bank.statement.line,type:0 @@ -5807,7 +5807,7 @@ msgstr "Худалдан авагч" #. module: account #: field:account.subscription,period_type:0 msgid "Period Type" -msgstr "" +msgstr "Мөчлөгийн төрөл" #. module: account #: view:product.category:0 @@ -5827,7 +5827,7 @@ msgstr "Гүйлгээг эрэмбэлэх" #. module: account #: rml:account.journal.period.print:0 msgid "Print Journal -" -msgstr "" +msgstr "Журнал хэвлэх" #. module: account #: field:account.bank.accounts.wizard,bank_account_id:0 @@ -5840,7 +5840,7 @@ msgstr "Банкны данс" #: model:ir.actions.act_window,name:account.action_model_form #: model:ir.ui.menu,name:account.menu_action_model_form msgid "Models Definition" -msgstr "" +msgstr "Модел тодорхойлох" #. module: account #: model:account.account.type,name:account.account_type_cash_moves @@ -5899,7 +5899,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 @@ -5961,7 +5961,7 @@ msgstr "Бүтээгдэхүүний загвар дээрх зарлагын д #. module: account #: rml:account.analytic.account.analytic.check:0 msgid "General Debit" -msgstr "" +msgstr "Ерөнхий орлого" #. module: account #: field:account.analytic.account,code:0 @@ -5988,12 +5988,12 @@ msgstr "Төлбөрийн нөхцөл" #: model:ir.actions.act_window,name:account.action_account_fiscal_position_form #: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form msgid "Fiscal Mappings" -msgstr "" +msgstr "Санхүүгийн зурагжуулалт" #. module: account #: model:process.process,name:account.process_process_statementprocess0 msgid "Statement Process" -msgstr "" +msgstr "Бримтын үйл явц" #. module: account #: model:ir.model,name:account.model_account_bank_statement_reconcile @@ -6049,12 +6049,12 @@ msgstr "" #. module: account #: view:board.board:0 msgid "Analytic accounts to close" -msgstr "" +msgstr "Аналитик данс хаах" #. module: account #: view:board.board:0 msgid "Draft invoices" -msgstr "" +msgstr "Ноорог нэхэмжлэл" #. module: account #: model:ir.actions.act_window,name:account.open_board_account @@ -6066,33 +6066,33 @@ msgstr "" #: view:board.board:0 #: model:ir.actions.act_window,name:account.act_my_account msgid "Accounts to invoice" -msgstr "" +msgstr "Дансны нэхэмжлэл" #. module: account #: view:board.board:0 #: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice msgid "Costs to invoice" -msgstr "" +msgstr "Үнийн нэхэмжлэл" #. module: account #: view:board.board:0 msgid "Aged receivables" -msgstr "" +msgstr "Насжилтын авлагын данс" #. module: account #: model:ir.module.module,shortdesc:account.module_meta_information msgid "Board for accountant" -msgstr "" +msgstr "Нягтлан бодохын самбар" #. module: account #: model:ir.actions.act_window,name:account.action_aged_income msgid "Income Accounts" -msgstr "" +msgstr "Орлогын данс" #. module: account #: view:board.board:0 msgid "My indicators" -msgstr "" +msgstr "Эдийн засгийн үзүүлэлт" #. module: account #: view:board.board:0 @@ -6112,7 +6112,7 @@ msgstr "" #. module: account #: selection:account.balance.account.balance.report,init,account_choice:0 msgid "All accounts" -msgstr "" +msgstr "Бүх данс" #. module: account #: wizard_field:account.balance.account.balance.report,init,period_manner:0 @@ -6123,23 +6123,23 @@ msgstr "" #: wizard_view:account.balance.account.balance.report,backtoinit:0 #: wizard_view:account.balance.account.balance.report,zero_years:0 msgid "Notification" -msgstr "" +msgstr "Мэдэгдэл" #. module: account #: selection:account.balance.account.balance.report,init,period_manner:0 msgid "Financial Period" -msgstr "" +msgstr "Санхүүгийн мөчлөг" #. module: account #: model:ir.actions.report.xml,name:account.account_account_balance #: model:ir.actions.report.xml,name:account.account_account_balance_landscape msgid "Account balance" -msgstr "" +msgstr "Санхүүгтйн тэнцэл" #. module: account #: wizard_view:account.balance.account.balance.report,init:0 msgid "Select Period(s)" -msgstr "" +msgstr "Мөчлөг сонгох" #. module: account #: selection:account.balance.account.balance.report,init,compare_pattern:0 @@ -6202,7 +6202,7 @@ msgstr "" #: rml:account.account.balance.landscape:0 #: rml:account.balance.account.balance:0 msgid "Total :" -msgstr "" +msgstr "Нийт:" #. module: account #: wizard_field:account.balance.account.balance.report,init,format_perc:0 @@ -6217,17 +6217,17 @@ msgstr "Мөчлөг сонгох" #. module: account #: wizard_view:account.balance.account.balance.report,init:0 msgid "Report Options" -msgstr "" +msgstr "Тайлангийн сонголт" #. module: account #: selection:account.balance.account.balance.report,init,compare_pattern:0 msgid "Don't Compare" -msgstr "" +msgstr "Харицуулахгүй" #. module: account #: wizard_field:account.balance.account.balance.report,init,account_choice:0 msgid "Show Accounts" -msgstr "" +msgstr "Дансыг харуулах" #. module: account #: wizard_view:account.balance.account.balance.report,backtoinit:0 @@ -6243,7 +6243,7 @@ msgstr "" #: rml:account.account.balance.landscape:0 #: rml:account.balance.account.balance:0 msgid "Year :" -msgstr "" +msgstr "Жил:" #. module: account #: wizard_view:account.balance.account.balance.report,backtoinit:0 @@ -6301,7 +6301,7 @@ msgstr "" #. module: account #: field:report.aged.receivable,name:0 msgid "Month Range" -msgstr "" +msgstr "Сарын хязгаарлалт" #. module: account #: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard @@ -6316,12 +6316,12 @@ msgstr "" #. module: account #: view:report.invoice.created:0 msgid "Total Amount" -msgstr "" +msgstr "Нийт хэмжээ" #. module: account #: view:report.account.receivable:0 msgid "Accounts by type" -msgstr "" +msgstr "Дансны төрлөөр" #. module: account #: model:ir.model,name:report_account.model_report_aged_receivable @@ -6331,12 +6331,12 @@ msgstr "" #. module: account #: model:ir.model,name:report_account.model_report_account_receivable msgid "Receivable accounts" -msgstr "" +msgstr "Авлагын данс" #. module: account #: field:temp.range,name:0 msgid "Range" -msgstr "" +msgstr "Хязгаар" #. module: account #: model:ir.module.module,description:report_account.module_meta_information @@ -6346,7 +6346,7 @@ msgstr "" #. module: account #: model:ir.module.module,shortdesc:report_account.module_meta_information msgid "Account Reporting - Reporting" -msgstr "" +msgstr "Санхүүгийн тайлан-Тайлан" #. module: account #: model:ir.actions.act_window,name:report_account.action_account_receivable_graph @@ -6357,18 +6357,18 @@ msgstr "" #. module: account #: field:report.account.receivable,name:0 msgid "Week of Year" -msgstr "" +msgstr "Жилийн долоо хоног" #. module: account #: field:report.invoice.created,create_date:0 msgid "Create Date" -msgstr "" +msgstr "Үүсгэх огноо" #. module: account #: 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/product_view.xml b/addons/account/product_view.xml index cc9351d55f4..67352fd1120 100644 --- a/addons/account/product_view.xml +++ b/addons/account/product_view.xml @@ -9,7 +9,7 @@ - + diff --git a/addons/account/project/report/analytic_journal.rml b/addons/account/project/report/analytic_journal.rml index 7b55c6ad212..47775ea9253 100644 --- a/addons/account/project/report/analytic_journal.rml +++ b/addons/account/project/report/analytic_journal.rml @@ -280,7 +280,7 @@ [[ move_a.code ]] - [[ move_a.name ]] asgfas + [[ move_a.name ]] [[ move_a.account_id.code ]] - [[ move_a.account_id.name ]] diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index 4f495891378..a59e95724d0 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -181,13 +181,10 @@ Credit - Balance + Balance - - - @@ -199,21 +196,18 @@ - [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] + [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] + [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] - - -
- [[ repeatIn(objects,'o') ]] + [[ repeatIn(objects,'o') ]] @@ -223,21 +217,18 @@ [[ o.complete_name ]] - [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] + [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] + [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ formatLang (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]] - - -
- [[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]] + [[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]] @@ -247,21 +238,18 @@ [[ move_g['name'] ]] - [[ formatLang( move_g['debit']) ]] + [[ formatLang( move_g['debit']) ]] - [[ formatLang( move_g['credit']) ]] + [[ formatLang( move_g['credit']) ]] [[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]] - - -
- [[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] + [[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] @@ -274,13 +262,13 @@ [[ move_a['name'] ]] - [[ formatLang( move_a['debit'] )]] + [[ formatLang( move_a['debit'] )]] - [[ formatLang( move_a['credit']) ]] + [[ formatLang( move_a['credit']) ]] - [[ formatLang( move_a['balance']) ]] + [[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]] @@ -288,13 +276,7 @@
- - -
- - - - + \ No newline at end of file diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py index 22b04e05f39..5936e29fe29 100644 --- a/addons/account/report/account_aged_partner_balance.py +++ b/addons/account/report/account_aged_partner_balance.py @@ -62,7 +62,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): def _get_lines(self, form): res = [] - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') self.cr.execute('SELECT DISTINCT res_partner.id AS id,\ res_partner.name AS name \ FROM res_partner,account_move_line AS l, account_account\ @@ -219,7 +218,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): def _get_lines_with_out_partner(self, form): res = [] - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted'] diff --git a/addons/account/report/account_balance_sheet_horizontal.rml b/addons/account/report/account_balance_sheet_horizontal.rml index 08b9030a968..bde0d2786d0 100644 --- a/addons/account/report/account_balance_sheet_horizontal.rml +++ b/addons/account/report/account_balance_sheet_horizontal.rml @@ -233,7 +233,7 @@ [[ '. '*(a['level']-1) ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]] - [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]] + [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_central_journal.rml b/addons/account/report/account_central_journal.rml index 1045470b2f2..1f4fe48fa79 100644 --- a/addons/account/report/account_central_journal.rml +++ b/addons/account/report/account_central_journal.rml @@ -283,7 +283,7 @@ Balance - [[ display_currency(data) or removeParentNode('blockTable') ]] + [[ display_currency(data) or removeParentNode('blockTable') ]] A/C No. Account Name @@ -293,18 +293,18 @@ Currency - [[ display_currency(data) == False or removeParentNode('blockTable') ]] + [[ display_currency(data) == False or removeParentNode('blockTable') ]] - Total([[ company.currency_id.code]]): + Total: [[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]] [[ company.currency_id.symbol ]] - [[ display_currency(data) or removeParentNode('blockTable') ]] + [[ display_currency(data) or removeParentNode('blockTable') ]] - Total:([[ company.currency_id.code]]) + Total: [[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] @@ -314,7 +314,7 @@
[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]] - [[ display_currency(data) == False or removeParentNode('blockTable') ]] + [[ display_currency(data) == False or removeParentNode('blockTable') ]] [[ line['code'] ]] [[ line['name'] ]] @@ -323,19 +323,17 @@ [[ formatLang(line['credit']-line['debit']) ]] [[ company.currency_id.symbol ]] - [[ display_currency(data) or removeParentNode('blockTable') ]] + [[ display_currency(data) or removeParentNode('blockTable') ]] [[ line['code'] ]] [[ line['name'] ]] [[ formatLang(line['debit']) ]] [[ formatLang(line['credit'])]] - [[ formatLang(line['credit']-line['debit']) ]] [[ company.currency_id.symbol ]] - [[ line['currency_id'] and formatLang(line['amount_currency'] or '') ]] [[ line['currency_id'] and line['currency_code'] or '']] + [[ formatLang(line['credit']-line['debit']) ]] [[ company.currency_id.symbol ]] + [[ (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_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml index a80fb3c3233..fc75a05e029 100644 --- a/addons/account/report/account_entries_report_view.xml +++ b/addons/account/report/account_entries_report_view.xml @@ -48,6 +48,19 @@
+ + account.company.analysis.tree + account.entries.report + tree + + + + + + + + + account.entries.report.search account.entries.report diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml index 489416adf76..fdf044c048e 100644 --- a/addons/account/report/account_general_journal.rml +++ b/addons/account/report/account_general_journal.rml @@ -270,7 +270,7 @@ Balance - Total:([[ company.currency_id.code]]) + Total: [[ formatLang(sum_debit()) ]] [[ formatLang( sum_credit()) ]] @@ -373,7 +373,7 @@ [[ formatLang(line['debit'] )]] [[ formatLang(line['credit']) ]] [[ formatLang(line['credit']-line['debit'] ) ]] [[ company.currency_id.symbol ]] - [[ line['currency_id'] and formatLang(line['amount_currency'] ) ]] [[ 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_general_ledger.py b/addons/account/report/account_general_ledger.py index f3ec97a592e..d35f0603ded 100644 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -161,7 +161,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header): else: sql_sort='l.date' sql = """ - SELECT l.id AS lid, l.date AS ldate, j.code AS lcode, l.amount_currency,l.ref AS lref, l.name AS lname, COALESCE(l.debit,0) AS debit, COALESCE(l.credit,0) AS credit, l.period_id AS lperiod_id, l.partner_id AS lpartner_id, + SELECT l.id AS lid, l.date AS ldate, j.code AS lcode, l.currency_id,l.amount_currency,l.ref AS lref, l.name AS lname, COALESCE(l.debit,0) AS debit, COALESCE(l.credit,0) AS credit, l.period_id AS lperiod_id, l.partner_id AS lpartner_id, m.name AS move_name, m.id AS mmove_id, c.symbol AS currency_code, i.id AS invoice_id, i.type AS invoice_type, i.number AS invoice_number, diff --git a/addons/account/report/account_general_ledger.rml b/addons/account/report/account_general_ledger.rml index 6ac6cd51286..917ffa214d8 100644 --- a/addons/account/report/account_general_ledger.rml +++ b/addons/account/report/account_general_ledger.rml @@ -334,7 +334,7 @@ [[ formatLang(line['debit']) ]] [[ formatLang(line['credit']) ]] [[ 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_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index b8fa0e1f374..324cf378177 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -263,13 +263,13 @@ - + [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - [[ 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 '' ]] + [[ 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 '' ]] @@ -292,10 +292,10 @@ [[ line['move'] ]] [[ line['lname'] ]] [[ strip_name(line['line_corresp'].replace(', ',','),40) ]] - [[ 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 ]] - [[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]] + [[ formatLang(line['debit'], dp='Account') ]] + [[ formatLang(line['credit'], dp='Account') ]] + [[ formatLang(line['progress'], 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 '']] diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml index 3eef3270dd5..ae273ba5647 100644 --- a/addons/account/report/account_partner_ledger.rml +++ b/addons/account/report/account_partner_ledger.rml @@ -289,7 +289,7 @@ Ref. - A/c No.- Name + Account Entry Label @@ -359,7 +359,7 @@ [[ line['move_name'] ]] - [[ line['a_code'] ]] - [[ line['a_name'] ]] + [[ line['a_code'] ]] [[ line['ref'] ]] - [[ line['name'] ]] @@ -391,7 +391,7 @@ Ref. - A/c No.- Name + Account Entry Label @@ -472,7 +472,7 @@ [[ line['move_name'] ]] - [[ line['a_code'] ]] - [[ line['a_name'] ]] + [[ line['a_code'] ]] [[ (line['ref'] or '') + ' ' + line['name'] ]] diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml index 4a07a8ef53c..7d7dd035c3f 100644 --- a/addons/account/report/account_partner_ledger_other.rml +++ b/addons/account/report/account_partner_ledger_other.rml @@ -444,7 +444,7 @@ Ref. - A/c No.- Name + Account Entry Label @@ -507,7 +507,7 @@ [[ line['move_name'] ]] - [[ line['a_code'] ]] - [[ line['a_name'] ]] + [[ line['a_code'] ]] [[ (line['ref'] or '') + ' ' + line['name'] ]] @@ -537,7 +537,7 @@ Ref. - A/c No.- Name + Account Entry Label @@ -612,7 +612,7 @@ [[ line['move_name'] ]] - [[ line['a_code'] ]] - [[ line['a_name'] ]] + [[ line['a_code'] ]] [[ (line['ref'] or '') + ' ' + line['name'] ]] diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index a0748e281ac..d3d2c77e47a 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -46,11 +46,13 @@ - - - - - + + + + + + + @@ -116,7 +118,7 @@ Document: Customer account statement Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] - Customer Ref: [[ o.ref or '' ]] + Customer Ref: [[ o.ref or ' ']] @@ -181,10 +183,10 @@ [[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]] - [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] + [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] - [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] + [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] [[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]] @@ -195,7 +197,7 @@ - + @@ -206,7 +208,7 @@ Sub-Total : - [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] + [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] @@ -220,6 +222,8 @@ + + @@ -230,25 +234,21 @@ Balance : - [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] - - - - - - - - - - - + + + + + + + Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]. diff --git a/addons/account/report/account_profit_horizontal.rml b/addons/account/report/account_profit_horizontal.rml index 8c66f223df9..f92f9e07983 100644 --- a/addons/account/report/account_profit_horizontal.rml +++ b/addons/account/report/account_profit_horizontal.rml @@ -240,7 +240,7 @@ - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]] + [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[(a['code1'] and a['name1']) and formatLang(abs(a['balance1'])) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py index b03aea5c05d..d3fb791bfaa 100644 --- a/addons/account/report/account_tax_report.py +++ b/addons/account/report/account_tax_report.py @@ -190,7 +190,6 @@ class tax_report(rml_parse.rml_parse): bcl_rup_ind = ind - 1 while (bcl_current_level >= int(accounts[bcl_rup_ind]['level']) and bcl_rup_ind >= 0 ): - tot_elem = copy.copy(accounts[bcl_rup_ind], context=context) res_tot = { 'code': accounts[bcl_rup_ind]['code'], 'name': '', 'debit': 0, diff --git a/addons/account/report/account_tax_report.rml b/addons/account/report/account_tax_report.rml index 9ad4ff56112..2434437e803 100644 --- a/addons/account/report/account_tax_report.rml +++ b/addons/account/report/account_tax_report.rml @@ -104,7 +104,7 @@ - Taxes + Tax Statement Tax Name diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 7e4295da45b..4bc3b807d28 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -1,6 +1,6 @@ - In order to test the PDF reports defined on an invoice, we will print an Invoice Report -- +- !python {model: account.invoice}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) @@ -9,7 +9,7 @@ - In order to test the PDF reports defined on a partner, we will print the Overdue Report -- +- !python {model: res.partner}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {}) @@ -18,7 +18,7 @@ - In order to test the PDF reports defined on Account Move, we will print the Voucher Report -- +- !python {model: account.move}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {}) @@ -30,28 +30,30 @@ - !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_tax_code_0")], data_dict, {}) + (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('account.test_invoice_1')], {}, {}) @@ -84,9 +86,9 @@ ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) - + data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'initial_balance': 1, 'periods': period_list,'journal_ids':journal_ids, 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : query_line, 'result_selection': 'customer','direction_selection': 'past','fiscalyear_id':fy_id}} data_dict['form'].update(res) (data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {}) @@ -122,10 +124,10 @@ (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data) - + data_dict.update({'model': 'ir.ui.menu'}) data_dict['form'].update({'active_ids':[ref('account.bal'),ref('account.gpf')]}) - + (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal-menu.'+format), 'wb+').write(data) @@ -145,16 +147,16 @@ ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data) - + data_dict.update({'model': 'ir.ui.menu'}) data_dict['form'].update({'active_ids':journal_period_ids}) - + (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-central_journal-menu.'+format), 'wb+').write(data) @@ -167,13 +169,13 @@ period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) - + obj_move = self.pool.get('account.move.line') ctx = {} ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} (data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {}) @@ -189,15 +191,15 @@ period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] acc_ids = [ref('account.bal'),ref('account.gpf')] - + obj_move = self.pool.get('account.move.line') ctx = {} ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) - + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query': query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {}) if tools.config['test_report_directory']: @@ -217,15 +219,15 @@ period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] acc_ids = [ref('account.bal'),ref('account.gpf')] - + obj_move = self.pool.get('account.move.line') ctx = {} ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) - + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {}) if tools.config['test_report_directory']: @@ -252,17 +254,17 @@ ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) - + data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-print_journal.'+format), 'wb+').write(data) - + data_dict.update({'model': 'ir.ui.menu'}) data_dict['form'].update({'active_ids':journal_period_ids}) - + (data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-print_journal-menu.'+format), 'wb+').write(data) @@ -275,16 +277,17 @@ fy_id = ref('account.data_fiscalyear') period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] - + journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) obj_move = self.pool.get('account.move.line') ctx = {} ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) - data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} - (data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, [], data_dict, {}) + + data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'active_ids':journal_period_ids,'display_partner': 'all','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} + (data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data) @@ -302,9 +305,9 @@ ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) - + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} (data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: @@ -324,7 +327,7 @@ ctx['fiscalyear'] = fy_id ctx['journal_ids'] = journal_ids ctx['chart_account_id'] = ref('account.chart0') - + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} (data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {}) diff --git a/addons/account/test/account_validate_account_move.yml b/addons/account/test/account_validate_account_move.yml index 37d64ead528..9a733d8ad5f 100644 --- a/addons/account/test/account_validate_account_move.yml +++ b/addons/account/test/account_validate_account_move.yml @@ -1,3 +1,12 @@ +- + Demo data for Account tax code +- + !record {model: account.tax.code, id: account_tax_code_0}: + name : Tax Code Test + sign : 1.00 +- + + - In order to test the 'Validate Journal Entries' wizard in OpenERP, I created an account move @@ -20,6 +29,7 @@ - journal_id: account.bank_journal period_id: account.period_6 ref: '2010010' + tax_code_id: account_tax_code_0 tax_amount: 0.0 account_id: account.a_recv amount_currency: 0.0 diff --git a/addons/account/wizard/account_vat_view.xml b/addons/account/wizard/account_vat_view.xml index 018c753a7c2..16bb39e22cd 100644 --- a/addons/account/wizard/account_vat_view.xml +++ b/addons/account/wizard/account_vat_view.xml @@ -16,7 +16,7 @@