From 6bf8e8540e15556d4f6de35150e5b4b6a0e54466 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 4 Oct 2010 10:16:07 +0530 Subject: [PATCH 01/39] [FIX] account_analytic_plans: if analytic id is not present in invoice line bzr revid: mra@mra-laptop-20101004044607-xi90nws3pao6f3rf --- addons/account_analytic_plans/account_analytic_plans.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index 71031dd6f1c..67640c98b99 100644 --- a/addons/account_analytic_plans/account_analytic_plans.py +++ b/addons/account_analytic_plans/account_analytic_plans.py @@ -343,7 +343,6 @@ class account_invoice(osv.osv): def _get_analytic_lines(self, cr, uid, id): inv = self.browse(cr, uid, [id])[0] cur_obj = self.pool.get('res.currency') - company_currency = inv.company_id.currency_id.id if inv.type in ('out_invoice', 'in_refund'): sign = 1 @@ -354,7 +353,7 @@ class account_invoice(osv.osv): acct_ins_obj = self.pool.get('account.analytic.plan.instance') for il in iml: - if il['analytics_id']: + if il.get('analytics_id', False): if inv.type in ('in_invoice', 'in_refund'): ref = inv.reference @@ -363,7 +362,7 @@ class account_invoice(osv.osv): obj_move_line = acct_ins_obj.browse(cr, uid, il['analytics_id']) amount_calc = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, il['price'], context={'date': inv.date_invoice}) * sign qty = il['quantity'] - il['analytic_lines']=[] + il['analytic_lines'] = [] for line2 in obj_move_line.account_ids: amt = amount_calc * (line2.rate/100) qtty = qty* (line2.rate/100) @@ -419,5 +418,4 @@ class sale_order_line(osv.osv): sale_order_line() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From 132755ae723afdaae34162addda14aa4e091cd28 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Mon, 4 Oct 2010 04:57:18 +0000 Subject: [PATCH 02/39] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20101004045718-jhhivqzy5dfus8f0 --- addons/account/i18n/ru.po | 108 +++++++-------- addons/base_calendar/i18n/nl.po | 198 ++++++++++++++-------------- addons/decimal_precision/i18n/nl.po | 25 ++-- addons/multi_company/i18n/pl.po | 9 +- addons/sale/i18n/vi.po | 8 +- 5 files changed, 177 insertions(+), 171 deletions(-) diff --git a/addons/account/i18n/ru.po b/addons/account/i18n/ru.po index e1f446f64f4..13a7c72dd5d 100644 --- a/addons/account/i18n/ru.po +++ b/addons/account/i18n/ru.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 08:13+0000\n" +"PO-Revision-Date: 2010-10-03 09:42+0000\n" "Last-Translator: Chertykov Denis \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:41+0000\n" +"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -2116,7 +2116,7 @@ msgstr "дней" #. module: account #: selection:account.aged.trial.balance,init,direction_selection:0 msgid "Past" -msgstr "" +msgstr "Прошлые" #. module: account #: field:account.analytic.account,company_currency_id:0 @@ -2267,7 +2267,7 @@ msgstr "Создать проводки подписки" #. module: account #: wizard_field:account.fiscalyear.close,init,journal_id:0 msgid "Opening Entries Journal" -msgstr "" +msgstr "Открытие журнала проводок" #. module: account #: view:account.config.wizard:0 @@ -3839,7 +3839,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_wizard_company_setup_form #: view:wizard.company.setup:0 msgid "Overdue Payment Report Message" -msgstr "" +msgstr "Сообщение о просроченном платеже" #. module: account #: selection:account.tax,tax_group:0 @@ -3894,12 +3894,12 @@ msgstr "Финансовые журналы" #: selection:account.partner.balance.report,init,state:0 #: selection:account.third_party_ledger.report,init,state:0 msgid "By Period" -msgstr "" +msgstr "По периоду" #. module: account #: help:account.invoice,date_invoice:0 msgid "Keep empty to use the current date" -msgstr "" +msgstr "Оставьте пустым для текущей даты" #. module: account #: rml:account.overdue:0 @@ -3909,7 +3909,7 @@ msgstr "." #. module: account #: field:account.analytic.account,quantity_max:0 msgid "Maximum Quantity" -msgstr "" +msgstr "Максимальное количество" #. module: account #: field:account.period,name:0 @@ -3932,7 +3932,7 @@ msgstr "Группы" #. module: account #: rml:account.analytic.account.quantity_cost_ledger:0 msgid "Code/Date" -msgstr "" +msgstr "Код/Дата" #. module: account #: field:account.account,active:0 @@ -3953,7 +3953,7 @@ msgstr "" #. module: account #: view:account.chart.template:0 msgid "Properties" -msgstr "" +msgstr "Параметры" #. module: account #: view:res.partner:0 @@ -3973,7 +3973,7 @@ msgstr "" #. module: account #: wizard_field:account.vat.declaration,init,based_on:0 msgid "Base on" -msgstr "" +msgstr "Основан на" #. module: account #: selection:account.move,type:0 @@ -4365,7 +4365,7 @@ msgstr "" #: field:account.config.wizard,date2:0 #: field:account.fiscalyear,date_stop:0 msgid "End Date" -msgstr "" +msgstr "Дата окончания" #. module: account #: model:ir.actions.wizard,name:account.wizard_open_closed_fiscalyear @@ -4381,7 +4381,7 @@ 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 @@ -4542,7 +4542,7 @@ msgstr "Разрегить сверку" #: selection:account.partner.balance.report,init,state:0 #: selection:account.third_party_ledger.report,init,state:0 msgid "By Date" -msgstr "" +msgstr "По дате" #. module: account #: model:ir.actions.act_window,name:account.action_invoice_tree4 @@ -4558,7 +4558,7 @@ msgstr "Дата сгенерированных проводок" #. module: account #: wizard_button:account.invoice.refund,init,modify_invoice:0 msgid "Modify Invoice" -msgstr "" +msgstr "Изменить счет" #. module: account #: view:res.partner:0 @@ -4568,7 +4568,7 @@ msgstr "Настройки бухгалтерского учета для кон #. module: account #: view:account.analytic.account:0 msgid "Analytic Account Statistics" -msgstr "" +msgstr "Статистика счета аналитики" #. module: account #: view:wizard.multi.charts.accounts:0 @@ -4598,12 +4598,12 @@ 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 msgid "Tax Included in Price" -msgstr "" +msgstr "Налог включен в цену" #. module: account #: model:ir.actions.act_window,name:account.action_account_analytic_journal_tree2 @@ -4684,7 +4684,7 @@ msgstr "Учетные годы" #. module: account #: model:process.node,note:account.process_node_importinvoice0 msgid "Import from invoices or payments" -msgstr "" +msgstr "Импорт из счетов или платежей" #. module: account #: model:ir.actions.wizard,name:account.wizard_reconcile_select @@ -4741,7 +4741,7 @@ msgstr "Адрес выставления счета" #. module: account #: rml:account.analytic.account.analytic.check:0 msgid "General Credit" -msgstr "" +msgstr "Общий кредит" #. module: account #: help:account.journal,centralisation:0 @@ -4754,7 +4754,7 @@ msgstr "" #. module: account #: selection:account.invoice,state:0 msgid "Cancelled" -msgstr "" +msgstr "Отменено" #. module: account #: model:ir.actions.act_window,name:account.action_bank_statement_draft_tree @@ -4765,7 +4765,7 @@ msgstr "Черновые выписки" #. module: account #: wizard_field:populate_statement_from_inv,init,date:0 msgid "Date payment" -msgstr "" +msgstr "Дата оплаты" #. module: account #: rml:account.journal.period.print:0 @@ -4782,7 +4782,7 @@ msgstr "Расходы и доходы по журналам (текущий м #: selection:account.partner.balance.report,init,result_selection:0 #: selection:account.third_party_ledger.report,init,result_selection:0 msgid "Receivable Accounts" -msgstr "" +msgstr "Счета к получению" #. module: account #: wizard_button:account.move.line.unreconcile.select,init,open:0 @@ -4838,7 +4838,7 @@ 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 @@ -4893,7 +4893,7 @@ msgstr "" #: field:account.bank.statement.reconcile,total_amount:0 #: field:account.bank.statement.reconcile,total_second_amount:0 msgid "Payment amount" -msgstr "" +msgstr "Сумма оплаты" #. module: account #: view:account.analytic.account:0 @@ -4940,7 +4940,7 @@ msgstr "Все месяцы" #. module: account #: wizard_field:account.invoice.refund,init,date:0 msgid "Operation date" -msgstr "" +msgstr "Дата операции" #. module: account #: field:account.invoice,invoice_line:0 @@ -4950,7 +4950,7 @@ msgstr "Позиции счета" #. module: account #: field:account.period,date_start:0 msgid "Start of Period" -msgstr "" +msgstr "Начало периода" #. module: account #: wizard_field:account.fiscalyear.close,init,report_name:0 @@ -5008,12 +5008,12 @@ msgstr "" #. module: account #: rml:account.account.balance:0 msgid "Account Balance -" -msgstr "" +msgstr "Баланс по счету -" #. module: account #: field:account.journal,group_invoice_lines:0 msgid "Group invoice lines" -msgstr "" +msgstr "Группировать позиции счета" #. module: account #: model:ir.ui.menu,name:account.menu_finance_configuration @@ -5058,7 +5058,7 @@ msgstr "" #: wizard_view:account.partner.balance.report,init:0 #: wizard_view:account.third_party_ledger.report,init:0 msgid "Select Date-Period" -msgstr "" +msgstr "Выбор даты-периода" #. module: account #: rml:account.analytic.account.inverted.balance:0 @@ -5069,7 +5069,7 @@ msgstr "" #: model:process.node,name:account.process_node_paidinvoice0 #: model:process.node,name:account.process_node_supplierpaidinvoice0 msgid "Paid invoice" -msgstr "" +msgstr "Оплаченный счет" #. module: account #: view:account.tax:0 @@ -5099,7 +5099,7 @@ msgstr "" #. module: account #: model:ir.actions.wizard,name:account.wizard_populate_statement_from_inv msgid "Import invoices" -msgstr "" +msgstr "Импорт счетов" #. module: account #: wizard_view:account.move.line.unreconcile,init:0 @@ -5143,7 +5143,7 @@ msgstr "Периоды подписки" #. module: account #: model:process.node,name:account.process_node_manually0 msgid "Manually" -msgstr "" +msgstr "Вручную" #. module: account #: view:account.invoice:0 @@ -5162,7 +5162,7 @@ msgstr "Счета" #: selection:account.partner.balance.report,init,result_selection:0 #: selection:account.third_party_ledger.report,init,result_selection:0 msgid "Payable Accounts" -msgstr "" +msgstr "Кредиторская задолженность" #. module: account #: view:account.invoice.line:0 @@ -5183,12 +5183,12 @@ msgstr "Полный платеж" #. module: account #: selection:account.move,type:0 msgid "Journal Purchase" -msgstr "" +msgstr "Журнал покупок" #. module: account #: selection:account.move,type:0 msgid "Cash Receipt" -msgstr "" +msgstr "Денежное поступление" #. module: account #: field:account.fiscal.position.tax,tax_dest_id:0 @@ -5254,12 +5254,12 @@ msgstr "" #: wizard_view:account.partner.balance.report,init:0 #: wizard_view:account.third_party_ledger.report,init:0 msgid "Date Filter" -msgstr "" +msgstr "Фильтр дат" #. module: account #: wizard_view:populate_statement_from_inv,init:0 msgid "Choose Journal and Payment Date" -msgstr "" +msgstr "Выбрать журнал и дату платежа" #. module: account #: selection:account.analytic.account,state:0 @@ -5288,7 +5288,7 @@ msgstr "Невыплаченные возвраты клиентам" #. module: account #: help:account.invoice,residual:0 msgid "Remaining amount due." -msgstr "" +msgstr "Оставшиеся суммы" #. module: account #: wizard_view:account.period.close,init:0 @@ -5304,7 +5304,7 @@ msgstr "Проформа" #. 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 @@ -5319,7 +5319,7 @@ msgstr "Отчетный год" #. module: account #: wizard_button:account.analytic.line,init,open:0 msgid "Open Entries" -msgstr "" +msgstr "Открытые проводки" #. module: account #: selection:account.analytic.account,type:0 @@ -5344,7 +5344,7 @@ msgstr "" #: rml:account.third_party_ledger_other:0 #: rml:account.vat.declaration:0 msgid "Page" -msgstr "" +msgstr "Страница" #. module: account #: view:account.move:0 @@ -5377,7 +5377,7 @@ msgstr "Сверенная сумма" #. module: account #: selection:account.account,currency_mode:0 msgid "At Date" -msgstr "" +msgstr "На дату" #. module: account #: help:account.move.line,tax_amount:0 @@ -5419,7 +5419,7 @@ msgstr "" #. module: account #: field:account.subscription,period_total:0 msgid "Number of Periods" -msgstr "" +msgstr "Количество периодов" #. module: account #: wizard_field:account.analytic.account.analytic.check.report,init,date2:0 @@ -5488,7 +5488,7 @@ msgstr "" #. module: account #: field:wizard.multi.charts.accounts,bank_accounts_id:0 msgid "Bank Accounts" -msgstr "" +msgstr "Банковские счета" #. module: account #: constraint:account.period:0 @@ -5500,7 +5500,7 @@ msgstr "" #. module: account #: help:account.journal,invoice_sequence_id:0 msgid "The sequence used for invoice numbers in this journal." -msgstr "" +msgstr "Последовательность используемая для нумерации счетов в этом журнале" #. module: account #: view:account.account:0 @@ -5549,7 +5549,7 @@ msgstr "Список счетов" #: view:product.product:0 #: view:product.template:0 msgid "Sales Properties" -msgstr "" +msgstr "Свойства продаж" #. module: account #: rml:account.general.journal:0 @@ -5565,12 +5565,12 @@ msgstr "Книга расходов (только количество)" #. module: account #: wizard_view:account.move.validate,init:0 msgid "Validate Account Entries" -msgstr "" +msgstr "Утвердить проводки" #. module: account #: selection:account.print.journal.report,init,sort_selection:0 msgid "Reference Number" -msgstr "" +msgstr "Ссылка" #. module: account #: rml:account.overdue:0 @@ -5586,7 +5586,7 @@ msgstr "" #. module: account #: model:ir.actions.act_window,name:account.action_account_analytic_journal_open_form msgid "Entries of Open Analytic Journals" -msgstr "" +msgstr "Проводки открытых журналов аналитики" #. module: account #: view:account.invoice.tax:0 @@ -5601,7 +5601,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 @@ -5624,12 +5624,12 @@ msgstr "Начало периода" #. module: account #: model:ir.ui.menu,name:account.account_template_folder msgid "Templates" -msgstr "" +msgstr "Шаблоны" #. module: account #: wizard_button:account.vat.declaration,init,report:0 msgid "Print VAT Decl." -msgstr "" +msgstr "Печать декл. НДС" #. module: account #: model:ir.actions.report.xml,name:account.account_intracom @@ -5682,7 +5682,7 @@ msgstr "Шаблоны для плана счетов" #. module: account #: view:account.config.wizard:0 msgid "Account Configure" -msgstr "" +msgstr "Настройка счета" #. module: account #: help:res.partner,property_account_payable:0 diff --git a/addons/base_calendar/i18n/nl.po b/addons/base_calendar/i18n/nl.po index 678032a17bd..75ca37ec081 100644 --- a/addons/base_calendar/i18n/nl.po +++ b/addons/base_calendar/i18n/nl.po @@ -8,32 +8,32 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2010-08-19 12:50+0000\n" -"PO-Revision-Date: 2010-09-16 12:31+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2010-10-03 20:01+0000\n" +"Last-Translator: Wouter Schrijvers \n" "Language-Team: Dutch \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-29 05:17+0000\n" +"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base_calendar #: selection:calendar.alarm,trigger_related:0 #: selection:res.alarm,trigger_related:0 msgid "The event starts" -msgstr "" +msgstr "De activiteit begint" #. module: base_calendar #: selection:base.calendar.set.exrule,freq:0 #: selection:calendar.event,freq:0 #: selection:calendar.todo,freq:0 msgid "Hourly" -msgstr "" +msgstr "Ieder uur" #. module: base_calendar #: view:calendar.attendee:0 msgid "Required to Join" -msgstr "" +msgstr "Deelname vereist" #. module: base_calendar #: help:calendar.event,exdate:0 @@ -42,11 +42,13 @@ msgid "" "This property defines the list of date/time exceptions for a recurring " "calendar component." msgstr "" +"Hiermee bepaalt u de datum/tijd-uitzonderingslijst voor een terugkerend " +"kalender-item" #. module: base_calendar #: field:calendar.event.edit.all,name:0 msgid "Title" -msgstr "" +msgstr "Titel" #. module: base_calendar #: selection:base.calendar.set.exrule,freq:0 @@ -55,50 +57,50 @@ msgstr "" #: selection:calendar.todo,freq:0 #: selection:calendar.todo,rrule_type:0 msgid "Monthly" -msgstr "" +msgstr "Maandelijks" #. module: base_calendar #: view:calendar.attendee:0 msgid "Invited User" -msgstr "" +msgstr "Uitgenodigde gebruikers" #. module: base_calendar #: model:ir.actions.act_window,name:base_calendar.action_res_alarm_view #: model:ir.ui.menu,name:base_calendar.menu_crm_meeting_avail_alarm msgid "Alarms" -msgstr "" +msgstr "Herinneringen" #. module: base_calendar #: selection:base.calendar.set.exrule,week_list:0 #: selection:calendar.event,week_list:0 #: selection:calendar.todo,week_list:0 msgid "Sunday" -msgstr "" +msgstr "zondag" #. module: base_calendar #: view:calendar.attendee:0 #: field:calendar.attendee,role:0 msgid "Role" -msgstr "" +msgstr "Functie" #. module: base_calendar #: view:calendar.attendee:0 #: view:calendar.event:0 msgid "Invitation details" -msgstr "" +msgstr "Details uitnodiging" #. module: base_calendar #: selection:base.calendar.set.exrule,byday:0 #: selection:calendar.event,byday:0 #: selection:calendar.todo,byday:0 msgid "Fourth" -msgstr "" +msgstr "vierde" #. module: base_calendar #: field:calendar.event,show_as:0 #: field:calendar.todo,show_as:0 msgid "Show as" -msgstr "" +msgstr "Weergeven als" #. module: base_calendar #: field:base.calendar.set.exrule,day:0 @@ -108,52 +110,52 @@ msgstr "" #: field:calendar.todo,day:0 #: selection:calendar.todo,select1:0 msgid "Date of month" -msgstr "" +msgstr "Dag van de maand" #. module: base_calendar #: selection:calendar.event,class:0 #: selection:calendar.todo,class:0 msgid "Public" -msgstr "" +msgstr "Openbaar" #. module: base_calendar #: selection:calendar.alarm,trigger_interval:0 #: selection:res.alarm,trigger_interval:0 msgid "Hours" -msgstr "" +msgstr "Uren" #. module: base_calendar #: selection:base.calendar.set.exrule,month_list:0 #: selection:calendar.event,month_list:0 #: selection:calendar.todo,month_list:0 msgid "March" -msgstr "" +msgstr "maart" #. module: base_calendar #: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:0 #, python-format msgid "Warning !" -msgstr "" +msgstr "Waarschuwing !" #. module: base_calendar #: selection:base.calendar.set.exrule,week_list:0 #: selection:calendar.event,week_list:0 #: selection:calendar.todo,week_list:0 msgid "Friday" -msgstr "" +msgstr "vrijdag" #. module: base_calendar #: field:calendar.event,allday:0 #: field:calendar.todo,allday:0 msgid "All Day" -msgstr "" +msgstr "Hele dag" #. module: base_calendar #: field:base.calendar.set.exrule,select1:0 #: field:calendar.event,select1:0 #: field:calendar.todo,select1:0 msgid "Option" -msgstr "" +msgstr "Optie" #. module: base_calendar #: selection:calendar.attendee,availability:0 @@ -161,12 +163,12 @@ msgstr "" #: selection:calendar.todo,show_as:0 #: selection:res.users,availability:0 msgid "Free" -msgstr "" +msgstr "Vrij" #. module: base_calendar #: help:calendar.attendee,rsvp:0 msgid "Indicats whether the favor of a reply is requested" -msgstr "" +msgstr "Geeft aan of een antwoordverzoek gevraagd wordt" #. module: base_calendar #: model:ir.model,name:base_calendar.model_ir_attachment @@ -176,32 +178,32 @@ msgstr "" #. module: base_calendar #: help:calendar.attendee,delegated_to:0 msgid "The users that the original request was delegated to" -msgstr "" +msgstr "De gebruikers aan wie het oorspronkelijke verzoek toegewezen was" #. module: base_calendar #: view:calendar.attendee:0 #: field:calendar.attendee,delegated_to:0 msgid "Delegated To" -msgstr "" +msgstr "Toegewezen aan" #. module: base_calendar #: field:base.calendar.set.exrule,we:0 #: field:calendar.event,we:0 #: field:calendar.todo,we:0 msgid "Wed" -msgstr "" +msgstr "woe" #. module: base_calendar #: view:calendar.event:0 msgid "Show time as" -msgstr "" +msgstr "Tijd weergeven als" #. module: base_calendar #: field:base.calendar.set.exrule,tu:0 #: field:calendar.event,tu:0 #: field:calendar.todo,tu:0 msgid "Tue" -msgstr "" +msgstr "din" #. module: base_calendar #: selection:base.calendar.set.exrule,freq:0 @@ -210,43 +212,43 @@ msgstr "" #: selection:calendar.todo,freq:0 #: selection:calendar.todo,rrule_type:0 msgid "Yearly" -msgstr "" +msgstr "Jaarlijks" #. module: base_calendar #: selection:calendar.alarm,trigger_related:0 #: selection:res.alarm,trigger_related:0 msgid "The event ends" -msgstr "" +msgstr "De activiteit eindigt" #. module: base_calendar #: selection:base.calendar.set.exrule,byday:0 #: selection:calendar.event,byday:0 #: selection:calendar.todo,byday:0 msgid "Last" -msgstr "" +msgstr "Laatste" #. module: base_calendar #: help:calendar.attendee,state:0 msgid "Status of the attendee's participation" -msgstr "" +msgstr "Deelnamestatus genodigde" #. module: base_calendar #: selection:calendar.attendee,cutype:0 msgid "Room" -msgstr "" +msgstr "Zaal" #. module: base_calendar #: selection:calendar.alarm,trigger_interval:0 #: selection:res.alarm,trigger_interval:0 msgid "Days" -msgstr "" +msgstr "dagen" #. module: base_calendar #: selection:base.calendar.set.exrule,freq:0 #: selection:calendar.event,freq:0 #: selection:calendar.todo,freq:0 msgid "No Repeat" -msgstr "" +msgstr "Niet terugkerend" #. module: base_calendar #: code:addons/base_calendar/base_calendar.py:0 @@ -254,74 +256,74 @@ msgstr "" #: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:0 #, python-format msgid "Error!" -msgstr "" +msgstr "Fout!" #. module: base_calendar #: selection:calendar.attendee,role:0 msgid "Chair Person" -msgstr "" +msgstr "Voorzitter" #. module: base_calendar #: selection:calendar.alarm,action:0 msgid "Procedure" -msgstr "" +msgstr "Werkwijze" #. module: base_calendar #: view:calendar.event:0 msgid "Select data for Custom Rule" -msgstr "" +msgstr "Selecteer gegevens voor aangepaste regel" #. module: base_calendar #: selection:calendar.event,state:0 #: selection:calendar.todo,state:0 msgid "Cancelled" -msgstr "" +msgstr "Geannuleerd" #. module: base_calendar #: selection:calendar.alarm,trigger_interval:0 #: selection:res.alarm,trigger_interval:0 msgid "Minutes" -msgstr "" +msgstr "Minuten" #. module: base_calendar #: selection:calendar.alarm,action:0 msgid "Display" -msgstr "" +msgstr "Weergave" #. module: base_calendar #: view:calendar.event.edit.all:0 msgid "Edit all Occurrences" -msgstr "" +msgstr "Reeks bewerken" #. module: base_calendar #: view:calendar.attendee:0 msgid "Invitation type" -msgstr "" +msgstr "Soort uitnodiging" #. module: base_calendar #: selection:base.calendar.set.exrule,freq:0 #: selection:calendar.event,freq:0 #: selection:calendar.todo,freq:0 msgid "Secondly" -msgstr "" +msgstr "Per seconde" #. module: base_calendar #: field:calendar.alarm,event_date:0 #: field:calendar.attendee,event_date:0 #: view:calendar.event:0 msgid "Event Date" -msgstr "" +msgstr "Datum activiteit" #. module: base_calendar #: view:calendar.attendee:0 #: view:calendar.event:0 msgid "Group By..." -msgstr "" +msgstr "Groepeer op.." #. module: base_calendar #: help:calendar.attendee,partner_id:0 msgid "Partner related to contact" -msgstr "" +msgstr "Relatie gekoppeld aan contactpersoon" #. module: base_calendar #: help:calendar.attendee,cutype:0 @@ -339,34 +341,34 @@ msgstr "" #: field:calendar.alarm,event_end_date:0 #: field:calendar.attendee,event_end_date:0 msgid "Event End Date" -msgstr "" +msgstr "Einddatum activiteit" #. module: base_calendar #: selection:calendar.attendee,role:0 msgid "Optional Participation" -msgstr "" +msgstr "Deelname optioneel" #. module: base_calendar #: field:calendar.event,date_deadline:0 #: field:calendar.todo,date_deadline:0 msgid "Deadline" -msgstr "" +msgstr "Uiterste datum" #. module: base_calendar #: code:addons/base_calendar/base_calendar.py:0 #, python-format msgid "Warning!" -msgstr "" +msgstr "Waarschuwing!" #. module: base_calendar #: view:base.calendar.set.exrule:0 msgid "_Cancel" -msgstr "" +msgstr "_Annuleren" #. module: base_calendar #: model:ir.module.module,shortdesc:base_calendar.module_meta_information msgid "Basic Calendar Functionality" -msgstr "" +msgstr "Basis kalender functionaliteit" #. module: base_calendar #: field:calendar.event,organizer:0 @@ -374,7 +376,7 @@ msgstr "" #: field:calendar.todo,organizer:0 #: field:calendar.todo,organizer_id:0 msgid "Organizer" -msgstr "" +msgstr "Organisator" #. module: base_calendar #: code:addons/base_calendar/base_calendar.py:0 @@ -382,76 +384,76 @@ msgstr "" #: model:res.request.link,name:base_calendar.request_link_meeting #, python-format msgid "Event" -msgstr "" +msgstr "Activiteit" #. module: base_calendar #: selection:calendar.alarm,trigger_occurs:0 #: selection:res.alarm,trigger_occurs:0 msgid "Before" -msgstr "" +msgstr "Vóór" #. module: base_calendar #: view:calendar.event:0 #: selection:calendar.event,state:0 #: selection:calendar.todo,state:0 msgid "Confirmed" -msgstr "" +msgstr "Bevestigd" #. module: base_calendar #: model:ir.actions.act_window,name:base_calendar.action_calendar_event_edit_all msgid "Edit all events" -msgstr "" +msgstr "Reeks bewerken" #. module: base_calendar #: field:calendar.alarm,attendee_ids:0 #: field:calendar.event,attendee_ids:0 #: field:calendar.todo,attendee_ids:0 msgid "Attendees" -msgstr "" +msgstr "Deelnemers" #. module: base_calendar #: constraint:ir.actions.act_window:0 msgid "Invalid model name in the action definition." -msgstr "" +msgstr "Ongeldige modelnaam in de actie-definiëring." #. module: base_calendar #: view:calendar.event:0 msgid "Confirm" -msgstr "" +msgstr "Bevestigen" #. module: base_calendar #: model:ir.model,name:base_calendar.model_calendar_todo msgid "Calendar Task" -msgstr "" +msgstr "Kalender-taak" #. module: base_calendar #: field:base.calendar.set.exrule,su:0 #: field:calendar.event,su:0 #: field:calendar.todo,su:0 msgid "Sun" -msgstr "" +msgstr "zon" #. module: base_calendar #: field:calendar.attendee,cutype:0 msgid "Invite Type" -msgstr "" +msgstr "Type uitnodiging" #. module: base_calendar #: view:res.alarm:0 msgid "Reminder details" -msgstr "" +msgstr "Details herinnering" #. module: base_calendar #: field:calendar.attendee,parent_ids:0 msgid "Delegrated From" -msgstr "" +msgstr "Toegewezen door" #. module: base_calendar #: selection:base.calendar.set.exrule,select1:0 #: selection:calendar.event,select1:0 #: selection:calendar.todo,select1:0 msgid "Day of month" -msgstr "" +msgstr "Dag van de maand" #. module: base_calendar #: view:calendar.event:0 @@ -459,94 +461,94 @@ msgstr "" #: field:calendar.event.edit.all,location:0 #: field:calendar.todo,location:0 msgid "Location" -msgstr "" +msgstr "Plaats" #. module: base_calendar #: field:base_calendar.invite.attendee,send_mail:0 msgid "Send mail?" -msgstr "" +msgstr "E-mail sturen?" #. module: base_calendar #: field:base_calendar.invite.attendee,email:0 #: selection:calendar.alarm,action:0 #: field:calendar.attendee,email:0 msgid "Email" -msgstr "" +msgstr "E-mail" #. module: base_calendar #: view:calendar.attendee:0 msgid "Event Detail" -msgstr "" +msgstr "Detail activiteit" #. module: base_calendar #: selection:calendar.alarm,state:0 msgid "Run" -msgstr "" +msgstr "Uitvoeren" #. module: base_calendar #: model:ir.model,name:base_calendar.model_calendar_alarm msgid "Event alarm information" -msgstr "" +msgstr "Informatie herinnering activiteit" #. module: base_calendar #: selection:calendar.event,class:0 #: selection:calendar.todo,class:0 msgid "Confidential" -msgstr "" +msgstr "Vertrouwelijk" #. module: base_calendar #: field:base.calendar.set.exrule,end_date:0 #: field:calendar.event,end_date:0 #: field:calendar.todo,end_date:0 msgid "Repeat Until" -msgstr "" +msgstr "Herhaal tot" #. module: base_calendar #: view:calendar.event:0 msgid "Visibility" -msgstr "" +msgstr "Zichtbaarheid" #. module: base_calendar #: field:calendar.attendee,rsvp:0 msgid "Required Reply?" -msgstr "" +msgstr "Antwoord vereist?" #. module: base_calendar #: field:calendar.event,base_calendar_url:0 #: field:calendar.todo,base_calendar_url:0 msgid "Caldav URL" -msgstr "" +msgstr "Caldav URL" #. module: base_calendar #: field:calendar.event,recurrent_uid:0 #: field:calendar.todo,recurrent_uid:0 msgid "Recurrent ID" -msgstr "" +msgstr "Terugkerend ID" #. module: base_calendar #: selection:base.calendar.set.exrule,month_list:0 #: selection:calendar.event,month_list:0 #: selection:calendar.todo,month_list:0 msgid "July" -msgstr "" +msgstr "juli" #. module: base_calendar #: view:calendar.attendee:0 #: selection:calendar.attendee,state:0 msgid "Accepted" -msgstr "" +msgstr "Geaccepteerd" #. module: base_calendar #: field:base.calendar.set.exrule,th:0 #: field:calendar.event,th:0 #: field:calendar.todo,th:0 msgid "Thu" -msgstr "" +msgstr "don" #. module: base_calendar #: field:calendar.attendee,child_ids:0 msgid "Delegrated To" -msgstr "" +msgstr "Toegewezen aan" #. module: base_calendar #: constraint:ir.cron:0 @@ -556,29 +558,29 @@ msgstr "" #. module: base_calendar #: view:calendar.attendee:0 msgid "Required Reply" -msgstr "" +msgstr "Antwoord vereist" #. module: base_calendar #: constraint:ir.ui.view:0 msgid "Invalid XML for View Architecture!" -msgstr "" +msgstr "Ongeldige XML, kan overzicht niet weergeven!" #. module: base_calendar #: selection:calendar.attendee,role:0 msgid "Participation required" -msgstr "" +msgstr "Deelname vereist" #. module: base_calendar #: field:calendar.event,create_date:0 #: field:calendar.todo,create_date:0 msgid "Created" -msgstr "" +msgstr "Aangemaakt" #. module: base_calendar #: selection:calendar.event,class:0 #: selection:calendar.todo,class:0 msgid "Private" -msgstr "" +msgstr "Privé" #. module: base_calendar #: selection:base.calendar.set.exrule,freq:0 @@ -587,43 +589,43 @@ msgstr "" #: selection:calendar.todo,freq:0 #: selection:calendar.todo,rrule_type:0 msgid "Daily" -msgstr "" +msgstr "Dagelijks" #. module: base_calendar #: code:addons/base_calendar/base_calendar.py:0 #, python-format msgid "Can not Duplicate" -msgstr "" +msgstr "Kopiëren niet mogelijk" #. module: base_calendar #: field:calendar.event,class:0 #: field:calendar.todo,class:0 msgid "Mark as" -msgstr "" +msgstr "Markeren als" #. module: base_calendar #: view:calendar.attendee:0 #: field:calendar.attendee,partner_address_id:0 msgid "Contact" -msgstr "" +msgstr "Contactpersoon" #. module: base_calendar #: view:calendar.attendee:0 #: view:calendar.event:0 msgid "Delegate" -msgstr "" +msgstr "Toewijzen" #. module: base_calendar #: field:base_calendar.invite.attendee,partner_id:0 #: view:calendar.attendee:0 #: field:calendar.attendee,partner_id:0 msgid "Partner" -msgstr "" +msgstr "Partner" #. module: base_calendar #: view:base.calendar.set.exrule:0 msgid "Select data for ExRule" -msgstr "" +msgstr "Selecteer gegevens voor uitzondering regel" #. module: base_calendar #: view:base_calendar.invite.attendee:0 diff --git a/addons/decimal_precision/i18n/nl.po b/addons/decimal_precision/i18n/nl.po index 431ea9885b1..4e1e3e4fa0c 100644 --- a/addons/decimal_precision/i18n/nl.po +++ b/addons/decimal_precision/i18n/nl.po @@ -8,46 +8,47 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2010-08-20 05:24+0000\n" -"PO-Revision-Date: 2010-09-12 15:18+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2010-10-03 20:06+0000\n" +"Last-Translator: Wouter Schrijvers \n" "Language-Team: Dutch \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-29 05:17+0000\n" +"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: decimal_precision #: field:decimal.precision,digits:0 msgid "Digits" -msgstr "" +msgstr "Cijfers" #. module: decimal_precision #: constraint:ir.ui.view:0 msgid "Invalid XML for View Architecture!" -msgstr "" +msgstr "Ongeldige XML, kan overzicht niet weergeven!" #. module: decimal_precision #: constraint:ir.model:0 msgid "" "The Object name must start with x_ and not contain any special character !" msgstr "" +"De Objectnaam moet starten met x_ en mag geen speciale tekens bevatten!" #. module: decimal_precision #: constraint:ir.actions.act_window:0 msgid "Invalid model name in the action definition." -msgstr "" +msgstr "Ongeldige modelnaam in de actie-definiëring." #. module: decimal_precision #: view:decimal.precision:0 msgid "Decimal Precision" -msgstr "" +msgstr "Decimale precisie" #. module: decimal_precision #: model:ir.actions.act_window,name:decimal_precision.action_decimal_precision_form #: model:ir.ui.menu,name:decimal_precision.menu_decimal_precision_form msgid "Decimal Accuracy Definitions" -msgstr "" +msgstr "Decimale nauwkeurigheid definities" #. module: decimal_precision #: model:ir.module.module,description:decimal_precision.module_meta_information @@ -63,19 +64,19 @@ msgstr "" #. module: decimal_precision #: constraint:ir.ui.menu:0 msgid "Error ! You can not create recursive Menu." -msgstr "" +msgstr "Fout ! U kunt geen recursief Menu maken." #. module: decimal_precision #: field:decimal.precision,name:0 msgid "Usage" -msgstr "" +msgstr "Gebruik" #. module: decimal_precision #: model:ir.module.module,shortdesc:decimal_precision.module_meta_information msgid "Decimal Precision Configuration" -msgstr "" +msgstr "Decimale precisie configuratie" #. module: decimal_precision #: model:ir.model,name:decimal_precision.model_decimal_precision msgid "decimal.precision" -msgstr "" +msgstr "decimal.precision" diff --git a/addons/multi_company/i18n/pl.po b/addons/multi_company/i18n/pl.po index 0a17c09f9e1..fc484c47afb 100644 --- a/addons/multi_company/i18n/pl.po +++ b/addons/multi_company/i18n/pl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-12-08 11:46+0000\n" -"PO-Revision-Date: 2010-08-03 08:13+0000\n" -"Last-Translator: mga (Open ERP) \n" +"PO-Revision-Date: 2010-10-03 15:55+0000\n" +"Last-Translator: Naven \n" "Language-Team: Polish \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-29 05:16+0000\n" +"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: multi_company @@ -83,6 +83,9 @@ msgid "" " the default value for each object\n" " " msgstr "" +"Ten moduł daje możliwość łatwego zarządzania \n" +" standardową wartością dla każdego objektu\n" +" " #. module: multi_company #: field:multi_company.default,company_id:0 diff --git a/addons/sale/i18n/vi.po b/addons/sale/i18n/vi.po index ff262000409..b3cabdca617 100644 --- a/addons/sale/i18n/vi.po +++ b/addons/sale/i18n/vi.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-02 08:58+0000\n" +"PO-Revision-Date: 2010-10-03 07:41+0000\n" "Last-Translator: Phong Nguyen \n" "Language-Team: Vietnamese \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-03 04:57+0000\n" +"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: sale @@ -570,7 +570,7 @@ msgstr "" #. module: sale #: wizard_view:sale.advance_payment_inv,create:0 msgid "Invoices" -msgstr "" +msgstr "Hóa đơn" #. module: sale #: view:sale.order:0 @@ -595,7 +595,7 @@ msgstr "" #. module: sale #: field:sale.order.line,product_packaging:0 msgid "Packaging" -msgstr "" +msgstr "Đóng gói" #. module: sale #: model:ir.module.module,shortdesc:sale.module_meta_information From 47593a3fc0d77123e20c4d48e37aa10321fa0f7a Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 09:26:51 +0200 Subject: [PATCH 03/39] [IMP] account: 'invoice' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004072651-f0rl5hrk47a7nbb7 --- addons/account/report/invoice.rml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index 6c3c6fc01c3..173cbd1e6c4 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -232,10 +232,10 @@ [[ formatLang(l.price_unit) ]][[ o.currency_id.symbol ]] - [[ formatLang(l.discount) ]] + [[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] - [[ formatLang(l.price_subtotal) ]] [[ o.currency_id.symbol ]] + [[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -294,7 +294,7 @@ Taxes: - [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -338,7 +338,7 @@ [[ t.name ]] - [[ formatLang(t.base) ]] [[ o.currency_id.symbol ]] + [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] [[ o.currency_id.symbol ]] @@ -373,4 +373,4 @@ - \ No newline at end of file + From 3752cffff4958a1d5dd7bb72d2493ef2b37d8238 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 09:27:25 +0200 Subject: [PATCH 04/39] [IMP] report_intrastat: 'invoice' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004072725-girgktjguibvee8q --- addons/report_intrastat/report/invoice.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index 8e4f92da708..08a1ab14fe0 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -488,7 +488,7 @@ - [[ format(o.amount_tax or removeParentNode('blockTable')) ]] + [[ o.amount_tax and formatLang(o.amount_tax, digits=get_digits(dp='Account')) or removeParentNode('blockTable') ]] @@ -516,10 +516,10 @@ [[ t.name ]] - [[ formatLang(t.base) ]] + [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] - [[ formatLang(t.amount) or 0.00 ]] + [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] From ec3f4d65988a005f257b8091e7eaadb9ed3393a6 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 09:58:27 +0200 Subject: [PATCH 05/39] [IMP] pep8 (before improvement) bzr revid: olt@tinyerp.com-20101004075827-x3yr8cwrx0decxxz --- .../report/special_message_invoice.py | 180 +++++++++--------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py index 7051483828b..db027469373 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.py +++ b/addons/account_invoice_layout/report/special_message_invoice.py @@ -24,6 +24,7 @@ import time from report import report_sxw import pooler + class account_invoice_with_message(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(account_invoice_with_message, self).__init__(cr, uid, name, context=context) @@ -40,115 +41,114 @@ class account_invoice_with_message(report_sxw.rml_parse): msg = account_msg_data.msg return msg - - def invoice_lines(self,invoice): - result =[] - sub_total={} - info=[] - invoice_list=[] - res={} - list_in_seq={} + def invoice_lines(self, invoice): + result = [] + sub_total = {} + info = [] + invoice_list = [] + res = {} + list_in_seq = {} ids = self.pool.get('account.invoice.line').search(self.cr, self.uid, [('invoice_id', '=', invoice.id)]) ids.sort() - for id in range(0,len(ids)): - info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) - list_in_seq[info]=info.sequence - i=1 - j=0 + for id in range(0, len(ids)): + info = self.pool.get('account.invoice.line').browse(self.cr, self.uid, ids[id], self.context.copy()) + list_in_seq[info] = info.sequence + i = 1 + j = 0 final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) - invoice_list=[x[0] for x in final] - sum_flag={} - sum_flag[j]=-1 + invoice_list = [x[0] for x in final] + sum_flag = {} + sum_flag[j] = -1 for entry in invoice_list: - res={} + res = {} - if entry.state=='article': + if entry.state == 'article': self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,)) - tax_ids=self.cr.fetchall() + tax_ids = self.cr.fetchall() - if tax_ids==[]: - res['tax_types']='' + if tax_ids == []: + res['tax_types'] = '' else: - tax_names_dict={} - for item in range(0,len(tax_ids)) : + tax_names_dict = {} + for item in range(0, len(tax_ids)): self.cr.execute('select name from account_tax where id=%s', (tax_ids[item][0],)) - type=self.cr.fetchone() - tax_names_dict[item] =type[0] - tax_names = ','.join([tax_names_dict[x] for x in range(0,len(tax_names_dict))]) - res['tax_types']=tax_names - res['name']=entry.name - res['quantity']="%.2f"%(entry.quantity) - res['price_unit']="%.2f"%(entry.price_unit) - res['discount']="%.2f"%(entry.discount) - res['price_subtotal']="%.2f"%(entry.price_subtotal) - sub_total[i]=entry.price_subtotal - i=i+1 - res['note']=entry.note - res['currency']=invoice.currency_id.symbol - res['type']=entry.state + type = self.cr.fetchone() + tax_names_dict[item] = type[0] + tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))]) + res['tax_types'] = tax_names + res['name'] = entry.name + res['quantity'] = "%.2f" % (entry.quantity) + res['price_unit'] = "%.2f" % (entry.price_unit) + res['discount'] = "%.2f" % (entry.discount) + res['price_subtotal'] = "%.2f" % (entry.price_subtotal) + sub_total[i] = entry.price_subtotal + i = i + 1 + res['note'] = entry.note + res['currency'] = invoice.currency_id.symbol + res['type'] = entry.state - if entry.uos_id.id==False: - res['uos']='' + if entry.uos_id.id == False: + res['uos'] = '' else: uos_name = self.pool.get('product.uom').read(self.cr, self.uid, entry.uos_id.id, ['name'], self.context.copy()) - res['uos']=uos_name['name'] + res['uos'] = uos_name['name'] else: - res['quantity']='' - res['price_unit']='' - res['discount']='' - res['tax_types']='' - res['type']=entry.state - res['note']=entry.note - res['uos']='' + res['quantity'] = '' + res['price_unit'] = '' + res['discount'] = '' + res['tax_types'] = '' + res['type'] = entry.state + res['note'] = entry.note + res['uos'] = '' - if entry.state=='subtotal': - res['name']=entry.name - sum=0 - sum_id=0 - if sum_flag[j]==-1: - temp=1 + if entry.state == 'subtotal': + res['name'] = entry.name + sum = 0 + sum_id = 0 + if sum_flag[j] == -1: + temp = 1 else: - temp=sum_flag[j] + temp = sum_flag[j] - for sum_id in range(temp,len(sub_total)+1): - sum+=sub_total[sum_id] - sum_flag[j+1]= sum_id +1 + for sum_id in range(temp, len(sub_total)+1): + sum += sub_total[sum_id] + sum_flag[j+1] = sum_id +1 - j=j+1 - res['price_subtotal']="%.2f"%(sum) - res['currency']=invoice.currency_id.symbol - res['quantity']='' - res['price_unit']='' - res['discount']='' - res['tax_types']='' - res['uos']='' - elif entry.state=='title': - res['name']=entry.name - res['price_subtotal']='' - res['currency']='' - elif entry.state=='text': - res['name']=entry.name - res['price_subtotal']='' - res['currency']='' - elif entry.state=='line': - res['quantity']='_______________' - res['price_unit']='______________' - res['discount']='____________' - res['tax_types']='____________________' - res['uos']='_____' - res['name']='_______________________________________________' - res['price_subtotal']='____________' - res['currency']='____' - elif entry.state=='break': - res['type']=entry.state - res['name']=entry.name - res['price_subtotal']='' - res['currency']='' + j = j + 1 + res['price_subtotal'] = "%.2f" % (sum) + res['currency'] = invoice.currency_id.symbol + res['quantity'] = '' + res['price_unit'] = '' + res['discount'] = '' + res['tax_types'] = '' + res['uos'] = '' + elif entry.state == 'title': + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = '' + elif entry.state == 'text': + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = '' + elif entry.state == 'line': + res['quantity'] = '_______________' + res['price_unit'] = '______________' + res['discount'] = '____________' + res['tax_types'] = '____________________' + res['uos'] = '_____' + res['name'] = '_______________________________________________' + res['price_subtotal'] = '____________' + res['currency'] = '____' + elif entry.state == 'break': + res['type'] = entry.state + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = '' else: - res['name']=entry.name - res['price_subtotal']='' - res['currency']=invoice.currency_id.symbol + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = invoice.currency_id.symbol result.append(res) return result From 11e2c3201bc0628d9919243c75ff36665b899389 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 10:02:40 +0200 Subject: [PATCH 06/39] [IMP] account_invoice_layout: 'invoices with layout and message' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004080240-1wwa956apwdyi6uh --- .../report/special_message_invoice.py | 11 +++++------ .../report/special_message_invoice.rml | 12 ++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py index db027469373..bac4a467ae1 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.py +++ b/addons/account_invoice_layout/report/special_message_invoice.py @@ -55,7 +55,7 @@ class account_invoice_with_message(report_sxw.rml_parse): list_in_seq[info] = info.sequence i = 1 j = 0 - final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) + final = sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) invoice_list = [x[0] for x in final] sum_flag = {} sum_flag[j] = -1 @@ -77,10 +77,10 @@ class account_invoice_with_message(report_sxw.rml_parse): tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))]) res['tax_types'] = tax_names res['name'] = entry.name - res['quantity'] = "%.2f" % (entry.quantity) - res['price_unit'] = "%.2f" % (entry.price_unit) - res['discount'] = "%.2f" % (entry.discount) - res['price_subtotal'] = "%.2f" % (entry.price_subtotal) + res['quantity'] = self.formatLang(entry.quantity, digits=self.get_digits(dp='Account')) + res['price_unit'] = self.formatLang(entry.price_unit, digits=self.get_digits(dp='Account')) + res['discount'] = self.formatLang(entry.discount, digits=self.get_digits(dp='Account')) + res['price_subtotal'] = self.formatLang(entry.price_subtotal, digits=self.get_digits(dp='Account')) sub_total[i] = entry.price_subtotal i = i + 1 res['note'] = entry.note @@ -93,7 +93,6 @@ class account_invoice_with_message(report_sxw.rml_parse): uos_name = self.pool.get('product.uom').read(self.cr, self.uid, entry.uos_id.id, ['name'], self.context.copy()) res['uos'] = uos_name['name'] else: - res['quantity'] = '' res['price_unit'] = '' res['discount'] = '' diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml index 41775417161..8bea44a67f7 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.rml +++ b/addons/account_invoice_layout/report/special_message_invoice.rml @@ -380,7 +380,7 @@ Net Total: - [[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -395,7 +395,7 @@ Taxes: - [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -410,7 +410,7 @@ Total: - [[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -449,10 +449,10 @@ [[ t.name ]] - [[ formatLang(t.base) ]] + [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] + [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] @@ -500,4 +500,4 @@ - \ No newline at end of file + From 2b09325d6584fc62223b97503aad26937710179c Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 10:07:21 +0200 Subject: [PATCH 07/39] [IMP] pep8 (before improvement) bzr revid: olt@tinyerp.com-20101004080721-5c0zuemdsg0pzjit --- .../report/report_account_invoice_layout.py | 176 +++++++++--------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py index e28d98479b1..f7cae7a91c5 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.py +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py @@ -23,6 +23,7 @@ import time from report import report_sxw + class account_invoice_1(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(account_invoice_1, self).__init__(cr, uid, name, context=context) @@ -33,112 +34,111 @@ class account_invoice_1(report_sxw.rml_parse): self.context = context self._node = None - def invoice_lines(self,invoice): - result =[] - sub_total={} - info=[] - invoice_list=[] - res={} - list_in_seq={} + def invoice_lines(self, invoice): + result = [] + sub_total = {} + info = [] + invoice_list = [] + res = {} + list_in_seq = {} ids = self.pool.get('account.invoice.line').search(self.cr, self.uid, [('invoice_id', '=', invoice.id)]) ids.sort() - for id in range(0,len(ids)): + for id in range(0, len(ids)): info = self.pool.get('account.invoice.line').browse(self.cr, self.uid, ids[id], self.context.copy()) - list_in_seq[info]=info.sequence - i=1 - j=0 + list_in_seq[info] = info.sequence + i = 1 + j = 0 final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) - invoice_list=[x[0] for x in final] - sum_flag={} - sum_flag[j]=-1 + invoice_list = [x[0] for x in final] + sum_flag = {} + sum_flag[j] = -1 for entry in invoice_list: - res={} - if entry.state=='article': + res = {} + if entry.state == 'article': self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,)) - tax_ids=self.cr.fetchall() - if tax_ids==[]: - res['tax_types']='' + tax_ids = self.cr.fetchall() + if tax_ids == []: + res['tax_types'] = '' else: - tax_names_dict={} - for item in range(0,len(tax_ids)) : + tax_names_dict = {} + for item in range(0, len(tax_ids)): self.cr.execute('select name from account_tax where id=%s', (tax_ids[item][0],)) - type=self.cr.fetchone() - tax_names_dict[item] =type[0] - tax_names = ','.join([tax_names_dict[x] for x in range(0,len(tax_names_dict))]) - res['tax_types']=tax_names - res['name']=entry.name - res['quantity']="%.2f"%(entry.quantity) - res['price_unit']="%.2f"%(entry.price_unit) - res['discount']="%.2f"%(entry.discount) - res['price_subtotal']="%.2f"%(entry.price_subtotal) - sub_total[i]=entry.price_subtotal - i=i+1 - res['note']=entry.note - res['currency']=invoice.currency_id.symbol - res['type']=entry.state + type = self.cr.fetchone() + tax_names_dict[item] = type[0] + tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))]) + res['tax_types'] = tax_names + res['name'] = entry.name + res['quantity'] = "%.2f" % (entry.quantity) + res['price_unit'] = "%.2f" % (entry.price_unit) + res['discount'] = "%.2f" % (entry.discount) + res['price_subtotal'] = "%.2f" % (entry.price_subtotal) + sub_total[i] = entry.price_subtotal + i = i + 1 + res['note'] = entry.note + res['currency'] = invoice.currency_id.symbol + res['type'] = entry.state - if entry.uos_id.id==False: - res['uos']='' + if entry.uos_id.id == False: + res['uos'] = '' else: uos_name = self.pool.get('product.uom').read(self.cr, self.uid, entry.uos_id.id, ['name'], self.context.copy()) res['uos'] = uos_name['name'] else: + res['quantity'] = '' + res['price_unit'] = '' + res['discount'] = '' + res['tax_types'] = '' + res['type'] = entry.state + res['note'] = entry.note + res['uos'] = '' - res['quantity']='' - res['price_unit']='' - res['discount']='' - res['tax_types']='' - res['type']=entry.state - res['note']=entry.note - res['uos']='' - - if entry.state=='subtotal': - res['name']=entry.name - sum=0 - sum_id=0 - if sum_flag[j]==-1: - temp=1 + if entry.state == 'subtotal': + res['name'] = entry.name + sum = 0 + sum_id = 0 + if sum_flag[j] == -1: + temp = 1 else: - temp=sum_flag[j] + temp = sum_flag[j] - for sum_id in range(temp,len(sub_total)+1): - sum+=sub_total[sum_id] - sum_flag[j+1]= sum_id +1 + for sum_id in range(temp, len(sub_total)+1): + sum += sub_total[sum_id] + sum_flag[j+1] = sum_id +1 - j=j+1 - res['price_subtotal']="%.2f"%(sum) - res['currency']=invoice.currency_id.symbol - res['quantity']='' - res['price_unit']='' - res['discount']='' - res['tax_types']='' - res['uos']='' - elif entry.state=='title': - res['name']=entry.name - res['price_subtotal']='' - res['currency']='' - elif entry.state=='text': - res['name']=entry.name - res['price_subtotal']='' - res['currency']='' - elif entry.state=='line': - res['quantity']='_______________' - res['price_unit']='______________' - res['discount']='____________' - res['tax_types']='____________________' - res['uos']='_____' - res['name']='_______________________________________________' - res['price_subtotal']='____________' - res['currency']='____' - elif entry.state=='break': - res['type']=entry.state - res['name']=entry.name - res['price_subtotal']='' - res['currency']='' + j = j + 1 + res['price_subtotal'] = "%.2f" % (sum) + res['currency'] = invoice.currency_id.symbol + res['quantity'] = '' + res['price_unit'] = '' + res['discount'] = '' + res['tax_types'] = '' + res['uos'] = '' + elif entry.state == 'title': + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = '' + elif entry.state == 'text': + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = '' + elif entry.state == 'line': + res['quantity'] = '_______________' + res['price_unit'] = '______________' + res['discount'] = '____________' + res['tax_types'] = '____________________' + res['uos'] = '_____' + res['name'] = '_______________________________________________' + res['price_subtotal'] = '____________' + res['currency'] = '____' + elif entry.state == 'break': + res['type'] = entry.state + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = '' else: - res['name']=entry.name - res['price_subtotal']='' - res['currency']=invoice.currency_id.symbol + res['name'] = entry.name + res['price_subtotal'] = '' + res['currency'] = invoice.currency_id.symbol result.append(res) return result From 957c82182818ec1c7cfebbe11abc42624ea3d1bd Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 10:10:52 +0200 Subject: [PATCH 08/39] [IMP] account_invoice_layout: 'invoices wihh layout' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004081052-l12jti4h22ss3yez --- .../report/report_account_invoice_layout.py | 8 ++++---- .../report/report_account_invoice_layout.rml | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py index f7cae7a91c5..f61a05fd5f4 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.py +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py @@ -68,10 +68,10 @@ class account_invoice_1(report_sxw.rml_parse): tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))]) res['tax_types'] = tax_names res['name'] = entry.name - res['quantity'] = "%.2f" % (entry.quantity) - res['price_unit'] = "%.2f" % (entry.price_unit) - res['discount'] = "%.2f" % (entry.discount) - res['price_subtotal'] = "%.2f" % (entry.price_subtotal) + res['quantity'] = self.formatLang(entry.quantity, digits=self.get_digits(dp='Account')) + res['price_unit'] = self.formatLang(entry.price_unit, digits=self.get_digits(dp='Account')) + res['discount'] = self.formatLang(entry.discount, digits=self.get_digits(dp='Account')) + res['price_subtotal'] = self.formatLang(entry.price_subtotal, digits=self.get_digits(dp='Account')) sub_total[i] = entry.price_subtotal i = i + 1 res['note'] = entry.note diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index f92cd477f1a..3cd64a08b02 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -376,7 +376,7 @@ Net Total: - [[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -391,7 +391,7 @@ Taxes: - [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -406,7 +406,7 @@ Total: - [[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] @@ -445,10 +445,10 @@ [[ t.name ]] - [[ formatLang(t.base) ]] + [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] + [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] @@ -485,4 +485,4 @@ - \ No newline at end of file + From 58d8d88e28c480347effe9b5bb6565b78fe34542 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Mon, 4 Oct 2010 13:48:03 +0530 Subject: [PATCH 09/39] [FIX] Product : Corrected variable names lp bug: https://launchpad.net/bugs/653127 fixed bzr revid: jvo@tinyerp.com-20101004081803-zvv1050ygse3eb10 --- addons/product/pricelist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index a4b93827660..90d55d47251 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -222,7 +222,7 @@ class product_pricelist(osv.osv): price = 0.0 else: price_tmp = self.price_get(cr, uid, - [res['base_pricelist_id']], prod_id, + [res['base_pricelist_id']], product_id, qty)[res['base_pricelist_id']] ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False) @@ -388,7 +388,7 @@ class product_pricelist(osv.osv): price = 0.0 else: price_tmp = self.price_get(cr, uid, - [res['base_pricelist_id']], prod_id, + [res['base_pricelist_id']], product_id, qty)[res['base_pricelist_id']] ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False) From 9d3e1dbac2acc956409d7af0cb936c8e560ed734 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Mon, 4 Oct 2010 14:06:19 +0530 Subject: [PATCH 10/39] [FIX] account_payment : Fixed YML and demo data bzr revid: ach@tinyerp.com-20101004083619-inbqfcj8dv9my7l0 --- addons/account_payment/account_payment_demo.xml | 1 + addons/account_payment/test/account_payment.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml index 37705a05b07..65a8d341da4 100644 --- a/addons/account_payment/account_payment_demo.xml +++ b/addons/account_payment/account_payment_demo.xml @@ -6,6 +6,7 @@ 00987654321 bank + Direct Payment diff --git a/addons/account_payment/test/account_payment.yml b/addons/account_payment/test/account_payment.yml index e65b3ba0b89..3d863686847 100644 --- a/addons/account_payment/test/account_payment.yml +++ b/addons/account_payment/test/account_payment.yml @@ -9,6 +9,7 @@ partner_id: base.res_partner_9 sequence: 0.0 state: bank + bank: base.res_bank_1 - I created a new Payment Mode From 83582f7648ef1db067baa25d9616ef310c208abd Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 10:43:28 +0200 Subject: [PATCH 11/39] [FIX] stock: '_product_value' function: some ids were missing in the 'result' dict bzr revid: olt@tinyerp.com-20101004084328-l63el272pkzi2ua3 --- addons/stock/stock.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d73a842bedd..f5c4ebd41e3 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -110,7 +110,6 @@ class stock_location(osv.osv): @param field_names: Name of field @return: Dictionary of values """ - result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids]) product_product_obj = self.pool.get('product.product') @@ -118,6 +117,9 @@ class stock_location(osv.osv): res_products_by_location = sorted(cr.dictfetchall(), key=itemgetter('location_id')) products_by_location = dict((k, [v['product_id'] for v in itr]) for k, itr in groupby(res_products_by_location, itemgetter('location_id'))) + result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids]) + result.update(dict([(i, {}.fromkeys(field_names, 0.0)) for i in list(set([aaa['location_id'] for aaa in res_products_by_location]))])) + currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id currency_obj = self.pool.get('res.currency') currency = self.pool.get('res.currency').browse(cr, uid, currency_id) @@ -129,6 +131,8 @@ class stock_location(osv.osv): for prod in product_product_obj.browse(cr, uid, product_ids, context=c): for f in field_names: if f == 'stock_real': + if loc_id not in result: + result[loc_id] = {} result[loc_id][f] += prod.qty_available elif f == 'stock_virtual': result[loc_id][f] += prod.virtual_available From 1a13b57a8bf69a5d3e84e2c6b68a6d76bd02b7ae Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Mon, 4 Oct 2010 15:00:00 +0530 Subject: [PATCH 12/39] [REF] account : Corrections in account report bzr revid: ach@tinyerp.com-20101004093000-j71sohta6hsyem9t --- addons/account/report/rml_parse.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/report/rml_parse.py b/addons/account/report/rml_parse.py index cc8299bcecf..0c7018ae290 100644 --- a/addons/account/report/rml_parse.py +++ b/addons/account/report/rml_parse.py @@ -21,12 +21,10 @@ from report import report_sxw import xml.dom.minidom -import os, time +import time import osv import re -import tools import pooler -import re import sys From f80c5fbd121182206b18b74d04e5b7020cd53820 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Mon, 4 Oct 2010 15:28:13 +0530 Subject: [PATCH 13/39] [FIX] base_iban,hr_payroll : 'bank' added in res.partner.bank record in demo data bzr revid: ach@tinyerp.com-20101004095813-bo6h57yu6v26fku6 --- addons/base_iban/base_iban_data.xml | 1 + addons/hr_payroll/test/payslip.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/base_iban/base_iban_data.xml b/addons/base_iban/base_iban_data.xml index 678b798c82f..4269bb83ac6 100644 --- a/addons/base_iban/base_iban_data.xml +++ b/addons/base_iban/base_iban_data.xml @@ -8,6 +8,7 @@ IBAN Account iban + iban diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml index 705270d7c82..ca204a62241 100644 --- a/addons/hr_payroll/test/payslip.yml +++ b/addons/hr_payroll/test/payslip.yml @@ -9,6 +9,7 @@ sequence: 0.0 name: Fortis state: bank + bank: base.res_bank_1 - I create a new employee “Richard” - From f4fdbd27e44cb052a8e928f11a0b10a32ea4db41 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 11:06:31 +0200 Subject: [PATCH 14/39] [FIX] account_analytic_analysis: '_analysis_all' function: some ids were missing in the 'result' dict bzr revid: olt@tinyerp.com-20101004090631-e61vtc4vh3r5gh47 --- .../account_analytic_analysis.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 5a393e1dd83..e765989040b 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -66,6 +66,8 @@ class account_analytic_account(osv.osv): and invoice_id is not null \ GROUP BY account_analytic_line.account_id;", (parent_ids,)) for account_id, sum in cr.fetchall(): + if account_id not in res: + res[account_id] = {} res[account_id][f] = sum for account in accounts: for child in account.child_ids: @@ -102,6 +104,8 @@ class account_analytic_account(osv.osv): and account_analytic_journal.type in ('purchase','general') \ GROUP BY account_analytic_account.id;""", (parent_ids,)) for account_id, sum in cr.fetchall(): + if account_id not in res: + res[account_id] = {} res[account_id][f] = round(sum, dp) for account in accounts: @@ -142,6 +146,8 @@ class account_analytic_account(osv.osv): and invoice_id is null \ GROUP BY account_analytic_line.account_id" ,(parent_ids,)) for account_id, lwd in cr.fetchall(): + if account_id not in res: + res[account_id] = {} res[account_id][f] = lwd for account in accounts: for child in account.child_ids: @@ -161,6 +167,8 @@ class account_analytic_account(osv.osv): AND to_invoice IS NOT NULL \ GROUP BY account_analytic_line.account_id;",(parent_ids,)) for account_id, sua in cr.fetchall(): + if account_id not in res: + res[account_id] = {} res[account_id][f] = round(sua, dp) for account in accounts: for child in account.child_ids: @@ -181,10 +189,14 @@ class account_analytic_account(osv.osv): GROUP BY account_analytic_line.account_id",(parent_ids,)) ff = cr.fetchall() for account_id, hq in ff: + if account_id not in res: + res[account_id] = {} res[account_id][f] = round(hq, dp) for account in accounts: for child in account.child_ids: if account.id != child.id: + if account.id not in res: + res[account.id] = {f: 0.0} res[account.id][f] += res.get(child.id, {}).get(f, 0.0) for id in ids: res[id][f] = round(res[id][f], dp) @@ -223,6 +235,8 @@ class account_analytic_account(osv.osv): res2.setdefault(account.id, 0.0) for child in account.child_ids: if account.id != child.id: + if account.id not in res: + res[account.id] = {f: 0.0} res[account.id][f] += res.get(child.id, {}).get(f, 0.0) res[account.id][f] += res2.get(child.id, 0.0) From 52915deaabebd1d592e522ac04930591c55d9aaf Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 12:05:30 +0200 Subject: [PATCH 15/39] [IMP] account_invoice_layout: performance improvement: avoid 'name_get' in a loop bzr revid: olt@tinyerp.com-20101004100530-mqyjcts4e10c7qln --- .../account_invoice_layout.py | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/addons/account_invoice_layout/account_invoice_layout.py b/addons/account_invoice_layout/account_invoice_layout.py index adb80d787a0..2c2a02d4b9d 100644 --- a/addons/account_invoice_layout/account_invoice_layout.py +++ b/addons/account_invoice_layout/account_invoice_layout.py @@ -130,19 +130,22 @@ class account_invoice_line(osv.osv): default['state'] = self.browse(cr, uid, id).state return super(account_invoice_line, self).copy_data(cr, uid, id, default, context) - def _fnct(self, cr, uid, id, name, args, context=None): + def _fnct(self, cr, uid, ids, name, args, context=None): res = {} - for m in self.browse(cr, uid, id): - if m.state != 'article': - if m.state == 'line': - res[m.id] = '-----------------------------------------' - elif m.state == 'break': - res[m.id] = 'PAGE BREAK' + + lines = self.browse(cr, uid, ids) + account_ids = [line.account_id.id for line in lines] + account_names = dict(self.pool.get('account.account').name_get(cr, uid, account_ids, context=context)) + for line in lines: + if line.state != 'article': + if line.state == 'line': + res[line.id] = '-----------------------------------------' + elif line.state == 'break': + res[line.id] = 'PAGE BREAK' else: - res[m.id] = ' ' + res[line.id] = ' ' else: - [(temp)] = self.pool.get('account.account').name_get(cr, uid, [m.account_id.id], context=context) - res[m.id] = temp[1] + res[line.id] = account_names.get(line.account_id.id, '') return res _name = "account.invoice.line" @@ -205,4 +208,4 @@ class account_invoice(osv.osv): account_invoice() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 471df158540c3c264b72b036116e7fca0cd316dd Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 12:57:07 +0200 Subject: [PATCH 16/39] [IMP] stock: 'inventory' and 'inventory (with child locations)' now uses decimal.precision bzr revid: olt@tinyerp.com-20101004105707-l4sw0f0k6jxhao9e --- addons/stock/report/lot_overview.rml | 10 +++++----- addons/stock/report/lot_overview_all.rml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/stock/report/lot_overview.rml b/addons/stock/report/lot_overview.rml index f4332455cf9..cebacedeb01 100644 --- a/addons/stock/report/lot_overview.rml +++ b/addons/stock/report/lot_overview.rml @@ -167,10 +167,10 @@ [[formatLang( p['prod_qty']) ]] [[ p['uom'] ]] - [[ formatLang(p['price']) ]] + [[ formatLang(p['price'], digits=get_digits(dp='Account')) ]] - [[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]] + [[ formatLang(p['price_value'], digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol]] @@ -184,7 +184,7 @@ Total: - [[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(price_total(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]] @@ -201,7 +201,7 @@ - [[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(grand_total_price(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]] @@ -209,4 +209,4 @@ - \ No newline at end of file + diff --git a/addons/stock/report/lot_overview_all.rml b/addons/stock/report/lot_overview_all.rml index a0e58e8ce7d..4c4c71561a2 100644 --- a/addons/stock/report/lot_overview_all.rml +++ b/addons/stock/report/lot_overview_all.rml @@ -167,10 +167,10 @@ [[formatLang( p['prod_qty']) ]] [[ p['uom'] ]] - [[ formatLang(p['price']) ]] + [[ formatLang(p['price'], digits=get_digits(dp='Account')) ]] - [[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]] + [[ formatLang(p['price_value'], digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol]] @@ -184,7 +184,7 @@ Total: - [[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(price_total(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]] @@ -201,7 +201,7 @@ - [[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(grand_total_price(), digits=get_digits(dp='Account')) ]] [[ o.company_id.currency_id.symbol ]] @@ -209,4 +209,4 @@ - \ No newline at end of file + From dfc45323ffd28e0416e11b24cb6fd822d2a1d090 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:27:02 +0200 Subject: [PATCH 17/39] [IMP] sale_journal: 'picking journal' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004112702-w7wky190ntlexl7k --- .../report/picking_journal_report.py | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/addons/sale_journal/report/picking_journal_report.py b/addons/sale_journal/report/picking_journal_report.py index 0b447f45cce..74c00367838 100644 --- a/addons/sale_journal/report/picking_journal_report.py +++ b/addons/sale_journal/report/picking_journal_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,14 @@ # 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 . +# along with this program. If not, see . # ############################################################################## from osv import fields, osv import tools +from decimal_precision import decimal_precision as dp + class sale_journal_picking_report(osv.osv): """ @@ -30,32 +32,32 @@ class sale_journal_picking_report(osv.osv): _description = "Picking lists" _auto = False _columns = { - 'name': fields.char('Year', size=64, required=False, readonly=True), - 'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'), ('05', 'May'), ('06', 'June'), - ('07', 'July'), ('08', 'August'), ('09', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True), + 'name': fields.char('Year', size=64, required=False, readonly=True), + 'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'), ('05', 'May'), ('06', 'June'), + ('07', 'July'), ('08', 'August'), ('09', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True), 'invoice_state':fields.selection([ - ("invoiced", "invoiced"), - ("2binvoiced", "to be invoiced"), + ("invoiced", "invoiced"), + ("2binvoiced", "to be invoiced"), ("none", "None") - ], "Invoice state", readonly=True), + ], "Invoice state", readonly=True), 'state': fields.selection([ - ('draft', 'draft'), - ('auto', 'waiting'), - ('confirmed', 'confirmed'), - ('assigned', 'assigned'), - ('done', 'done'), - ('cancel', 'cancel'), - ], 'State', readonly=True), - 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoicing method', readonly=True), - 'journal_id': fields.many2one('sale_journal.picking.journal', 'Journal', readonly=True), - 'quantity': fields.float('Quantities', readonly=True), - 'price_total': fields.float('Total Price', readonly=True), - 'price_average': fields.float('Average Price', readonly=True), - 'count': fields.integer('# of Lines', readonly=True), + ('draft', 'draft'), + ('auto', 'waiting'), + ('confirmed', 'confirmed'), + ('assigned', 'assigned'), + ('done', 'done'), + ('cancel', 'cancel'), + ], 'State', readonly=True), + 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoicing method', readonly=True), + 'journal_id': fields.many2one('sale_journal.picking.journal', 'Journal', readonly=True), + 'quantity': fields.float('Quantities', readonly=True), + 'price_total': fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Sale Price')), + 'price_average': fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Sale Price')), + 'count': fields.integer('# of Lines', readonly=True), } _order = 'journal_id, name desc, price_total desc' - + def init(self, cr): tools.drop_view_if_exists(cr, 'sale_journal_picking_report') @@ -80,7 +82,7 @@ class sale_journal_picking_report(osv.osv): order by s.invoice_type_id, s.invoice_state, s.state ) """) - + sale_journal_picking_report() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 5b4f3944f6d02dc842d97bc00c31af74fc5cc68b Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:30:10 +0200 Subject: [PATCH 18/39] [IMP] report_intrastat: 'intrastat' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004113010-dj6i5kvfce5jnt1z --- addons/report_intrastat/report_intrastat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py index 90c2884cceb..a77c4f5d389 100644 --- a/addons/report_intrastat/report_intrastat.py +++ b/addons/report_intrastat/report_intrastat.py @@ -21,6 +21,7 @@ from osv import osv, fields from tools.sql import drop_view_if_exists +from decimal_precision import decimal_precision as dp class res_country(osv.osv): @@ -69,7 +70,7 @@ class report_intrastat(osv.osv): 'code': fields.char('Country code', size=2, readonly=True), 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True), 'weight': fields.float('Weight', readonly=True), - 'value': fields.float('Value', readonly=True), + 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Account')), 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'), 'currency_id': fields.many2one('res.currency', "Currency", readonly=True), } From 4e18d14a2a1416ec50757032c02d9eff44b5c65c Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:33:09 +0200 Subject: [PATCH 19/39] [IMP] stock: 'inventory analysis' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004113309-p5c8o6lf906edmqi --- addons/stock/report/report_stock_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index a96144060ca..a27e9f15202 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -21,6 +21,7 @@ import tools from osv import fields,osv +from decimal_precision import decimal_precision as dp class report_stock_move(osv.osv): @@ -44,7 +45,7 @@ class report_stock_move(osv.osv): 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True), 'product_qty_in':fields.integer('In Qty',readonly=True), 'product_qty_out':fields.integer('Out Qty',readonly=True), - 'value' : fields.float('Total Value', required=True), + 'value' : fields.float('Total Value', required=True, digits_compute=dp.get_precision('Sale Price')), 'day_diff2':fields.float('Delay (Days)',readonly=True, digits=(16,2), group_operator="avg"), 'day_diff1':fields.float('Planned (Days)',readonly=True, digits=(16,2), group_operator="avg"), 'day_diff':fields.float('Real (Days)',readonly=True, digits=(16,2), group_operator="avg"), From 8e1b7362c9acc00e6804f857e29a1d67142e1121 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:37:37 +0200 Subject: [PATCH 20/39] [IMP] stock: 'inventory analysis' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004113737-rms5p1vbty6fdkj9 --- addons/stock/report/report_stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index a27e9f15202..6907f4ed3d5 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -137,7 +137,7 @@ class report_stock_inventory(osv.osv): 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True), 'product_qty':fields.float('Qty', digits=(16,2), readonly=True), - 'value' : fields.float('Total Value', digits=(16,2), required=True), + 'value' : fields.float('Total Value', digits=(16,2), required=True, digits_compute=dp.get_precision('Sale Price')), 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True, help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\ \nThe state is \'Waiting\' if the move is waiting for another one.'), From d51ad12b0c17318118198286a61d85c7813aa5aa Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:48:19 +0200 Subject: [PATCH 21/39] [FIX] mrp_repair: don't try to compare a date object with a datetime object bzr revid: olt@tinyerp.com-20101004114819-0b8xhsjytfxgll8t --- addons/mrp_repair/mrp_repair.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index af88c32f42a..6cec29650f3 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -687,8 +687,9 @@ class mrp_repair_line(osv.osv, ProductChangeMixin): if type == 'add': stock_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Stock')])[0] to_invoice = False - if guarantee_limit and date.today() > datetime.strptime(guarantee_limit, '%Y-%m-%d'): + if guarantee_limit and datetime.strptime(date.today().strftime('%Y-%m-%d'), '%Y-%m-%d') > datetime.strptime(guarantee_limit, '%Y-%m-%d'): to_invoice=True + return {'value': { 'to_invoice': to_invoice, 'location_id': stock_id, From 3a378cef70d9591530f24e178937df2e39dc99c3 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:52:15 +0200 Subject: [PATCH 22/39] [IMP] mrp_repair: 'Repair Quotation' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004115215-caqr9sv7jcdgduoy --- addons/mrp_repair/report/order.py | 4 ++-- addons/mrp_repair/report/order.rml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/mrp_repair/report/order.py b/addons/mrp_repair/report/order.py index 3d6f9200dd8..d6edc1f01e4 100644 --- a/addons/mrp_repair/report/order.py +++ b/addons/mrp_repair/report/order.py @@ -33,9 +33,9 @@ class order(report_sxw.rml_parse): def total(self, repair): total = 0.0 for operation in repair.operations: - total+=operation.price_subtotal + total += operation.price_subtotal for fee in repair.fees_lines: - total+=fee.price_subtotal + total += fee.price_subtotal total = total + repair.amount_tax return total diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index 149a2650bfd..328b5e931ee 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -343,7 +343,7 @@ Net Total : - [[ formatLang(o.amount_untaxed)]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Sale Price'))]] [[ o.pricelist_id.currency_id. symbol ]] @@ -357,7 +357,7 @@ Taxes: - [[ formatLang(o.amount_tax)]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'))]] [[ o.pricelist_id.currency_id. symbol ]] @@ -370,7 +370,7 @@ Total : - [[ formatLang(total(o)) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(total(o), digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]] @@ -391,4 +391,4 @@ - \ No newline at end of file + From fae903c3eea3f86513814a8051a68b0a0287b288 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 14:18:31 +0200 Subject: [PATCH 23/39] [IMP] event: * price fields now uses decimal.precision (Sale Price) * removed 'Event Price' bzr revid: olt@tinyerp.com-20101004121831-y91de9ed1km551yq --- addons/event/event.py | 7 ++++--- addons/event/wizard/partner_event_registration.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/event/event.py b/addons/event/event.py index 7a6e904f6e3..ea4a9cf9b8b 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -28,6 +28,7 @@ import time import tools import decimal_precision as dp + class event_type(osv.osv): """ Event Type """ _name = 'event.type' @@ -225,7 +226,7 @@ class event_event(osv.osv): 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="The invoices of this event registration will be created with this Product. Thus it allows you to set the default label and the accounting info you want by default on these invoices."), 'note': fields.text('Notes', help="Description or Summary of Event", readonly=False, states={'done': [('readonly', True)]}), 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."), - 'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to"), + 'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to", digits_compute=dp.get_precision('Sale Price')), 'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who are giving speech on event."), 'speaker_ids':fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}), 'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}), @@ -306,8 +307,8 @@ class event_registration(osv.osv): 'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}), "partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}), "contact_id": fields.many2one('res.partner.contact', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id - "unit_price": fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Event Price'), readonly=True, states={'draft': [('readonly', False)]}), - 'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute= dp.get_precision('Event Price')), + "unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}), + 'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute=dp.get_precision('Sale Price')), "badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}), "event_product": fields.char("Invoice Name", size=128, readonly=True, states={'draft': [('readonly', False)]}), "tobe_invoiced": fields.boolean("To be Invoiced", readonly=True, states={'draft': [('readonly', False)]}), diff --git a/addons/event/wizard/partner_event_registration.py b/addons/event/wizard/partner_event_registration.py index 8462a812313..00f106ab8ae 100644 --- a/addons/event/wizard/partner_event_registration.py +++ b/addons/event/wizard/partner_event_registration.py @@ -24,6 +24,7 @@ import netsvc import tools from osv import fields, osv from tools.translate import _ +from decimal_precision import decimal_precision as dp class partner_event_registration(osv.osv_memory): @@ -36,7 +37,7 @@ class partner_event_registration(osv.osv_memory): _columns = { 'event_id': fields.many2one('event.event', 'Event'), 'event_type': fields.many2one('event.type', 'Type', readonly=True), - 'unit_price': fields.float('Registration Cost'), + 'unit_price': fields.float('Registration Cost', digits_compute=dp.get_precision('Sale Price')), 'start_date': fields.datetime('Start date', required=True, help="Beginning Date of Event", readonly=True), 'end_date': fields.datetime('Closing date', required=True, help="Closing Date of Event", readonly=True), 'nb_register': fields.integer('Number of Registration'), From 99c9ce6d5cdd4e498ac85eebed3bf161f40a9e6d Mon Sep 17 00:00:00 2001 From: "Omar(Pexego),Anup(OpenERP)" <> Date: Mon, 4 Oct 2010 17:54:35 +0530 Subject: [PATCH 24/39] [FIX] base_calendar,caldav : SQL queries Corrected lp bug: https://launchpad.net/bugs/654480 fixed bzr revid: ach@tinyerp.com-20101004122435-vsisrowq9fkk6zv6 --- addons/base_calendar/base_calendar.py | 2 +- addons/caldav/calendar.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index b71e2daa447..7ccd07351f0 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -724,7 +724,7 @@ true, it will allow you to hide the event alarm information without removing it. if alarm_ids: alarm_obj.unlink(cr, uid, alarm_ids) cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\ - where id=%%d' % model_obj._table,(datas.id,)) + where id=%%s' % model_obj._table,(datas.id,)) return True res_alarm() diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index bcc624d6a67..d22fa98f6e4 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -716,7 +716,7 @@ class basic_calendar_line(osv.osv): """ cr.execute("SELECT COUNT(id) FROM basic_calendar_lines \ - WHERE name='%s' AND calendar_id=%s", + WHERE name=%s AND calendar_id=%s", (vals.get('name'), vals.get('calendar_id'))) res = cr.fetchone() if res: From 863f4f5d99e0823718aef0bb9e8454eb18c1508a Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 14:37:52 +0200 Subject: [PATCH 25/39] [FIX] marketing_campaign: 'campaign analysis' report was wrongly placed in the 'association' module bzr revid: olt@tinyerp.com-20101004123752-pmu9xq1sb5kjmzfl --- addons/marketing_campaign/report/campaign_analysis_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/marketing_campaign/report/campaign_analysis_view.xml b/addons/marketing_campaign/report/campaign_analysis_view.xml index aa994fcfc48..fd5a8c0908f 100644 --- a/addons/marketing_campaign/report/campaign_analysis_view.xml +++ b/addons/marketing_campaign/report/campaign_analysis_view.xml @@ -84,8 +84,8 @@ - - + + From 31b73b77e3de5527f8ffe841c2e1b8a4945b8349 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Mon, 4 Oct 2010 18:36:05 +0530 Subject: [PATCH 26/39] [FIX] project_timesheet : variable reference corrected lp bug: https://launchpad.net/bugs/653032 fixed bzr revid: ach@tinyerp.com-20101004130605-iz181rxj15g5wjfs --- addons/project_timesheet/project_timesheet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 411351f1be1..3c53cfe8630 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -112,6 +112,7 @@ class project_work(osv.osv): timesheet_obj = self.pool.get('hr.analytic.timesheet') project_obj = self.pool.get('project.project') uom_obj = self.pool.get('product.uom') + result = {} if isinstance(ids, (long, int)): ids = [ids,] @@ -139,7 +140,7 @@ class project_work(osv.osv): vals_line['unit_amount'] = vals['hours'] prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set - if result['product_uom_id'] and (not result['product_uom_id'] == default_uom): + if result.get('product_uom_id',False) and (not result['product_uom_id'] == default_uom): vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id']) # Compute based on pricetype From e7dba666915be5f71f8e3382fbb169300294897a Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 15:10:19 +0200 Subject: [PATCH 27/39] [IMP] account_analytic_analysis, analytic, hr_timesheet_invoice: some fields now uses decimal.precision bzr revid: olt@tinyerp.com-20101004131019-0s1paonl2gbunsff --- .../account_analytic_analysis.py | 59 ++++++++++++++----- addons/analytic/analytic.py | 3 +- .../report/report_analytic.py | 6 +- 3 files changed, 49 insertions(+), 19 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index e765989040b..d9e9bf3907b 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -23,6 +23,8 @@ from osv import osv, fields from osv.orm import intersect import tools.sql from tools.translate import _ +from decimal_precision import decimal_precision as dp + class account_analytic_account(osv.osv): _name = "account.analytic.account" @@ -351,22 +353,47 @@ class account_analytic_account(osv.osv): return res _columns ={ - 'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount', help="Total customer invoiced amount for this account."), - 'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs', help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets."), - 'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount', help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs."), - 'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue', help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist."), - 'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot', help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."), - 'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date', help="Date of the last invoice created for this analytic account."), - 'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost', help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."), - 'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work', help="Date of the latest work done on this account."), - 'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours', help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."), - 'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours', help="Number of hours that can be invoiced plus those that already have been invoiced."), - 'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours', help="Computed using the formula: Maximum Quantity - Hours Tot."), - 'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue', help="Computed using the formula: Max Invoice Price - Invoiced Amount."), - 'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)', help="Computed using the formula: Invoiced Amount / Hours Tot."), - 'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin', help="Computed using the formula: Invoiced Amount - Total Costs."), - 'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin', help="Computed using the formula: Theorial Revenue - Total Costs"), - 'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)', help="Computes using the formula: (Real Margin / Total Costs) * 100."), + 'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount', + help="Total customer invoiced amount for this account.", + digits_compute=dp.get_precision('Account')), + 'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs', + help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.", + digits_compute=dp.get_precision('Account')), + 'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount', + help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.", + digits_compute=dp.get_precision('Account')), + 'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue', + help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist.", + digits_compute=dp.get_precision('Account')), + 'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot', + help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."), + 'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date', + help="Date of the last invoice created for this analytic account."), + 'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost', + help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."), + 'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work', + help="Date of the latest work done on this account."), + 'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours', + help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."), + 'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours', + help="Number of hours that can be invoiced plus those that already have been invoiced."), + 'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours', + help="Computed using the formula: Maximum Quantity - Hours Tot."), + 'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue', + help="Computed using the formula: Max Invoice Price - Invoiced Amount.", + digits_compute=dp.get_precision('Account')), + 'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)', + help="Computed using the formula: Invoiced Amount / Hours Tot.", + digits_compute=dp.get_precision('Account')), + 'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin', + help="Computed using the formula: Invoiced Amount - Total Costs.", + digits_compute=dp.get_precision('Account')), + 'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin', + help="Computed using the formula: Theorial Revenue - Total Costs", + digits_compute=dp.get_precision('Account')), + 'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)', + help="Computes using the formula: (Real Margin / Total Costs) * 100.", + digits_compute=dp.get_precision('Account')), 'month_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'), 'user_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'), } diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index cf96028f01c..66c74a72bc9 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -25,6 +25,7 @@ import operator from osv import fields, osv import decimal_precision as dp + class account_analytic_account(osv.osv): _name = 'account.analytic.account' _description = 'Analytic Account' @@ -272,7 +273,7 @@ class account_analytic_line(osv.osv): _columns = { 'name' : fields.char('Description', size=256, required=True), 'date' : fields.date('Date', required=True, select=1), - 'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.'), + 'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')), 'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'), 'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True), 'user_id' : fields.many2one('res.users', 'User'), diff --git a/addons/hr_timesheet_invoice/report/report_analytic.py b/addons/hr_timesheet_invoice/report/report_analytic.py index 0b3d1440f23..d2db7fd4027 100644 --- a/addons/hr_timesheet_invoice/report/report_analytic.py +++ b/addons/hr_timesheet_invoice/report/report_analytic.py @@ -21,6 +21,8 @@ from osv import fields,osv import tools +from decimal_precision import decimal_precision as dp + class report_analytic_account_close(osv.osv): _name = "report.analytic.account.close" @@ -70,8 +72,8 @@ class report_account_analytic_line_to_invoice(osv.osv): 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True), 'product_uom_id':fields.many2one('product.uom', 'UoM', readonly=True), 'unit_amount': fields.float('Units', readonly=True), - 'sale_price': fields.float('Sale price', readonly=True), - 'amount': fields.float('Amount', readonly=True), + 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Sale Price')), + 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), } From f4927a835d95f1f943594612c3a3d45c629ef50b Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Mon, 4 Oct 2010 19:21:01 +0530 Subject: [PATCH 28/39] [REF] stock : Product typo changed. lp bug: https://launchpad.net/bugs/648607 fixed bzr revid: ach@tinyerp.com-20101004135101-2orb2lzrhpg1nigg --- addons/stock/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/product.py b/addons/stock/product.py index 790b50c45b3..19b6570a31a 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -318,7 +318,7 @@ class product_product(osv.osv): 'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Production Lot for all moves containing this product and going to a Customer Location"), 'location_id': fields.dummy(string='Stock Location', relation='stock.location', type='many2one'), 'valuation':fields.selection([('manual_periodic', 'Periodic (manual)'), - ('real_time','Real Time (automatized)'),], 'Stock Valuation', help="Decide if the system must automatically creates account moves based on stock moves", required=True), + ('real_time','Real Time (automatized)'),], 'Stock Valuation', help="Decide if the system must automatically create account moves based on stock moves", required=True), } _defaults = { From ae562e1b6a29c9bf617e37e14ae365e7e4259d79 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 17:13:03 +0200 Subject: [PATCH 29/39] [FIX] point_of_sale: 'account_statement' report: method 'get_data' was missing [IMP] point_of_sale: 'account_statement' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004151303-k32qnknzuczn3t95 --- addons/point_of_sale/report/account_statement.py | 11 +++++++++++ addons/point_of_sale/report/account_statement.rml | 13 +++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/report/account_statement.py b/addons/point_of_sale/report/account_statement.py index 391adb7569f..dc492651bb2 100644 --- a/addons/point_of_sale/report/account_statement.py +++ b/addons/point_of_sale/report/account_statement.py @@ -31,10 +31,21 @@ class account_statement(report_sxw.rml_parse): self.localcontext.update({ 'time': time, 'get_total':self._get_total, + 'get_data':self._get_data, }) + + def _get_data(self, statement): + lines = [] + for line in statement.line_ids: + lines.append(line) + + return lines + def _get_total(self, statement_line_ids): total = 0.0 for line in statement_line_ids: total += line.amount return total + report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal') + diff --git a/addons/point_of_sale/report/account_statement.rml b/addons/point_of_sale/report/account_statement.rml index e4c3b99b6ee..ed26143aa4e 100644 --- a/addons/point_of_sale/report/account_statement.rml +++ b/addons/point_of_sale/report/account_statement.rml @@ -216,10 +216,10 @@ [[ formatLang(statement.closing_date,date=True) ]] - [[ formatLang(statement.balance_start) ]][[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_start, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] - [[ formatLang(statement.balance_end_real) ]][[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_end_real, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] @@ -247,13 +247,14 @@ [[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]] [[ repeatIn(get_data(statement), 'line_ids')]] - [[ line_ids.name ]] + + [[ line_ids['name'] ]] [[ line_ids.partner_id.name ]] - [[ formatLang(line_ids.amount) ]][[ company.currency_id.symbol ]] + [[ formatLang(line_ids.amount, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] @@ -268,7 +269,7 @@ Total : - [[ formatLang(get_total(statement.line_ids)) ]][[ company.currency_id.symbol ]] + [[ formatLang(get_total(statement.line_ids), digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] @@ -282,4 +283,4 @@ - \ No newline at end of file + From 2ab8afb1258b20efab9d413f766ef7fe402abe60 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 4 Oct 2010 17:32:17 +0200 Subject: [PATCH 30/39] [IMP] removed id field bzr revid: fp@tinyerp.com-20101004153217-711n4au7d85wy01h --- addons/project/project_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 6efc64dd494..69833383efe 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -303,7 +303,6 @@ - From 3fe4d84627ff12758dfbb7ea1c10fe71f1cd1041 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 4 Oct 2010 20:47:57 +0200 Subject: [PATCH 31/39] [IMP] project and gtd bzr revid: fp@tinyerp.com-20101004184757-bb33et0o5cav8fuk --- addons/project/project.py | 5 +++++ addons/project/project_view.xml | 21 ++++++++++----------- addons/project_gtd/project_gtd.py | 10 +++++----- addons/project_gtd/project_gtd_view.xml | 3 ++- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 996e79a1f8b..94828395cbf 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -373,6 +373,11 @@ class task(osv.osv): return res + def onchange_remaining(self, cr, uid, ids, remaining=0.0, planned = 0.0): + if remaining and not planned: + return {'value':{'planned_hours': remaining}} + return {} + def onchange_planned(self, cr, uid, ids, planned = 0.0, effective = 0.0): return {'value':{'remaining_hours': planned - effective}} diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 69833383efe..b0332a7ca27 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -207,7 +207,7 @@
- + @@ -305,12 +305,11 @@ - - + + - - - + +