From 7f68f0bf910f5ed73a12775fdf517db474592760 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Wed, 22 Jun 2011 11:45:36 +0530 Subject: [PATCH 001/156] change the label of new_password field lp bug: https://launchpad.net/bugs/798681 fixed bzr revid: nco@tinyerp.com-20110622061536-meps01rofci0z5gw --- openerp/addons/base/res/res_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_user.py b/openerp/addons/base/res/res_user.py index 8a76ba9a6f4..18c9b27fb17 100644 --- a/openerp/addons/base/res/res_user.py +++ b/openerp/addons/base/res/res_user.py @@ -218,7 +218,7 @@ class users(osv.osv): 'password': fields.char('Password', size=64, invisible=True, help="Keep empty if you don't want the user to be able to connect on the system."), 'new_password': fields.function(_get_password, method=True, type='char', size=64, fnct_inv=_set_new_password, - string='Change password', help="Only specify a value if you want to change the user password. " + string='Set password', help="Only specify a value if you want to change the user password. " "This user will have to logout and login again!"), 'email': fields.char('E-mail', size=64, help='If an email is provided, the user will be sent a message ' From 0757ae25abdade0f0f354da3975e549a7c78b510 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 6 Jul 2011 02:26:24 +0200 Subject: [PATCH 002/156] [REF] refactor the methode make_po in order to make easier the overwritting bzr revid: sebastien.beau@akretion.com.br-20110706002624-8ag88jv5a5i979iy --- addons/purchase/purchase.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 6ec558acc97..1b3d0eeb839 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -761,6 +761,10 @@ class procurement_order(osv.osv): res = res.values() return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value + def create_procurement_purchase_order(self, cr, uid, procurement, po_vals, line, context=None): + po_vals.update({'order_line': [(0,0,line)]}) + return self.pool.get('purchase.order').create(cr, uid, po_vals, context=context) + def make_po(self, cr, uid, ids, context=None): """ Make purchase order from procurement @return: New created Purchase Orders procurement wise @@ -774,7 +778,6 @@ class procurement_order(osv.osv): pricelist_obj = self.pool.get('product.pricelist') prod_obj = self.pool.get('product.product') acc_pos_obj = self.pool.get('account.fiscal.position') - po_obj = self.pool.get('purchase.order') for procurement in self.browse(cr, uid, ids, context=context): res_id = procurement.move_id.id partner = procurement.product_id.seller_id # Taken Main Supplier of Product of Procurement. @@ -799,6 +802,8 @@ class procurement_order(osv.osv): context.update({'lang': partner.lang, 'partner_id': partner_id}) product = prod_obj.browse(cr, uid, procurement.product_id.id, context=context) + taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id + taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) line = { 'name': product.partner_ref, @@ -809,25 +814,20 @@ class procurement_order(osv.osv): 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), 'move_dest_id': res_id, 'notes': product.description_purchase, + 'taxes_id': [(6,0,taxes)], } - - taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id - taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) - line.update({ - 'taxes_id': [(6,0,taxes)] - }) - purchase_id = po_obj.create(cr, uid, { + + po_vals = { 'origin': procurement.origin, 'partner_id': partner_id, 'partner_address_id': address_id, 'location_id': procurement.location_id.id, 'pricelist_id': pricelist_id, - 'order_line': [(0,0,line)], 'company_id': procurement.company_id.id, 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False - }) - res[procurement.id] = purchase_id - self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': purchase_id}) + } + res[procurement.id] = self.create_procurement_purchase_order(cr, uid, procurement, po_vals, line, context=context) + self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': res[procurement.id]}) return res procurement_order() From 9cbccd3f0e94788bba2467597a0d6691632b5816 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 13 Jul 2011 16:05:24 +0200 Subject: [PATCH 003/156] [IMP] account_voucher: added property fields on res.company for auto exchange rate account bzr revid: qdp-launchpad@openerp.com-20110713140524-j1uylbsryd1j0go0 --- addons/account_voucher/__init__.py | 3 +- addons/account_voucher/__openerp__.py | 1 + addons/account_voucher/company.py | 45 +++++++++++++++++++++++++ addons/account_voucher/company_view.xml | 18 ++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 addons/account_voucher/company.py create mode 100644 addons/account_voucher/company_view.xml diff --git a/addons/account_voucher/__init__.py b/addons/account_voucher/__init__.py index 9796f81d5e5..098d82ea361 100644 --- a/addons/account_voucher/__init__.py +++ b/addons/account_voucher/__init__.py @@ -20,8 +20,9 @@ ############################################################################## import account_voucher +import company import invoice import report import wizard -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index ef93be397a0..039d3e067af 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -47,6 +47,7 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo "wizard/account_voucher_unreconcile_view.xml", "wizard/account_statement_from_invoice_view.xml", "account_voucher_view.xml", + "company_view.xml", "voucher_payment_receipt_view.xml", "voucher_sales_purchase_view.xml", "account_voucher_wizard.xml", diff --git a/addons/account_voucher/company.py b/addons/account_voucher/company.py new file mode 100644 index 00000000000..d8f0409a710 --- /dev/null +++ b/addons/account_voucher/company.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields, osv + +class res_company(osv.osv): + _inherit = "res.company" + _columns = { + 'property_income_currency_exchange': fields.property( + 'account.account', + type='many2one', + relation='account.account', + string="Income Currency Exchange", + view_load=True, + domain="[('type', '=', 'other')]", + 'property_expense_currency_exchange': fields.property( + 'account.account', + type='many2one', + relation='account.account', + string="Expense Currency Exchange", + view_load=True, + domain="[('type', '=', 'other')]", + } + +res_company() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_voucher/company_view.xml b/addons/account_voucher/company_view.xml new file mode 100644 index 00000000000..97d6edc31b7 --- /dev/null +++ b/addons/account_voucher/company_view.xml @@ -0,0 +1,18 @@ + + + + + res.company.form.inherit + + res.company + form + + + + + + + + + + From bbee50ce0164e36fc0ef46723320efbf4bf7cf93 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 13 Jul 2011 16:06:18 +0200 Subject: [PATCH 004/156] [IMP] account_voucher: imp in customer payment form view bzr revid: qdp-launchpad@openerp.com-20110713140618-kcd3vii57bibsk4g --- .../voucher_payment_receipt_view.xml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 7be6022c474..88d84a7c7f0 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -288,27 +288,29 @@ form
- - - + + - - - - - + + + + + + + - - + + @@ -356,7 +358,6 @@ - From 7039769b08fe90d70fd0c1b091a3e00bf135dd5d Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 13 Jul 2011 16:59:29 +0200 Subject: [PATCH 005/156] [FIX] account_voucher: syntax error fixed bzr revid: qdp-launchpad@openerp.com-20110713145929-4eheevdmmijncrc4 --- addons/account_voucher/company.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/company.py b/addons/account_voucher/company.py index d8f0409a710..8c877c8b635 100644 --- a/addons/account_voucher/company.py +++ b/addons/account_voucher/company.py @@ -30,14 +30,14 @@ class res_company(osv.osv): relation='account.account', string="Income Currency Exchange", view_load=True, - domain="[('type', '=', 'other')]", + domain="[('type', '=', 'other')]",), 'property_expense_currency_exchange': fields.property( 'account.account', type='many2one', relation='account.account', string="Expense Currency Exchange", view_load=True, - domain="[('type', '=', 'other')]", + domain="[('type', '=', 'other')]",), } res_company() From f2fc1fcd179ec1158490c4e59dd7e8cc5be34c7e Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 14 Jul 2011 15:44:21 +0200 Subject: [PATCH 006/156] [IMP] account_voucher: lots of improvements (part 1) bzr revid: qdp-launchpad@openerp.com-20110714134421-q453j1z6upq03ter --- addons/account_voucher/account_voucher.py | 252 +++++++++++------- .../voucher_payment_receipt_view.xml | 10 +- 2 files changed, 162 insertions(+), 100 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 0e85904dcd7..5b8be1d8a8b 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -142,33 +142,56 @@ class account_voucher(osv.osv): res['arch'] = etree.tostring(doc) return res - def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount): - debit = credit = 0.0 + def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, context=None): + if context is None: + context = {} + ctx = context.copy() + debit = credit = currency_rate_diff = 0.0 + #import pdb;pdb.set_trace() for l in line_dr_ids: + ctx.update({'date': l['date_original']}) + currency_rate_diff += 'amount_in_company_currency' in l and l['amount_in_company_currency'] or self.pool.get('res.currency').compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount_original'], context=ctx) debit += l['amount'] for l in line_cr_ids: + ctx.update({'date': l['date_original']}) + currency_rate_diff -= 'amount_in_company_currency' in l and l['amount_in_company_currency'] or self.pool.get('res.currency').compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount_original'], context=ctx) credit += l['amount'] - return abs(amount - abs(credit - debit)) + return abs(amount - abs(credit - debit)), currency_rate_diff def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, context=None): - context = context or {} if not line_dr_ids and not line_cr_ids: return {'value':{}} line_osv = self.pool.get("account.voucher.line") line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context) line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context) - return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount)}} + currency_pool = self.pool.get('res.currency') + writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, context=context) + return {'value': {'writeoff_amount': writeoff_amount,}}# 'currency_rate_difference': currency_rate_diff}} def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): if not ids: return {} - res = {} - debit = credit = 0.0 + if context is None: + context = {} + res = {}.fromkeys(ids,{}) + counter_for_writeoff = counter_for_currency_diff = real_amount = expected_amount = 0.0 + currency_pool = self.pool.get('res.currency') for voucher in self.browse(cr, uid, ids, context=context): + ctx = context.copy() for l in voucher.line_dr_ids: - debit += l.amount + real_amount -= l.amount_in_company_currency + ctx.update({'date': l.date_original}) + counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) + ctx.update({'date': voucher.date}) + counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) for l in voucher.line_cr_ids: - credit += l.amount - res[voucher.id] = abs(voucher.amount - abs(credit - debit)) + real_amount += l.amount_in_company_currency + ctx.update({'date': l.date_original}) + counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) + ctx.update({'date': voucher.date}) + counter_for_currency_diff += l.amount and currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) + writeoff_amount = voucher.amount - counter_for_writeoff + res[voucher.id]['writeoff_amount'] = writeoff_amount + res[voucher.id]['currency_rate_difference'] = real_amount - counter_for_currency_diff return res _name = 'account.voucher' @@ -193,8 +216,8 @@ class account_voucher(osv.osv): domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}), 'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}), - 'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), -# 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, states={'draft':[('readonly',False)]}), + #'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), + 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', store=True, readonly=True), 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'state':fields.selection( [('draft','Draft'), @@ -228,7 +251,8 @@ class account_voucher(osv.osv): 'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', readonly=True, states={'draft': [('readonly', False)]}), 'comment': fields.char('Write-Off Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}), 'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}), - 'writeoff_amount': fields.function(_get_writeoff_amount, string='Write-Off Amount', type='float', readonly=True), + 'writeoff_amount': fields.function(_get_writeoff_amount, string='Write-Off Amount', type='float', readonly=True, multi="writeoff"), + 'currency_rate_difference': fields.function(_get_writeoff_amount, string="Currency Rate Difference", type='float', multi="writeoff"), } _defaults = { 'period_id': _get_period, @@ -491,27 +515,30 @@ class account_voucher(osv.osv): if line.debit and line.reconcile_partial_id and ttype == 'payment': continue original_amount = line.credit or line.debit or 0.0 - amount_unreconciled = currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, abs(line.amount_residual_currency), context=context_multi_currency) + amount_original, amount_unreconciled = line_pool._get_amounts(cr, uid, line, context=context) + currency_id = line.currency_id and line.currency_id.id or line.company_id.currency_id.id rs = { 'name':line.move_id.name, 'type': line.credit and 'dr' or 'cr', 'move_line_id':line.id, 'account_id':line.account_id.id, - 'amount_original': currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, line.currency_id and abs(line.amount_currency) or original_amount, context=context_multi_currency), + 'amount_original': amount_original, + 'amount': 0.0, + 'currency_id': currency_id, 'date_original':line.date, + 'company_currency_id': line.company_id.currency_id.id, 'date_due':line.date_maturity, 'amount_unreconciled': amount_unreconciled, - } - if line.credit: - amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency)) - rs['amount'] = amount - total_debit -= amount - else: - amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency)) - rs['amount'] = amount - total_credit -= amount + #if line.credit: + # amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency)) + # rs['amount'] = amount + # total_debit -= amount + #else: + # amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency)) + # rs['amount'] = amount + # total_credit -= amount default['value']['line_ids'].append(rs) if rs['type'] == 'cr': @@ -523,7 +550,7 @@ class account_voucher(osv.osv): default['value']['pre_line'] = 1 elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0: default['value']['pre_line'] = 1 - default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price) + default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, context=context) return default def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): @@ -636,44 +663,42 @@ class account_voucher(osv.osv): currency_pool = self.pool.get('res.currency') tax_obj = self.pool.get('account.tax') seq_obj = self.pool.get('ir.sequence') - for inv in self.browse(cr, uid, ids, context=context): - if inv.move_id: + for voucher in self.browse(cr, uid, ids, context=context): + if voucher.move_id: continue context_multi_currency = context.copy() - context_multi_currency.update({'date': inv.date}) + context_multi_currency.update({'date': voucher.date}) - if inv.number: - name = inv.number - elif inv.journal_id.sequence_id: - name = seq_obj.get_id(cr, uid, inv.journal_id.sequence_id.id) + if voucher.number: + name = voucher.number else: - raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal !')) - if not inv.reference: + name = seq_obj.get_id(cr, uid, voucher.journal_id.sequence_id.id) + if not voucher.reference: ref = name.replace('/','') else: - ref = inv.reference + ref = voucher.reference move = { 'name': name, - 'journal_id': inv.journal_id.id, - 'narration': inv.narration, - 'date': inv.date, + 'journal_id': voucher.journal_id.id, + 'narration': voucher.narration, + 'date': voucher.date, 'ref': ref, - 'period_id': inv.period_id and inv.period_id.id or False + 'period_id': voucher.period_id and voucher.period_id.id or False } move_id = move_pool.create(cr, uid, move) #create the first line manually - company_currency = inv.journal_id.company_id.currency_id.id - current_currency = inv.currency_id.id + company_currency = voucher.journal_id.company_id.currency_id.id + current_currency = voucher.currency_id.id debit = 0.0 credit = 0.0 # TODO: is there any other alternative then the voucher type ?? # -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt - if inv.type in ('purchase', 'payment'): - credit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency) - elif inv.type in ('sale', 'receipt'): - debit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency) + if voucher.type in ('purchase', 'payment'): + credit = currency_pool.compute(cr, uid, current_currency, company_currency, voucher.amount, context=context_multi_currency) + elif voucher.type in ('sale', 'receipt'): + debit = currency_pool.compute(cr, uid, current_currency, company_currency, voucher.amount, context=context_multi_currency) if debit < 0: credit = -debit debit = 0.0 @@ -683,28 +708,28 @@ class account_voucher(osv.osv): sign = debit - credit < 0 and -1 or 1 #create the first line of the voucher move_line = { - 'name': inv.name or '/', + 'name': voucher.name or '/', 'debit': debit, 'credit': credit, - 'account_id': inv.account_id.id, + 'account_id': voucher.account_id.id, 'move_id': move_id, - 'journal_id': inv.journal_id.id, - 'period_id': inv.period_id.id, - 'partner_id': inv.partner_id.id, + 'journal_id': voucher.journal_id.id, + 'period_id': voucher.period_id.id, + 'partner_id': voucher.partner_id.id, 'currency_id': company_currency <> current_currency and current_currency or False, - 'amount_currency': company_currency <> current_currency and sign * inv.amount or 0.0, - 'date': inv.date, - 'date_maturity': inv.date_due + 'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0, + 'date': voucher.date, + 'date_maturity': voucher.date_due } move_line_pool.create(cr, uid, move_line) rec_list_ids = [] line_total = debit - credit - if inv.type == 'sale': - line_total = line_total - currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency) - elif inv.type == 'purchase': - line_total = line_total + currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency) + if voucher.type == 'sale': + line_total = line_total - currency_pool.compute(cr, uid, voucher.currency_id.id, company_currency, voucher.tax_amount, context=context_multi_currency) + elif voucher.type == 'purchase': + line_total = line_total + currency_pool.compute(cr, uid, voucher.currency_id.id, company_currency, voucher.tax_amount, context=context_multi_currency) - for line in inv.line_ids: + for line in voucher.line_ids: #create one move line per voucher line where amount is not 0.0 if not line.amount: continue @@ -712,21 +737,26 @@ class account_voucher(osv.osv): if line.amount == line.amount_unreconciled: amount = line.move_line_id.amount_residual #residual amount in company currency else: - amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=context_multi_currency) + ctx = context_multi_currency.copy() + ctx.update({'date': line.date_original}) + amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=ctx) move_line = { - 'journal_id': inv.journal_id.id, - 'period_id': inv.period_id.id, + 'journal_id': voucher.journal_id.id, + 'period_id': voucher.period_id.id, 'name': line.name or '/', 'account_id': line.account_id.id, 'move_id': move_id, - 'partner_id': inv.partner_id.id, + 'partner_id': voucher.partner_id.id, 'currency_id': company_currency <> current_currency and current_currency or False, 'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False, 'quantity': 1, 'credit': 0.0, 'debit': 0.0, - 'date': inv.date + 'date': voucher.date } + #TODO: assigner le montant de la diff de change sur le bon compte et pas debtor + #TODO: mettre le montant de company currency en onchange + readonly + computed + #TODO: mettre un champ difference de change sur le voucher if amount < 0: amount = -amount if line.type == 'dr': @@ -740,9 +770,9 @@ class account_voucher(osv.osv): line_total -= amount move_line['credit'] = amount - if inv.tax_id and inv.type in ('sale', 'purchase'): + if voucher.tax_id and voucher.type in ('sale', 'purchase'): move_line.update({ - 'account_tax_id': inv.tax_id.id, + 'account_tax_id': voucher.tax_id.id, }) if move_line.get('account_tax_id', False): tax_data = tax_obj.browse(cr, uid, [move_line['account_tax_id']], context=context)[0] @@ -755,35 +785,35 @@ class account_voucher(osv.osv): rec_ids = [voucher_line, line.move_line_id.id] rec_list_ids.append(rec_ids) - if not currency_pool.is_zero(cr, uid, inv.currency_id, line_total): + if not currency_pool.is_zero(cr, uid, voucher.currency_id, line_total): diff = line_total account_id = False write_off_name = '' - if inv.payment_option == 'with_writeoff': - account_id = inv.writeoff_acc_id.id - write_off_name = inv.comment - elif inv.type in ('sale', 'receipt'): - account_id = inv.partner_id.property_account_receivable.id + if voucher.payment_option == 'with_writeoff': + account_id = voucher.writeoff_acc_id.id + write_off_name = voucher.comment + elif voucher.type in ('sale', 'receipt'): + account_id = voucher.partner_id.property_account_receivable.id else: - account_id = inv.partner_id.property_account_payable.id + account_id = voucher.partner_id.property_account_payable.id move_line = { 'name': write_off_name or name, 'account_id': account_id, 'move_id': move_id, - 'partner_id': inv.partner_id.id, - 'date': inv.date, + 'partner_id': voucher.partner_id.id, + 'date': voucher.date, 'credit': diff > 0 and diff or 0.0, 'debit': diff < 0 and -diff or 0.0, #'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0, #'currency_id': company_currency <> current_currency and current_currency or False, } move_line_pool.create(cr, uid, move_line) - self.write(cr, uid, [inv.id], { + self.write(cr, uid, [voucher.id], { 'move_id': move_id, 'state': 'posted', 'number': name, }) - if inv.journal_id.entry_posted: + if voucher.journal_id.entry_posted: move_pool.post(cr, uid, [move_id], context={}) for rec_ids in rec_list_ids: if len(rec_ids) >= 2: @@ -810,43 +840,71 @@ class account_voucher_line(osv.osv): _description = 'Voucher Lines' _order = "move_line_id" + def _currency_id(self, cr, uid, ids, name, args, context=None): + res = {} + for line in self.browse(cr, uid, ids, context=context): + move_line = line.move_line_id + res[line.id] = move_line.currency_id and move_line.currency_id.id or move_line.company_id.currency_id.id + return res + + def _get_amounts(self, cr, uid, line_browse_rec, context=None): + if line_browse_rec.currency_id: + amount_original = line_browse_rec.amount_currency or 0.0 + amount_unreconciled = line_browse_rec.amount_residual_currency + elif line_browse_rec.credit > 0: + amount_original = line_browse_rec.credit or 0.0 + amount_unreconciled = line_browse_rec.amount_residual + else: + amount_original = line_browse_rec.debit or 0.0 + amount_unreconciled = line_browse_rec.amount_residual + return amount_original, amount_unreconciled + def _compute_balance(self, cr, uid, ids, name, args, context=None): currency_pool = self.pool.get('res.currency') - rs_data = {} + res = {} for line in self.browse(cr, uid, ids, context=context): - ctx = context.copy() - ctx.update({'date': line.voucher_id.date}) - res = {} - company_currency = line.voucher_id.journal_id.company_id.currency_id.id - voucher_currency = line.voucher_id.currency_id.id - move_line = line.move_line_id or False + amount_original, amount_unreconciled = self._get_amounts(cr, uid, line.move_line_id, context) + res[line.id] = { + 'amount_original': amount_original, + 'amount_unreconciled': amount_unreconciled, + } - if not move_line: - res['amount_original'] = 0.0 - res['amount_unreconciled'] = 0.0 + return res - elif move_line.currency_id: - res['amount_original'] = currency_pool.compute(cr, uid, move_line.currency_id.id, voucher_currency, move_line.amount_currency, context=ctx) - elif move_line and move_line.credit > 0: - res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit, context=ctx) - else: - res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit, context=ctx) + def __company_currency_amount(self, cr, uid, line, amount, context=None): + if context is None: + context = {} + ctx = context.copy() + ctx.update({'date': line.date_original}) + currency_pool = self.pool.get('res.currency') + return currency_pool.compute(cr, uid, line.currency_id.id, line.company_currency_id.id, amount, context=ctx) - if move_line: - res['amount_unreconciled'] = currency_pool.compute(cr, uid, move_line.currency_id and move_line.currency_id.id or company_currency, voucher_currency, abs(move_line.amount_residual_currency), context=ctx) - rs_data[line.id] = res - return rs_data + def onchange_amount(self, cr, uid, ids, amount, context=None): + if not amount: + return {'value':{'amount_in_company_currency': 0.0}} + for line in self.browse(cr, uid, ids, context=context): + amount = self.__company_currency_amount(cr, uid, line, amount, context=context) + return {'value': {'amount_in_company_currency': amount}} + + def _get_amount_in_company_currency(self, cr, uid, ids, name, args, context=None): + res = {} + for line in self.browse(cr, uid, ids, context=context): + res[line.id] = self.__company_currency_amount(cr, uid, line, line.amount, context=context) + return res _columns = { 'voucher_id':fields.many2one('account.voucher', 'Voucher', required=1, ondelete='cascade'), 'name':fields.char('Description', size=256), 'account_id':fields.many2one('account.account','Account', required=True), 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'), + 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency'), 'untax_amount':fields.float('Untax Amount'), 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')), 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), - 'move_line_id': fields.many2one('account.move.line', 'Journal Item'), + 'move_line_id': fields.many2one('account.move.line', 'Journal Item', required=True), + 'company_currency_id': fields.related('move_line_id','company_id','currency_id', type='many2one', relation='res.currency', string="Company Currency"), + 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account')), 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1), 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1), 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True), diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 88d84a7c7f0..85dfc8f12c0 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -283,7 +283,7 @@ id="menu_action_vendor_payment" parent="account.menu_finance_payables"/> - account.voucher.receipt.form + voucher.form.customer.payment account.voucher form @@ -320,12 +320,15 @@ on_change="onchange_move_line_id(move_line_id)" domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" /> - + - + + + + @@ -359,6 +362,7 @@ + From bb605efd941ff6aa4cad9a445a8c9074e5fec408 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 14 Jul 2011 17:48:22 +0200 Subject: [PATCH 007/156] [IMP] account_voucher: multi currency and usability changes (part 2) bzr revid: qdp-launchpad@openerp.com-20110714154822-s5mbl0et1jdw7jty --- addons/account_voucher/account_voucher.py | 77 ++++++++++++------- addons/account_voucher/company.py | 4 +- .../voucher_payment_receipt_view.xml | 4 +- 3 files changed, 53 insertions(+), 32 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 5b8be1d8a8b..b3eaa36db21 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -142,30 +142,35 @@ class account_voucher(osv.osv): res['arch'] = etree.tostring(doc) return res - def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, context=None): + def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, voucher_currency_id, context=None): if context is None: context = {} + currency_pool = self.pool.get('res.currency') ctx = context.copy() - debit = credit = currency_rate_diff = 0.0 - #import pdb;pdb.set_trace() + counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0 for l in line_dr_ids: + real_amount -= l.get('amount_in_company_currency', 0.0) ctx.update({'date': l['date_original']}) - currency_rate_diff += 'amount_in_company_currency' in l and l['amount_in_company_currency'] or self.pool.get('res.currency').compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount_original'], context=ctx) - debit += l['amount'] + counter_for_writeoff -= currency_pool.compute(cr, uid, l['company_currency_id'], voucher_currency_id, l.get('amount_in_company_currency',0.0), context=ctx) + ctx.update({'date': voucher_date}) + counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) for l in line_cr_ids: + real_amount += l.get('amount_in_company_currency', 0.0) ctx.update({'date': l['date_original']}) - currency_rate_diff -= 'amount_in_company_currency' in l and l['amount_in_company_currency'] or self.pool.get('res.currency').compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount_original'], context=ctx) - credit += l['amount'] - return abs(amount - abs(credit - debit)), currency_rate_diff + counter_for_writeoff += currency_pool.compute(cr, uid, l['company_currency_id'], voucher_currency_id, l.get('amount_in_company_currency',0.0), context=ctx) + ctx.update({'date': voucher_date}) + counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + writeoff_amount = amount - counter_for_writeoff + currency_rate_difference = real_amount - counter_for_currency_diff + return writeoff_amount, currency_rate_difference - def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, context=None): + def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_date, voucher_currency_id, context=None): if not line_dr_ids and not line_cr_ids: return {'value':{}} line_osv = self.pool.get("account.voucher.line") line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context) line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context) - currency_pool = self.pool.get('res.currency') - writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, context=context) + writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, voucher_currency_id, context=context) return {'value': {'writeoff_amount': writeoff_amount,}}# 'currency_rate_difference': currency_rate_diff}} def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): @@ -173,7 +178,7 @@ class account_voucher(osv.osv): if context is None: context = {} res = {}.fromkeys(ids,{}) - counter_for_writeoff = counter_for_currency_diff = real_amount = expected_amount = 0.0 + counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0 currency_pool = self.pool.get('res.currency') for voucher in self.browse(cr, uid, ids, context=context): ctx = context.copy() @@ -188,7 +193,7 @@ class account_voucher(osv.osv): ctx.update({'date': l.date_original}) counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) ctx.update({'date': voucher.date}) - counter_for_currency_diff += l.amount and currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) + counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) writeoff_amount = voucher.amount - counter_for_writeoff res[voucher.id]['writeoff_amount'] = writeoff_amount res[voucher.id]['currency_rate_difference'] = real_amount - counter_for_currency_diff @@ -550,7 +555,7 @@ class account_voucher(osv.osv): default['value']['pre_line'] = 1 elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0: default['value']['pre_line'] = 1 - default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, context=context) + default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, date, currency_id, context=context) return default def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): @@ -722,12 +727,33 @@ class account_voucher(osv.osv): 'date_maturity': voucher.date_due } move_line_pool.create(cr, uid, move_line) + + #create the move line for the currency difference + if voucher.currency_rate_difference: + if voucher.currency_rate_difference > 0: + account_id = voucher.company_id.property_income_currency_exchange + if not account_id: + raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! ")) + else: + account_id = voucher.company_id.property_expense_currency_exchange + if not account_id: + raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) + + currency_diff_line = { + 'name': _('Currency Difference'), + 'debit': voucher.currency_rate_difference > 0 and voucher.currency_rate_difference or 0.0, + 'credit': voucher.currency_rate_difference < 0 and -voucher.currency_rate_difference or 0.0, + 'account_id': account_id.id, + 'move_id': move_id, + 'journal_id': voucher.journal_id.id, + 'period_id': voucher.period_id.id, + 'partner_id': voucher.partner_id.id, + 'date': voucher.date, + 'date_maturity': voucher.date_due + } + + move_line_pool.create(cr, uid, currency_diff_line, context=context) rec_list_ids = [] - line_total = debit - credit - if voucher.type == 'sale': - line_total = line_total - currency_pool.compute(cr, uid, voucher.currency_id.id, company_currency, voucher.tax_amount, context=context_multi_currency) - elif voucher.type == 'purchase': - line_total = line_total + currency_pool.compute(cr, uid, voucher.currency_id.id, company_currency, voucher.tax_amount, context=context_multi_currency) for line in voucher.line_ids: #create one move line per voucher line where amount is not 0.0 @@ -754,9 +780,6 @@ class account_voucher(osv.osv): 'debit': 0.0, 'date': voucher.date } - #TODO: assigner le montant de la diff de change sur le bon compte et pas debtor - #TODO: mettre le montant de company currency en onchange + readonly + computed - #TODO: mettre un champ difference de change sur le voucher if amount < 0: amount = -amount if line.type == 'dr': @@ -764,10 +787,8 @@ class account_voucher(osv.osv): else: line.type = 'dr' if (line.type=='dr'): - line_total += amount move_line['debit'] = amount else: - line_total -= amount move_line['credit'] = amount if voucher.tax_id and voucher.type in ('sale', 'purchase'): @@ -785,8 +806,8 @@ class account_voucher(osv.osv): rec_ids = [voucher_line, line.move_line_id.id] rec_list_ids.append(rec_ids) - if not currency_pool.is_zero(cr, uid, voucher.currency_id, line_total): - diff = line_total + if not currency_pool.is_zero(cr, uid, voucher.currency_id, voucher.writeoff_amount): + diff = currency_pool.compute(cr, uid, current_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) account_id = False write_off_name = '' if voucher.payment_option == 'with_writeoff': @@ -804,8 +825,8 @@ class account_voucher(osv.osv): 'date': voucher.date, 'credit': diff > 0 and diff or 0.0, 'debit': diff < 0 and -diff or 0.0, - #'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0, - #'currency_id': company_currency <> current_currency and current_currency or False, + 'amount_currency': voucher.writeoff_amount, + 'currency_id': company_currency <> current_currency and current_currency or False, } move_line_pool.create(cr, uid, move_line) self.write(cr, uid, [voucher.id], { diff --git a/addons/account_voucher/company.py b/addons/account_voucher/company.py index 8c877c8b635..5a5b5d040d7 100644 --- a/addons/account_voucher/company.py +++ b/addons/account_voucher/company.py @@ -28,14 +28,14 @@ class res_company(osv.osv): 'account.account', type='many2one', relation='account.account', - string="Income Currency Exchange", + string="Income Currency Rate", view_load=True, domain="[('type', '=', 'other')]",), 'property_expense_currency_exchange': fields.property( 'account.account', type='many2one', relation='account.account', - string="Expense Currency Exchange", + string="Expense Currency Rate", view_load=True, domain="[('type', '=', 'other')]",), } diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 85dfc8f12c0..1d6e2f19ddc 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -314,7 +314,7 @@ - + - + From 9aa1760fcfa9c03dd48b4a45ae3b0536e352eece Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 15 Jul 2011 10:26:43 +0200 Subject: [PATCH 008/156] [IMP] account_voucher: multi-currency improvements (part 3) bzr revid: qdp-launchpad@openerp.com-20110715082643-0bxv6u0z80wkqozi --- addons/account_voucher/account_voucher.py | 124 ++++++++++-------- .../voucher_payment_receipt_view.xml | 31 +++-- 2 files changed, 92 insertions(+), 63 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index b3eaa36db21..dd3af1139f4 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -142,35 +142,32 @@ class account_voucher(osv.osv): res['arch'] = etree.tostring(doc) return res - def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, voucher_currency_id, context=None): + def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=None): if context is None: context = {} currency_pool = self.pool.get('res.currency') ctx = context.copy() counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0 + ctx.update({'date': voucher_date}) for l in line_dr_ids: real_amount -= l.get('amount_in_company_currency', 0.0) - ctx.update({'date': l['date_original']}) - counter_for_writeoff -= currency_pool.compute(cr, uid, l['company_currency_id'], voucher_currency_id, l.get('amount_in_company_currency',0.0), context=ctx) - ctx.update({'date': voucher_date}) + counter_for_writeoff -= currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) for l in line_cr_ids: real_amount += l.get('amount_in_company_currency', 0.0) - ctx.update({'date': l['date_original']}) - counter_for_writeoff += currency_pool.compute(cr, uid, l['company_currency_id'], voucher_currency_id, l.get('amount_in_company_currency',0.0), context=ctx) - ctx.update({'date': voucher_date}) + counter_for_writeoff += currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) writeoff_amount = amount - counter_for_writeoff currency_rate_difference = real_amount - counter_for_currency_diff return writeoff_amount, currency_rate_difference - def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_date, voucher_currency_id, context=None): + def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_date, context=None): if not line_dr_ids and not line_cr_ids: return {'value':{}} line_osv = self.pool.get("account.voucher.line") line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context) line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context) - writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, voucher_currency_id, context=context) + writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context) return {'value': {'writeoff_amount': writeoff_amount,}}# 'currency_rate_difference': currency_rate_diff}} def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): @@ -182,27 +179,34 @@ class account_voucher(osv.osv): currency_pool = self.pool.get('res.currency') for voucher in self.browse(cr, uid, ids, context=context): ctx = context.copy() + ctx.update({'date': voucher.date}) for l in voucher.line_dr_ids: real_amount -= l.amount_in_company_currency - ctx.update({'date': l.date_original}) - counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) - ctx.update({'date': voucher.date}) + counter_for_writeoff -= l.amount_in_voucher_currency + #ctx.update({'date': l.date_original}) + #counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) for l in voucher.line_cr_ids: real_amount += l.amount_in_company_currency - ctx.update({'date': l.date_original}) - counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) - ctx.update({'date': voucher.date}) + counter_for_writeoff += l.amount_in_voucher_currency + #ctx.update({'date': l.date_original}) + #counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) writeoff_amount = voucher.amount - counter_for_writeoff res[voucher.id]['writeoff_amount'] = writeoff_amount res[voucher.id]['currency_rate_difference'] = real_amount - counter_for_currency_diff return res + def _currency_id(self, cr, uid, ids, name, args, context=None): + res = {} + for voucher in self.browse(cr, uid, ids, context=context): + currency = voucher.journal_id.currency and voucher.journal_id.currency.id or voucher.company_id.currency_id.id + res[voucher.id] = {'currency_id': currency, 'currency_id2': currency} + return res + _name = 'account.voucher' _description = 'Accounting Voucher' _order = "date desc, id desc" -# _rec_name = 'number' _columns = { 'type':fields.selection([ ('sale','Sale'), @@ -221,8 +225,9 @@ class account_voucher(osv.osv): domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}), 'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}), - #'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), - 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', store=True, readonly=True), + 'currency_id': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"), + #duplicated field for display purposes + 'currency_id2': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"), 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'state':fields.selection( [('draft','Draft'), @@ -425,7 +430,7 @@ class account_voucher(osv.osv): return default - def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): + def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, voucher_currency_id, ttype, date, context=None): """price Returns a dict that contains new values and context @@ -455,9 +460,9 @@ class account_voucher(osv.osv): vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context) vals = vals.get('value') - currency_id = vals.get('currency_id', currency_id) + voucher_currency_id = vals.get('currency_id', voucher_currency_id) default = { - 'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id':currency_id}, + 'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id': voucher_currency_id}, } if not partner_id: @@ -502,10 +507,10 @@ class account_voucher(osv.osv): moves = move_line_pool.browse(cr, uid, ids, context=context) company_currency = journal.company_id.currency_id.id - if company_currency != currency_id and ttype == 'payment': - total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit, context=context_multi_currency) - elif company_currency != currency_id and ttype == 'receipt': - total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit, context=context_multi_currency) + if company_currency != voucher_currency_id and ttype == 'payment': + total_debit = currency_pool.compute(cr, uid, voucher_currency_id, company_currency, total_debit, context=context_multi_currency) + elif company_currency != voucher_currency_id and ttype == 'receipt': + total_credit = currency_pool.compute(cr, uid, voucher_currency_id, company_currency, total_credit, context=context_multi_currency) for line in moves: if line.credit and line.reconcile_partial_id and ttype == 'receipt': @@ -530,10 +535,12 @@ class account_voucher(osv.osv): 'amount_original': amount_original, 'amount': 0.0, 'currency_id': currency_id, + 'voucher_currency_id': voucher_currency_id, 'date_original':line.date, 'company_currency_id': line.company_id.currency_id.id, 'date_due':line.date_maturity, 'amount_unreconciled': amount_unreconciled, + 'amount_in_company_currency': 0.0, } #if line.credit: @@ -555,7 +562,7 @@ class account_voucher(osv.osv): default['value']['pre_line'] = 1 elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0: default['value']['pre_line'] = 1 - default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, date, currency_id, context=context) + default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, date, context=context) return default def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): @@ -695,15 +702,15 @@ class account_voucher(osv.osv): #create the first line manually company_currency = voucher.journal_id.company_id.currency_id.id - current_currency = voucher.currency_id.id + voucher_currency = voucher.currency_id.id debit = 0.0 credit = 0.0 # TODO: is there any other alternative then the voucher type ?? # -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt if voucher.type in ('purchase', 'payment'): - credit = currency_pool.compute(cr, uid, current_currency, company_currency, voucher.amount, context=context_multi_currency) + credit = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.amount, context=context_multi_currency) elif voucher.type in ('sale', 'receipt'): - debit = currency_pool.compute(cr, uid, current_currency, company_currency, voucher.amount, context=context_multi_currency) + debit = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.amount, context=context_multi_currency) if debit < 0: credit = -debit debit = 0.0 @@ -721,8 +728,8 @@ class account_voucher(osv.osv): 'journal_id': voucher.journal_id.id, 'period_id': voucher.period_id.id, 'partner_id': voucher.partner_id.id, - 'currency_id': company_currency <> current_currency and current_currency or False, - 'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0, + 'currency_id': company_currency <> voucher_currency and voucher_currency or False, + 'amount_currency': company_currency <> voucher_currency and sign * voucher.amount or 0.0, 'date': voucher.date, 'date_maturity': voucher.date_due } @@ -763,9 +770,10 @@ class account_voucher(osv.osv): if line.amount == line.amount_unreconciled: amount = line.move_line_id.amount_residual #residual amount in company currency else: - ctx = context_multi_currency.copy() - ctx.update({'date': line.date_original}) - amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=ctx) + #ctx = context_multi_currency.copy() + #ctx.update({'date': line.date_original}) + #amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=ctx) + amount = line.amount_in_company_currency move_line = { 'journal_id': voucher.journal_id.id, 'period_id': voucher.period_id.id, @@ -773,7 +781,7 @@ class account_voucher(osv.osv): 'account_id': line.account_id.id, 'move_id': move_id, 'partner_id': voucher.partner_id.id, - 'currency_id': company_currency <> current_currency and current_currency or False, + 'currency_id': company_currency <> line.currency_id.id and line.currency_id.id or False, 'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False, 'quantity': 1, 'credit': 0.0, @@ -800,14 +808,14 @@ class account_voucher(osv.osv): if not (tax_data.base_code_id and tax_data.tax_code_id): raise osv.except_osv(_('No Account Base Code and Account Tax Code!'),_("You have to configure account base code and account tax code on the '%s' tax!") % (tax_data.name)) sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1 - move_line['amount_currency'] = company_currency <> current_currency and sign * line.amount or 0.0 + move_line['amount_currency'] = company_currency <> line.currency_id.id and sign * line.amount or 0.0 voucher_line = move_line_pool.create(cr, uid, move_line) if line.move_line_id.id: rec_ids = [voucher_line, line.move_line_id.id] rec_list_ids.append(rec_ids) if not currency_pool.is_zero(cr, uid, voucher.currency_id, voucher.writeoff_amount): - diff = currency_pool.compute(cr, uid, current_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) + diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) account_id = False write_off_name = '' if voucher.payment_option == 'with_writeoff': @@ -825,8 +833,8 @@ class account_voucher(osv.osv): 'date': voucher.date, 'credit': diff > 0 and diff or 0.0, 'debit': diff < 0 and -diff or 0.0, - 'amount_currency': voucher.writeoff_amount, - 'currency_id': company_currency <> current_currency and current_currency or False, + 'amount_currency': company_currency <> voucher_currency and voucher.writeoff_amount or 0.0, + 'currency_id': company_currency <> voucher_currency and voucher_currency or False, } move_line_pool.create(cr, uid, move_line) self.write(cr, uid, [voucher.id], { @@ -898,34 +906,46 @@ class account_voucher_line(osv.osv): ctx = context.copy() ctx.update({'date': line.date_original}) currency_pool = self.pool.get('res.currency') - return currency_pool.compute(cr, uid, line.currency_id.id, line.company_currency_id.id, amount, context=ctx) + amount_company_cur = currency_pool.compute(cr, uid, line.currency_id.id, line.company_currency_id.id, amount, context=ctx) + ctx.update({'date': line.voucher_id.date}) + amount_voucher_cur = currency_pool.compute(cr, uid, line.currency_id.id, line.voucher_currency_id.id, amount, context=ctx) + return amount_company_cur, amount_voucher_cur def onchange_amount(self, cr, uid, ids, amount, context=None): - if not amount: - return {'value':{'amount_in_company_currency': 0.0}} + if not amount or not ids: + return {'value':{'amount_in_company_currency': 0.0, 'amount_in_voucher_currency': 0.0}} for line in self.browse(cr, uid, ids, context=context): - amount = self.__company_currency_amount(cr, uid, line, amount, context=context) - return {'value': {'amount_in_company_currency': amount}} + amount_company_cur, amount_voucher_cur = self.__company_currency_amount(cr, uid, line, amount, context=context) + return {'value': {'amount_in_company_currency': amount_company_cur, 'amount_in_voucher_currency': amount_voucher_cur}} def _get_amount_in_company_currency(self, cr, uid, ids, name, args, context=None): res = {} for line in self.browse(cr, uid, ids, context=context): - res[line.id] = self.__company_currency_amount(cr, uid, line, line.amount, context=context) + amount_in_company_currency, amount_in_voucher_currency = self.__company_currency_amount(cr, uid, line, line.amount, context=context) + res[line.id] = { + 'amount_in_company_currency': amount_in_company_currency, + 'amount_in_voucher_currency': amount_in_voucher_currency, + } return res _columns = { 'voucher_id':fields.many2one('account.voucher', 'Voucher', required=1, ondelete='cascade'), + 'move_line_id': fields.many2one('account.move.line', 'Journal Item', required=True), + 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'), 'name':fields.char('Description', size=256), 'account_id':fields.many2one('account.account','Account', required=True), - 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'), - 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency'), - 'untax_amount':fields.float('Untax Amount'), - 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')), - 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), - 'move_line_id': fields.many2one('account.move.line', 'Journal Item', required=True), + 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'), + 'untax_amount':fields.float('Untax Amount'), + + 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency'), 'company_currency_id': fields.related('move_line_id','company_id','currency_id', type='many2one', relation='res.currency', string="Company Currency"), - 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account')), + 'voucher_currency_id': fields.related('voucher_id', 'currency_id', type='many2one', relation='res.currency', string="Voucher Currency"), + + 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')), + 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), + 'amount_in_voucher_currency': fields.function(_get_amount_in_company_currency, string='Amount in Voucher Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), + 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1), 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1), 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True), diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 1d6e2f19ddc..b4e249a0d33 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -301,7 +301,7 @@ invisible="context.get('line_type', False)" string="Paid Amount" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/> - + @@ -314,7 +314,7 @@ - + - + + + - + - + + + + + + + @@ -345,19 +353,20 @@ - - - + + + + + domain="[('type','=','other')]" colspan="4"/> + attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" colspan="4"/> + groups="analytic.group_analytic_accounting" colspan="4"/> From 69e5946d0f285e23735ac82f2088c006177533c2 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 15 Jul 2011 14:44:33 +0200 Subject: [PATCH 009/156] [IMP] account: display currency in name get of journals also for the ones in company currency bzr revid: qdp-launchpad@openerp.com-20110715124433-f61h47m09l83c07d --- addons/account/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/account.py b/addons/account/account.py index 03a9b628922..ad7b60ada4d 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -711,6 +711,8 @@ class account_journal(osv.osv): name = rs.name if rs.currency: name = "%s (%s)" % (rs.name, rs.currency.name) + else: + name = "%s (%s)" % (rs.name, rs.company_id.currency_id.name) res += [(rs.id, name)] return res From 3ff98eff3648564be8cbf6a5479498e524dc7a21 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 15 Jul 2011 14:47:12 +0200 Subject: [PATCH 010/156] [IMP] account: added move_id in tree view of payment in invoices form view, to allow the 'click and relate' feature to see the move line bzr revid: qdp-launchpad@openerp.com-20110715124712-8nnptyr3yy30nlse --- addons/account/account_invoice_view.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index be431c9b2e7..99a82e38485 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -238,6 +238,7 @@ + @@ -336,6 +337,7 @@ + From 930def9cfc58d3b8b5ad775fa642e4905df55b89 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 15 Jul 2011 14:47:38 +0200 Subject: [PATCH 011/156] [IMP] account_voucher: multi currency improvements (part 4) bzr revid: qdp-launchpad@openerp.com-20110715124738-q64m7ev5yk0denge --- addons/account_voucher/account_voucher.py | 56 ++++++++----------- .../voucher_payment_receipt_view.xml | 47 +++++++++------- 2 files changed, 49 insertions(+), 54 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index dd3af1139f4..a409092ed16 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -182,13 +182,13 @@ class account_voucher(osv.osv): ctx.update({'date': voucher.date}) for l in voucher.line_dr_ids: real_amount -= l.amount_in_company_currency - counter_for_writeoff -= l.amount_in_voucher_currency + counter_for_writeoff -= (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency #ctx.update({'date': l.date_original}) #counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) for l in voucher.line_cr_ids: real_amount += l.amount_in_company_currency - counter_for_writeoff += l.amount_in_voucher_currency + counter_for_writeoff += (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency #ctx.update({'date': l.date_original}) #counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) @@ -216,7 +216,7 @@ class account_voucher(osv.osv): ],'Default Type', readonly=True, states={'draft':[('readonly',False)]}), 'name':fields.char('Memo', size=256, readonly=True, states={'draft':[('readonly',False)]}), 'date':fields.date('Date', readonly=True, select=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"), - 'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}), + 'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}, change_default=1), 'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=True, states={'draft':[('readonly',False)]}), 'line_cr_ids':fields.one2many('account.voucher.line','voucher_id','Credits', @@ -229,6 +229,7 @@ class account_voucher(osv.osv): #duplicated field for display purposes 'currency_id2': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"), 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), + 'company_currency': fields.related('company_id','currency_id', type='many2one', relation='res.currency', string='Currency', readonly=True), 'state':fields.selection( [('draft','Draft'), ('proforma','Pro-forma'), @@ -256,7 +257,7 @@ class account_voucher(osv.osv): 'date_due': fields.date('Due Date', readonly=True, select=True, states={'draft':[('readonly',False)]}), 'payment_option':fields.selection([ ('without_writeoff', 'Keep Open'), - ('with_writeoff', 'Reconcile with Write-Off'), + ('with_writeoff', 'Reconcile'), ], 'Payment Difference', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', readonly=True, states={'draft': [('readonly', False)]}), 'comment': fields.char('Write-Off Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}), @@ -440,38 +441,33 @@ class account_voucher(osv.osv): @return: Returns a dict which contains new values, and context """ - if context is None: - context = {} if not journal_id: return {} + if context is None: + context = {} context_multi_currency = context.copy() if date: context_multi_currency.update({'date': date}) - line_pool = self.pool.get('account.voucher.line') - line_ids = ids and line_pool.search(cr, uid, [('voucher_id', '=', ids[0])]) or False - if line_ids: - line_pool.unlink(cr, uid, line_ids) - currency_pool = self.pool.get('res.currency') move_line_pool = self.pool.get('account.move.line') partner_pool = self.pool.get('res.partner') journal_pool = self.pool.get('account.journal') - - vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context) - vals = vals.get('value') + line_pool = self.pool.get('account.voucher.line') + #get default values + vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context=context) + vals = vals.get('value',{}) voucher_currency_id = vals.get('currency_id', voucher_currency_id) default = { 'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id': voucher_currency_id}, } - if not partner_id: - return default + #drop existing lines + line_ids = ids and line_pool.search(cr, uid, [('voucher_id', 'in', ids)]) or [] + if line_ids: + line_pool.unlink(cr, uid, line_ids, context=context) - if not partner_id and ids: - line_ids = line_pool.search(cr, uid, [('voucher_id', '=', ids[0])]) - if line_ids: - line_pool.unlink(cr, uid, line_ids) + if not partner_id: return default journal = journal_pool.browse(cr, uid, journal_id, context=context) @@ -583,7 +579,7 @@ class account_voucher(osv.osv): def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context=None): if not journal_id: - return False + return {} journal_pool = self.pool.get('account.journal') journal = journal_pool.browse(cr, uid, journal_id, context=context) account_id = journal.default_credit_account_id or journal.default_debit_account_id @@ -640,7 +636,6 @@ class account_voucher(osv.osv): raise osv.except_osv(_('Invalid action !'), _('Cannot delete Voucher(s) which are already opened or paid !')) return super(account_voucher, self).unlink(cr, uid, ids, context=context) - # TODO: may be we can remove this method if not used anyware def onchange_payment(self, cr, uid, ids, pay_now, journal_id, partner_id, ttype='sale'): res = {} if not partner_id: @@ -705,8 +700,6 @@ class account_voucher(osv.osv): voucher_currency = voucher.currency_id.id debit = 0.0 credit = 0.0 - # TODO: is there any other alternative then the voucher type ?? - # -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt if voucher.type in ('purchase', 'payment'): credit = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.amount, context=context_multi_currency) elif voucher.type in ('sale', 'receipt'): @@ -738,11 +731,11 @@ class account_voucher(osv.osv): #create the move line for the currency difference if voucher.currency_rate_difference: if voucher.currency_rate_difference > 0: - account_id = voucher.company_id.property_income_currency_exchange + account_id = voucher.company_id.property_expense_currency_exchange if not account_id: raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! ")) else: - account_id = voucher.company_id.property_expense_currency_exchange + account_id = voucher.company_id.property_income_currency_exchange if not account_id: raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) @@ -758,10 +751,9 @@ class account_voucher(osv.osv): 'date': voucher.date, 'date_maturity': voucher.date_due } - move_line_pool.create(cr, uid, currency_diff_line, context=context) - rec_list_ids = [] + rec_list_ids = [] for line in voucher.line_ids: #create one move line per voucher line where amount is not 0.0 if not line.amount: @@ -770,9 +762,6 @@ class account_voucher(osv.osv): if line.amount == line.amount_unreconciled: amount = line.move_line_id.amount_residual #residual amount in company currency else: - #ctx = context_multi_currency.copy() - #ctx.update({'date': line.date_original}) - #amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=ctx) amount = line.amount_in_company_currency move_line = { 'journal_id': voucher.journal_id.id, @@ -815,6 +804,7 @@ class account_voucher(osv.osv): rec_list_ids.append(rec_ids) if not currency_pool.is_zero(cr, uid, voucher.currency_id, voucher.writeoff_amount): + #create one line for the write off if needed diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) account_id = False write_off_name = '' @@ -831,9 +821,9 @@ class account_voucher(osv.osv): 'move_id': move_id, 'partner_id': voucher.partner_id.id, 'date': voucher.date, - 'credit': diff > 0 and diff or 0.0, 'debit': diff < 0 and -diff or 0.0, - 'amount_currency': company_currency <> voucher_currency and voucher.writeoff_amount or 0.0, + 'credit': diff > 0 and diff or 0.0, + 'amount_currency': company_currency <> voucher_currency and -voucher.writeoff_amount or 0.0, 'currency_id': company_currency <> voucher_currency and voucher_currency or False, } move_line_pool.create(cr, uid, move_line) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index b4e249a0d33..c2344d681c1 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -301,7 +301,7 @@ invisible="context.get('line_type', False)" string="Paid Amount" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/> - + @@ -320,32 +320,36 @@ on_change="onchange_move_line_id(move_line_id)" domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" /> - + - - - - - - - + + + + + + + - - - - - - + + + + - - - - + + + + + + + @@ -356,9 +360,11 @@ + + - + @@ -371,7 +377,6 @@ - From db61756ea7069646b61cd83d854284978c4ad816 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 15 Jul 2011 16:41:26 +0200 Subject: [PATCH 012/156] [IMP] account_voucher: onchange of the amount must assign it correctly if the same amount is found in move line list. If not, it must split it only on the lines with the same curerncy (not working yet). (improvements part 5) bzr revid: qdp-launchpad@openerp.com-20110715144126-6mq2dhkchwcxh51j --- addons/account_voucher/account_voucher.py | 52 +++++++++++++++++------ 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index a409092ed16..17940aa6f25 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -499,22 +499,38 @@ class account_voucher(osv.osv): ids = move_line_pool.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context) else: ids = context['move_line_ids'] + #order the lines by most old first ids.reverse() - moves = move_line_pool.browse(cr, uid, ids, context=context) + moves = move_line_pool.browse(cr, uid, ids, context=context) company_currency = journal.company_id.currency_id.id if company_currency != voucher_currency_id and ttype == 'payment': total_debit = currency_pool.compute(cr, uid, voucher_currency_id, company_currency, total_debit, context=context_multi_currency) elif company_currency != voucher_currency_id and ttype == 'receipt': total_credit = currency_pool.compute(cr, uid, voucher_currency_id, company_currency, total_credit, context=context_multi_currency) + invoice_id = context.get('invoice_id', False) + move_line_found = False for line in moves: if line.credit and line.reconcile_partial_id and ttype == 'receipt': continue if line.debit and line.reconcile_partial_id and ttype == 'payment': continue - total_credit += line.credit or 0.0 - total_debit += line.debit or 0.0 + if invoice_id and line.move_id.invoice_id.id == invoice_id: + move_line_found = line.id + break + if voucher_currency_id == company_currency: + if line.amount_residual == price: + move_line_found = line.id + break + total_credit += line.credit or 0.0 + total_debit += line.debit or 0.0 + elif voucher_currency_id == line.currency_id.id: + if line.amount_residual_currency == price: + move_line_found = line.id + break + total_credit += line.amount_currency or 0.0 + total_debit += line.amount_currency or 0.0 for line in moves: if line.credit and line.reconcile_partial_id and ttype == 'receipt': continue @@ -529,7 +545,7 @@ class account_voucher(osv.osv): 'move_line_id':line.id, 'account_id':line.account_id.id, 'amount_original': amount_original, - 'amount': 0.0, + 'amount': (move_line_found == line.id) and min(price, amount_unreconciled) or 0.0, 'currency_id': currency_id, 'voucher_currency_id': voucher_currency_id, 'date_original':line.date, @@ -539,14 +555,26 @@ class account_voucher(osv.osv): 'amount_in_company_currency': 0.0, } - #if line.credit: - # amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency)) - # rs['amount'] = amount - # total_debit -= amount - #else: - # amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency)) - # rs['amount'] = amount - # total_credit -= amount + if not move_line_found: + #TODO: this part isn't working really: we should assign the voucher amount on only lines that are or the same currency + if company_currency == voucher_currency_id: + if line.credit: + amount = min(amount_unreconciled, abs(total_debit)) + rs['amount'] = amount + total_debit -= amount + else: + amount = min(amount_unreconciled, abs(total_credit)) + rs['amount'] = amount + total_credit -= amount + elif voucher_currency_id == line.currency_id.id: + if line.credit: + amount = min(amount_unreconciled, abs(total_debit)) + rs['amount'] = amount + total_debit -= amount + else: + amount = min(amount_unreconciled, abs(total_credit)) + rs['amount'] = amount + total_credit -= amount default['value']['line_ids'].append(rs) if rs['type'] == 'cr': From 0e614785f9d10c65e2b9cc8479d8a5fe4762f0bb Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 21 Jul 2011 14:31:17 +0530 Subject: [PATCH 013/156] [FIX] Account voucher: payment date refused when check date not in the period is checked lp bug: https://launchpad.net/bugs/808751 fixed bzr revid: mra@mra-laptop-20110721090117-n3uhdgxvyrkmii7d --- addons/account_voucher/account_voucher.py | 30 +++++++++---------- .../wizard/account_statement_from_invoice.py | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 17940aa6f25..56f1c719624 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -152,11 +152,11 @@ class account_voucher(osv.osv): for l in line_dr_ids: real_amount -= l.get('amount_in_company_currency', 0.0) counter_for_writeoff -= currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) - counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) for l in line_cr_ids: real_amount += l.get('amount_in_company_currency', 0.0) counter_for_writeoff += currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) - counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) writeoff_amount = amount - counter_for_writeoff currency_rate_difference = real_amount - counter_for_currency_diff return writeoff_amount, currency_rate_difference @@ -167,7 +167,7 @@ class account_voucher(osv.osv): line_osv = self.pool.get("account.voucher.line") line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context) line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context) - writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context) + writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context) return {'value': {'writeoff_amount': writeoff_amount,}}# 'currency_rate_difference': currency_rate_diff}} def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): @@ -185,15 +185,15 @@ class account_voucher(osv.osv): counter_for_writeoff -= (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency #ctx.update({'date': l.date_original}) #counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) - counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) + counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) for l in voucher.line_cr_ids: real_amount += l.amount_in_company_currency counter_for_writeoff += (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency #ctx.update({'date': l.date_original}) #counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) - counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) + counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) writeoff_amount = voucher.amount - counter_for_writeoff - res[voucher.id]['writeoff_amount'] = writeoff_amount + res[voucher.id]['writeoff_amount'] = writeoff_amount res[voucher.id]['currency_rate_difference'] = real_amount - counter_for_currency_diff return res @@ -545,9 +545,9 @@ class account_voucher(osv.osv): 'move_line_id':line.id, 'account_id':line.account_id.id, 'amount_original': amount_original, - 'amount': (move_line_found == line.id) and min(price, amount_unreconciled) or 0.0, + 'amount': (move_line_found == line.id) and min(price, amount_unreconciled) or 0.0, 'currency_id': currency_id, - 'voucher_currency_id': voucher_currency_id, + 'voucher_currency_id': voucher_currency_id, 'date_original':line.date, 'company_currency_id': line.company_id.currency_id.id, 'date_due':line.date_maturity, @@ -766,7 +766,7 @@ class account_voucher(osv.osv): account_id = voucher.company_id.property_income_currency_exchange if not account_id: raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) - + currency_diff_line = { 'name': _('Currency Difference'), 'debit': voucher.currency_rate_difference > 0 and voucher.currency_rate_difference or 0.0, @@ -833,7 +833,7 @@ class account_voucher(osv.osv): if not currency_pool.is_zero(cr, uid, voucher.currency_id, voucher.writeoff_amount): #create one line for the write off if needed - diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) + diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) account_id = False write_off_name = '' if voucher.payment_option == 'with_writeoff': @@ -939,7 +939,7 @@ class account_voucher_line(osv.osv): def _get_amount_in_company_currency(self, cr, uid, ids, name, args, context=None): res = {} for line in self.browse(cr, uid, ids, context=context): - amount_in_company_currency, amount_in_voucher_currency = self.__company_currency_amount(cr, uid, line, line.amount, context=context) + amount_in_company_currency, amount_in_voucher_currency = self.__company_currency_amount(cr, uid, line, line.amount, context=context) res[line.id] = { 'amount_in_company_currency': amount_in_company_currency, 'amount_in_voucher_currency': amount_in_voucher_currency, @@ -961,8 +961,8 @@ class account_voucher_line(osv.osv): 'voucher_currency_id': fields.related('voucher_id', 'currency_id', type='many2one', relation='res.currency', string="Voucher Currency"), 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')), - 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), - 'amount_in_voucher_currency': fields.function(_get_amount_in_company_currency, string='Amount in Voucher Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), + 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), + 'amount_in_voucher_currency': fields.function(_get_amount_in_company_currency, string='Amount in Voucher Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1), 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1), @@ -1062,7 +1062,7 @@ class account_bank_statement(osv.osv): bank_st_line_obj = self.pool.get('account.bank.statement.line') st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context) if st_line.voucher_id: - voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context) + voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number, 'date': st_line.date}, context=context) if st_line.voucher_id.state == 'cancel': voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context) wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr) @@ -1072,7 +1072,7 @@ class account_bank_statement(osv.osv): 'move_ids': [(4, v.move_id.id, False)] }) - return move_line_obj.write(cr, uid, [x.id for x in v.move_ids], {'statement_id': st_line.statement_id.id}, context=context) + return move_line_obj.write(cr, uid, [x.id for x in v.move_ids], {'statement_id': st_line.statement_id.id, 'date': st_line.date}, update_check=False, context=context) return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context) account_bank_statement() diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index e4d728c8867..3509ac846b5 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -75,7 +75,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): statement.currency.id, amount, context=ctx) context.update({'move_line_ids': [line.id]}) - result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context) + result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), voucher_currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context) voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'), 'name': line.name, 'partner_id': line.partner_id.id, From 0465909c92d248e0a434dd85f8d78e7ff0be2c7a Mon Sep 17 00:00:00 2001 From: mtr Date: Mon, 1 Aug 2011 18:31:43 +0530 Subject: [PATCH 014/156] [ADD] account_voucher: added yaml for multicurrency i.e. USD-EUR, EUR-EUR, CAD-CHF bzr revid: mtr@mtr-20110801130143-wygzy83cztuqw3ub --- addons/account_voucher/__openerp__.py | 5 +- addons/account_voucher/test/case2_usd_eur.yml | 360 ++++++++++++++++++ addons/account_voucher/test/case3_eur_eur.yml | 331 ++++++++++++++++ addons/account_voucher/test/case4_cad_chf.yml | 181 +++++++++ 4 files changed, 876 insertions(+), 1 deletion(-) create mode 100644 addons/account_voucher/test/case2_usd_eur.yml create mode 100644 addons/account_voucher/test/case3_eur_eur.yml create mode 100644 addons/account_voucher/test/case4_cad_chf.yml diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 039d3e067af..d4331a81923 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -59,7 +59,10 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo "test/account_voucher.yml", "test/sales_receipt.yml", "test/sales_payment.yml", - "test/account_voucher_report.yml" + "test/account_voucher_report.yml", + "test/case2_usd_eur.yml", + "test/case3_eur_eur.yml", + "test/case4_cad_chf.yml", ], 'certificate': '0037580727101', "active": False, diff --git a/addons/account_voucher/test/case2_usd_eur.yml b/addons/account_voucher/test/case2_usd_eur.yml new file mode 100644 index 00000000000..39b0eb0edbb --- /dev/null +++ b/addons/account_voucher/test/case2_usd_eur.yml @@ -0,0 +1,360 @@ +- + I create a currency rate for USD for january of 1.333333 +- + !record {model: res.currency.rate, id: janu_usd}: + currency_id: base.USD + name: !eval "'%s-01-01' %(datetime.now().year)" + rate: 1.333333 +- + I create a currency rate for USD for february of 1.250000 +- + !record {model: res.currency.rate, id: febr_usd}: + currency_id: base.USD + name: !eval "'%s-02-01' %(datetime.now().year)" + rate: 1.250000 +- + I create a currency rate for USD for march of 1.111111 +- + !record {model: res.currency.rate, id: marc_usd}: + currency_id: base.USD + name: !eval "'%s-03-01' %(datetime.now().year)" + rate: 1.111111 +- + I create a currency rate for USD for april of 1.052632 +- + !record {model: res.currency.rate, id: apri_usd}: + currency_id: base.USD + name: !eval "'%s-04-01' %(datetime.now().year)" + rate: 1.052632 +- + I create a bank journal with EUR as currency +- + !record {model: account.journal, id: bank_journal_EUR}: + name: Bank Journal(EUR) + code: BEUR + type: bank + analytic_journal_id: account.sit + sequence_id: account.sequence_bank_journal + default_debit_account_id: account.cash + default_credit_account_id: account.cash + currency: base.EUR + company_id: base.main_company + view_id: account.account_journal_bank_view +- + I create a bank journal with USD as currency +- + !record {model: account.journal, id: bank_journal_USD}: + name: Bank Journal(USD) + code: BUSD + type: bank + analytic_journal_id: account.sit + sequence_id: account.sequence_bank_journal + default_debit_account_id: account.cash + default_credit_account_id: account.cash + currency: base.USD + company_id: base.main_company + view_id: account.account_journal_bank_view +- + I assign accounts for 'Income Curreny Rate' and 'Expense Currency Rate' +- + !record {model: res.company, id: base.main_company}: + property_expense_currency_exchange: account.o_expense + property_income_currency_exchange: account.o_income +- + I create a new partner Michael Geller +- + !record {model: res.partner, id: res_partner_michael0}: + address: + - city: paris + country_id: base.fr + name: Michael + street: 1 rue Rockfeller + type: invoice + zip: '75016' + name: Mr.Michael Geller +- + I create the first invoice on 1st January for 200 USD +- + !record {model: account.invoice, id: account_first_invoice_jan}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.USD + date_invoice: !eval "'%s-01-01' %(datetime.now().year)" + period_id: account.period_1 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 200.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_michael0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan} +- + I check that first invoice move is correct +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 150.00), "Invoice move is incorrect for debtors account" +- + I create the second invoice on 1st February for 100 USD +- + !record {model: account.invoice, id: account_second_invoice_feb}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.USD + date_invoice: !eval "'%s-02-01' %(datetime.now().year)" + period_id: account.period_2 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 100.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_michael0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_second_invoice_feb} +- + I check that second invoice move is correct for debtor account (debit - credit == 80) +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 80), "Invoice move is incorrect for debtors account" +- + I create the first voucher of payment with values 240 EUR, journal EUR, and fill amount 180 for the invoice of 200$ and 70 for the 100$ invoice. +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michael0"), ref('bank_journal_EUR'), 240.0, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 240.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.EUR'), + 'journal_id': ref('bank_journal_EUR'), + 'partner_id': ref('res_partner_michael0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-03-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'First payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 200: + item['amount'] = 180 + else: + item['amount'] = 70 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is 15 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == 15), "writeoff amount is not 15" +- + I check that currency rate difference is -34 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.currency_rate_difference == -34), "currency rate difference is not -34" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher state is posted +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher state is not posted" +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with -180 and -70 as amount_currency columns and their credit columns are respectively 135 and 56 and currency is USD($). +- + I check that my Currency Difference entry is created with a credit of 34, amount currency as 0.0 +- + I check that my write-off entry is created with a credit of 15.00 and amount currency as 0.0 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + if move_line.amount_currency == -180: + assert move_line.credit == 135, "Debtor account has wrong entry." + if move_line.amount_currency == -70: + assert move_line.credit == 56.00, "Debtor account has wrong entry." + if move_line.credit == 34: + assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." + if move_line.credit == 15.00: + assert move_line.credit == 0.00, "Writeoff amount is wrong." +- + I check the residual amount of Invoice1, should be 20 in residual currency and 15 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" +- + I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" +- + I create the second voucher of payment with values, 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$ +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michael0"), ref('bank_journal_EUR'), 45.0, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 45.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.USD'), + 'journal_id': ref('bank_journal_USD'), + 'partner_id': ref('res_partner_michael0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-04-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'Second payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 20: + item['amount'] = 20 + else: + item['amount'] = 30 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is -5 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == -5), "writeoff amount is not -5" +- + I check that currency rate difference is -8.50 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + curr_diff = voucher_id.currency_rate_difference + assert (voucher_id.currency_rate_difference == curr_diff), "currency rate difference is not -8.50" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher state is posted +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher state is not posted" +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). +- + I check that my Currency Difference entry is created with a credit of 8.5 +- + I check that my write-off entry is created with a debit of 4.75 and amount currency as 0.0 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + d + if move_line.amount_currency == -20: + assert move_line.credit == 15, "Debtor account has wrong entry." + if move_line.amount_currency == -30: + assert move_line.credit == 24, "Debtor account has wrong entry." + if move_line.credit == 8.5: + assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." + if move_line.credit == 5: + assert move_line.credit == 4.75, "Writeoff amount is wrong." +- + I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" +- + I check the residual amuont of invoice 2, should be 0 in residual currency and 0 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" \ No newline at end of file diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml new file mode 100644 index 00000000000..bce4feb5a3d --- /dev/null +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -0,0 +1,331 @@ +- + I create a currency rate for EUR for january of 1.000000 +- + !record {model: res.currency.rate, id: jan_eur}: + currency_id: base.EUR + name: !eval "'%s-01-01' %(datetime.now().year)" + rate: 1.000000 +- + I create a currency rate for EUR for february of 1.000000 +- + !record {model: res.currency.rate, id: feb_eur}: + currency_id: base.EUR + name: !eval "'%s-02-01' %(datetime.now().year)" + rate: 1.000000 +- + I create a currency rate for EUR for march of 1.000000 +- + !record {model: res.currency.rate, id: mar_eur}: + currency_id: base.EUR + name: !eval "'%s-03-01' %(datetime.now().year)" + rate: 1.000000 +- + I create a currency rate for EUR for april of 1.000000 +- + !record {model: res.currency.rate, id: apr_eur}: + currency_id: base.EUR + name: !eval "'%s-04-01' %(datetime.now().year)" + rate: 1.000000 +- + I create a bank journal with EUR as currency +- + !record {model: account.journal, id: bank_journal_EUR}: + name: Bank Journal(EUR) + code: BEUR + type: bank + analytic_journal_id: account.sit + sequence_id: account.sequence_bank_journal + default_debit_account_id: account.cash + default_credit_account_id: account.cash + currency: base.EUR + company_id: base.main_company + view_id: account.account_journal_bank_view +- + I assign accounts for 'Income Curreny Rate' and 'Expense Currency Rate' +- + !record {model: res.company, id: base.main_company}: + property_expense_currency_exchange: account.o_expense + property_income_currency_exchange: account.o_income +- + I create a new partner Peter Lawson. +- + !record {model: res.partner, id: res_partner_peter0}: + address: + - city: paris + country_id: base.fr + name: Peter + street: 1 rue Rockfeller + type: invoice + zip: '75016' + name: Mr.Peter Lawson +- + I create the first invoice on 1st January for 150 EUR +- + !record {model: account.invoice, id: account_first_invoice_jan_eur}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.EUR + date_invoice: !eval "'%s-01-01' %(datetime.now().year)" + period_id: account.period_1 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 150.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_peter0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_eur} +- + I check that first invoice move is correct +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 150.00), "Invoice move is incorrect for debtors account" +- + I create the first invoice on 1st February for 80 EUR +- + !record {model: account.invoice, id: account_second_invoice_feb_eur}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.EUR + date_invoice: !eval "'%s-02-01' %(datetime.now().year)" + period_id: account.period_1 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 80.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_peter0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_second_invoice_feb_eur} +- + I check that second invoice move is correct +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 80.00), "Invoice move is incorrect for debtors account" +- + I create the first voucher of payment with values 120 EUR, journal EUR, and fill amounts 100 for the invoice of 150 and 20 for the 80 EUR invoice. +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 120.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.EUR'), + 'journal_id': ref('bank_journal_EUR'), + 'partner_id': ref('res_partner_peter0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-03-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'First payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 150: + item['amount'] = 100 + else: + item['amount'] = 20 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is 0 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == 0), "writeoff amount is not 0" +- + I check that currency rate difference is 0.00 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.currency_rate_difference == 0.00), "currency rate difference is not 0.00" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher state is posted +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher state is not posted" +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with 0.00 and 0.00 as amount_currency columns and their credit are 20 and 100 respectively +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + if move_line.credit == 20: + assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." + if move_line.credit == 100: + assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." +- + I check the residual amount of Invoice1 is 50 +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" +- + I check the residual amuont of Invoice2 is 60 +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" +- + I create the second voucher of payment and check to let open the debtor overpaid amount. +- + I create the second voucher of payment with Paid Amount as 120, journal EUR, and fill amount 50 for the residual amount 50 for the invoice of 150 and 70 for the residual amount 60 for the invoice of 80 +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.0, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 120.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.EUR'), + 'journal_id': ref('bank_journal_EUR'), + 'partner_id': ref('res_partner_peter0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-04-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'Second payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 50.00: + item['amount'] = 50.00 + elif item['amount_unreconciled'] == 60.00: + item['amount'] = 70.00 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is 0.00 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'),('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == 0.00), "writeoff amount is not 0" +- + I check that currency rate difference is 0.00 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + curr_diff = voucher_id.currency_rate_difference + assert (voucher_id.currency_rate_difference == curr_diff), "currency rate difference is not 0" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher state is posted +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher state is not posted" +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with 0.00 and 0.00 as amount_currency columns and their credit are 70 and 50 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + if move_line.credit == 70.00: + assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." + if move_line.credit == 50.00: + assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." +- + I check the residual amount of Invoice1 is 0 +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" +- + I check the residual amuont of Invoice2 is -10 +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" \ No newline at end of file diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml new file mode 100644 index 00000000000..2156ec813ff --- /dev/null +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -0,0 +1,181 @@ +- + I create a currency rate for CAD for january of 1.338800 +- + !record {model: res.currency.rate, id: jan_cad}: + currency_id: base.CAD + name: !eval "'%s-01-01' %(datetime.now().year)" + rate: 1.338800 +- + I create a currency rate for CAD for march of 0.500000 +- + !record {model: res.currency.rate, id: mar_cad}: + currency_id: base.CAD + name: !eval "'%s-03-01' %(datetime.now().year)" + rate: 0.500000 +- + I create a currency rate for CHF for january of 1.308600 +- + !record {model: res.currency.rate, id: jan_chf}: + currency_id: base.CHF + name: !eval "'%s-01-01' %(datetime.now().year)" + rate: 1.308600 +- + I create a bank journal with CHF as currency +- + !record {model: account.journal, id: bank_journal_CHF}: + name: Bank Journal(CHF) + code: BCHF + type: bank + analytic_journal_id: account.sit + sequence_id: account.sequence_bank_journal + default_debit_account_id: account.cash + default_credit_account_id: account.cash + currency: base.CHF + company_id: base.main_company + view_id: account.account_journal_bank_view +- + I assign accounts for 'Income Curreny Rate' and 'Expense Currency Rate' +- + !record {model: res.company, id: base.main_company}: + property_expense_currency_exchange: account.o_expense + property_income_currency_exchange: account.o_income +- + I create a new partner John Armani. +- + !record {model: res.partner, id: res_partner_john0}: + address: + - city: paris + country_id: base.fr + name: John + street: 1 rue Rockfeller + type: invoice + zip: '75016' + name: Mr.John Armani +- + I create the first invoice on 1st January for 200 CAD +- + !record {model: account.invoice, id: account_first_invoice_jan_cad}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.CAD + date_invoice: !eval "'%s-01-01' %(datetime.now().year)" + period_id: account.period_1 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 200.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_john0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_cad} +- + I check that accounting move for first invoice is correct +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_cad")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 149.39), "Invoice move is incorrect for debtors account" +- + I create the first voucher of payment with Paid amount as 300, journal CHF, and fill amounts 200 for the invoice of 200. +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_john0"), ref('bank_journal_CHF'), 300.0, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 120.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.CHF'), + 'journal_id': ref('bank_journal_CHF'), + 'partner_id': ref('res_partner_john0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-03-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'First payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 200: + item['amount'] = 200 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is 175 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == 175), "writeoff amount is not 175" +- + I check that currency rate difference is 49.39 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.currency_rate_difference == 49.39), "currency rate difference is not 0.00" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher state is posted +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher state is not posted" +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). +- + I check that my Currency Difference entry is created with a credit of 8.5 +- + I check that my write-off entry is created with a debit of 4.75 and amount currency as 0.0 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment')]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + if move_line.amount_currency == -200: + assert move_line.credit == 149.39, "Debtor account has wrong entry." + if move_line.credit == 49.39: + assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." + if move_line.credit == -140.00: + assert move_line.credit == -175, "Writeoff amount is wrong." +- + I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + residual_curr = move_line.amount_residual_currency + residual = move_line.amount_residual + assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" +- \ No newline at end of file From 97e4c6efb0457103ba9495890eca6ffcdbebe945 Mon Sep 17 00:00:00 2001 From: "psi(OpenERP),mtr(OpenERP)" <> Date: Tue, 2 Aug 2011 11:49:50 +0530 Subject: [PATCH 015/156] [ADD] account_voucher: added yaml for multi-currency i.e. USD-USD bzr revid: mtr@mtr-20110802061950-t0eah4pcj1vs1yp6 --- addons/account_voucher/__openerp__.py | 1 + addons/account_voucher/test/case1_usd_usd.yml | 345 ++++++++++++++++++ 2 files changed, 346 insertions(+) create mode 100755 addons/account_voucher/test/case1_usd_usd.yml diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index d4331a81923..dc7747fb593 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -60,6 +60,7 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo "test/sales_receipt.yml", "test/sales_payment.yml", "test/account_voucher_report.yml", + "test/case1_usd_usd.yml", "test/case2_usd_eur.yml", "test/case3_eur_eur.yml", "test/case4_cad_chf.yml", diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml new file mode 100755 index 00000000000..7751849120e --- /dev/null +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -0,0 +1,345 @@ +- + I create a currency rate for USD for january of 1.333333 +- + !record {model: res.currency.rate, id: jan_usd}: + currency_id: base.USD + name: !eval "'%s-01-01' %(datetime.now().year)" + rate: 1.333333 + +- + I create a currency rate for USD for february of 1.250000 +- + !record {model: res.currency.rate, id: feb_usd}: + currency_id: base.USD + name: !eval "'%s-02-01' %(datetime.now().year)" + rate: 1.250000 + +- + I create a currency rate for USD for march of 1.111111 +- + !record {model: res.currency.rate, id: mar_usd}: + currency_id: base.USD + name: !eval "'%s-03-01' %(datetime.now().year)" + rate: 1.111111 + +- + I create a currency rate for USD for april of 1.052632 +- + !record {model: res.currency.rate, id: apr_usd}: + currency_id: base.USD + name: !eval "'%s-04-01' %(datetime.now().year)" + rate: 1.052632 + +- + I create a bank journal with USD as currency +- + !record {model: account.journal, id: bank_journal_USD}: + name: Bank Journal(USD) + code: BUSD + type: bank + analytic_journal_id: account.sit + sequence_id: account.sequence_bank_journal + default_debit_account_id: account.cash + default_credit_account_id: account.cash + currency: base.USD + company_id: base.main_company + view_id: account.account_journal_bank_view + +- + I set up some accounts for currency rate expense/income in my company +- + !record {model: res.company, id: base.main_company}: + property_expense_currency_exchange: account.o_expense + property_income_currency_exchange: account.o_income +- + I'm creating new partner "Mr. strauss". +- + !record {model: res.partner, id: res_partner_strauss0}: + address: + - city: paris + country_id: base.fr + name: Mark Strauss + street: 1 rue Rockfeller + type: invoice + zip: '75016' + name: Mr. Mark Strauss +- + I create the first invoice on 1st January for 200 USD +- + !record {model: account.invoice, id: account_invoice_jan}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.USD + date_invoice: !eval "'%s-01-01' %(datetime.now().year)" + period_id: account.period_1 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 200.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_strauss0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_jan} +- + I check that first invoice move is correct for debtor account (debit - credit == 150.0) +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_jan")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 150.0), "Invoice move is correct for debtors account" +- + I create the second invoice on 1st February for 100 USD +- + !record {model: account.invoice, id: account_invoice_feb}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_3000 + address_invoice_id: base.res_partner_address_3000 + company_id: base.main_company + currency_id: base.USD + date_invoice: !eval "'%s-02-01' %(datetime.now().year)" + period_id: account.period_2 + invoice_line: + - account_id: account.a_sale + name: '[PC1] Basic PC' + price_unit: 100.0 + quantity: 1.0 + product_id: product.product_product_pc1 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_strauss0 + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_feb} +- + I check that second invoice move is correct for debtor account (debit - credit == 80) +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_feb")) + assert invoice_id.move_id, "Move not created for open invoice" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.debit - move_line.credit == 80), "Invoice move is correct for debtors account" + +- + I create the first voucher of payment + +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 240.0, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 240.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.USD'), + 'journal_id': ref('bank_journal_USD'), + 'partner_id': ref('res_partner_strauss0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-03-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'First payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 200: + item['amount'] = 180 + else: + item['amount'] = 70 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is -10 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == -10), "writeoff amount is not -10" +- + I check that currency rate difference is -34 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.currency_rate_difference == -34), "currency rate difference is not -34" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher is valid +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher is not balanced" + +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with -180 and -70 as amount_currency columns and that their credit columns are respectively 135 and 56 +- + I check that my currency rate difference is correct. 34 in credit with no amount_currency +- + I check that my write-off is correct. 9 debit and 10 amount_currency +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + if move_line.amount_currency == -180: + assert move_line.credit == 135.00, "Debtor account has wrong entry." + if move_line.amount_currency == -70: + assert move_line.credit == 56.00, "Debtor account has wrong entry." + if move_line.credit == 34.00: + assert move_line.amount_currency == 0, "Incorrect currency rate difference." + if move_line.amount_currency == 10: + assert move_line.debit == 9.0, "Writeoff amount is wrong." +- + I check the residual amount of Invoice1, should be 20 in amount_currency and 15 in company currency +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_jan")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.amount_residual_currency == 20.0 and move_line.amount_residual == 15.0) , "Residual amount is not correct for first Invoice" +- + I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_feb")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.amount_residual_currency == 30.0 and move_line.amount_residual == 24.0) , "Residual amount is not correct for first Invoice" +- + I create the second voucher of payment with Paid Amount as 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$ +- + !python {model: account.voucher}: | + import netsvc, time + vals = {} + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 45.0, 2, ttype='receipt', date=False) + vals = { + 'account_id': ref('account.cash'), + 'amount': 45.0, + 'company_id': ref('base.main_company'), + 'currency_id': ref('base.USD'), + 'journal_id': ref('bank_journal_USD'), + 'partner_id': ref('res_partner_strauss0'), + 'period_id': ref('account.period_3'), + 'type': 'receipt', + 'date': time.strftime("%Y-04-01"), + 'payment_option': 'with_writeoff', + 'writeoff_acc_id': ref('account.a_expense'), + 'comment': 'Write Off', + 'name': 'Second payment', + } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] + for item in res['value']['line_cr_ids']: + if item['amount_unreconciled'] == 20: + item['amount'] = 20 + else: + item['amount'] = 30 + vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] + id = self.create(cr, uid, vals) + voucher_id = self.browse(cr, uid, id) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is -5 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert (voucher_id.writeoff_amount == -5), "writeoff amount is not -5" +- + I check that currency rate difference is -8.50 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + curr_diff = voucher_id.currency_rate_difference + assert (voucher_id.currency_rate_difference == curr_diff), "currency rate difference is not -8.50" +- + I confirm the voucher +- + !python {model: account.voucher}: | + import netsvc + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) +- + I check that my voucher state is posted +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + assert voucher_id.state == 'posted', "Voucher state is not posted" +- + I check that my debtor account is correct +- + I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). +- + I check that my Currency Difference entry is created with a credit of 8.5 +- + I check that my write-off entry is created with a debit of 4.75 and amount currency as 0.0 +- + !python {model: account.voucher}: | + voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) + voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + if move_line.amount_currency == -20: + assert move_line.credit == 15, "Debtor account has wrong entry." + if move_line.amount_currency == -30: + assert move_line.credit == 24, "Debtor account has wrong entry." + if move_line.credit == 8.5: + assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." + if move_line.credit == 5: + assert move_line.credit == 4.75, "Writeoff amount is wrong." +- + I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_jan")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for first Invoice" +- + I check the residual amuont of Invoice2, should be 0 in residual currency and 0 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_feb")) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) + move_line = move_line_obj.browse(cr, uid, move_lines[0]) + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for second Invoice" \ No newline at end of file From 437c84191e4b16681177f62cb6f5ac1c47ca1ece Mon Sep 17 00:00:00 2001 From: mtr Date: Tue, 2 Aug 2011 12:23:44 +0530 Subject: [PATCH 016/156] [IMP] account_voucher: minor changes in yaml bzr revid: mtr@mtr-20110802065344-ewaqf3etl687gjlg --- addons/account_voucher/test/case2_usd_eur.yml | 18 +++++------------- addons/account_voucher/test/case3_eur_eur.yml | 16 ++++------------ addons/account_voucher/test/case4_cad_chf.yml | 6 ++---- 3 files changed, 11 insertions(+), 29 deletions(-) diff --git a/addons/account_voucher/test/case2_usd_eur.yml b/addons/account_voucher/test/case2_usd_eur.yml index 39b0eb0edbb..25d69a95bb1 100644 --- a/addons/account_voucher/test/case2_usd_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur.yml @@ -214,7 +214,7 @@ I check that my write-off entry is created with a credit of 15.00 and amount currency as 0.0 - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) @@ -235,9 +235,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 20.0 and move_line.amount_residual == 15) , "Residual amount is not correct for first Invoice" - I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual - @@ -246,9 +244,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" + assert (move_line.amount_residual_currency == 30 and move_line.amount_residual == 24) , "Residual amount is not correct for second Invoice" - I create the second voucher of payment with values, 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$ - @@ -344,9 +340,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for first Invoice" - I check the residual amuont of invoice 2, should be 0 in residual currency and 0 in amount_residual - @@ -355,6 +349,4 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" \ No newline at end of file + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for second Invoice" \ No newline at end of file diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index bce4feb5a3d..d1b5de784a9 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -213,9 +213,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 50.0 and move_line.amount_residual == 50.0) , "Residual amount is not correct for first Invoice" - I check the residual amuont of Invoice2 is 60 - @@ -224,9 +222,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" + assert (move_line.amount_residual_currency == 60.0 and move_line.amount_residual == 60.0) , "Residual amount is not correct for second Invoice" - I create the second voucher of payment and check to let open the debtor overpaid amount. - @@ -315,9 +311,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 0 and move_line.amount_residual == 0) , "Residual amount is not correct for first Invoice" - I check the residual amuont of Invoice2 is -10 - @@ -326,6 +320,4 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for second Invoice" \ No newline at end of file + assert (move_line.amount_residual_currency == -10.0 and move_line.amount_residual == -10.0) , "Residual amount is not correct for second Invoice" \ No newline at end of file diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index 2156ec813ff..6ba92f6c8f3 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -168,14 +168,12 @@ if move_line.credit == -140.00: assert move_line.credit == -175, "Writeoff amount is wrong." - - I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual + I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - residual_curr = move_line.amount_residual_currency - residual = move_line.amount_residual - assert (move_line.amount_residual_currency == residual_curr and move_line.amount_residual == residual) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for first Invoice" - \ No newline at end of file From 1a3ac2facc5fd1304adeeccae4dffa02e0f4ff23 Mon Sep 17 00:00:00 2001 From: mtr Date: Wed, 3 Aug 2011 15:36:33 +0530 Subject: [PATCH 017/156] [IMP] account_voucher: improved string/sentence and code in yml bzr revid: mtr@mtr-20110803100633-xsh3olpk5bhc00at --- addons/account_voucher/test/case1_usd_usd.yml | 57 +++++++++++-------- addons/account_voucher/test/case2_usd_eur.yml | 57 ++++++++++--------- addons/account_voucher/test/case3_eur_eur.yml | 38 +++++++------ addons/account_voucher/test/case4_cad_chf.yml | 44 ++++++++------ 4 files changed, 112 insertions(+), 84 deletions(-) diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index 7751849120e..a4e59ccc4b3 100755 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -52,7 +52,7 @@ property_expense_currency_exchange: account.o_expense property_income_currency_exchange: account.o_income - - I'm creating new partner "Mr. strauss". + I create new partner Mark Strauss. - !record {model: res.partner, id: res_partner_strauss0}: address: @@ -97,7 +97,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.debit - move_line.credit == 150.0), "Invoice move is correct for debtors account" + assert (move_line.debit - move_line.credit == 150.0), "Invoice move is not correct for debtors account" - I create the second invoice on 1st February for 100 USD - @@ -132,7 +132,7 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.debit - move_line.credit == 80), "Invoice move is correct for debtors account" + assert (move_line.debit - move_line.credit == 80), "Invoice move is not correct for debtors account" - I create the first voucher of payment @@ -191,13 +191,15 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - - I check that my voucher is valid + I check that the move of my first voucher is valid - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert voucher_id.state == 'posted', "Voucher is not balanced" - + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + assert move_line.state == 'valid', "Voucher move is not valid" - I check that my debtor account is correct - @@ -215,11 +217,11 @@ for move_line in move_line_obj.browse(cr, uid, move_lines): if move_line.amount_currency == -180: assert move_line.credit == 135.00, "Debtor account has wrong entry." - if move_line.amount_currency == -70: + elif move_line.amount_currency == -70: assert move_line.credit == 56.00, "Debtor account has wrong entry." - if move_line.credit == 34.00: + elif move_line.credit == 34.00: assert move_line.amount_currency == 0, "Incorrect currency rate difference." - if move_line.amount_currency == 10: + elif move_line.amount_currency == 10: assert move_line.debit == 9.0, "Writeoff amount is wrong." - I check the residual amount of Invoice1, should be 20 in amount_currency and 15 in company currency @@ -231,7 +233,7 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.amount_residual_currency == 20.0 and move_line.amount_residual == 15.0) , "Residual amount is not correct for first Invoice" - - I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual + I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_invoice_feb")) @@ -240,7 +242,9 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.amount_residual_currency == 30.0 and move_line.amount_residual == 24.0) , "Residual amount is not correct for first Invoice" - - I create the second voucher of payment with Paid Amount as 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$ + I create the second voucher of payment + + - !python {model: account.voucher}: | import netsvc, time @@ -296,20 +300,23 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - - I check that my voucher state is posted + I check that the move of my second voucher is valid - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert voucher_id.state == 'posted', "Voucher state is not posted" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + assert move_line.state == 'valid', "Voucher move is not valid" - I check that my debtor account is correct - - I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). + I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24. - - I check that my Currency Difference entry is created with a credit of 8.5 + I check that my currency rate difference is correct. 8.5 in credit with no amount_currency - - I check that my write-off entry is created with a debit of 4.75 and amount currency as 0.0 + I check that my writeoff is correct. 4.75 debit and 5 amount_currency - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) @@ -319,27 +326,27 @@ for move_line in move_line_obj.browse(cr, uid, move_lines): if move_line.amount_currency == -20: assert move_line.credit == 15, "Debtor account has wrong entry." - if move_line.amount_currency == -30: + elif move_line.amount_currency == -30: assert move_line.credit == 24, "Debtor account has wrong entry." - if move_line.credit == 8.5: + elif move_line.credit == 8.5: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." - if move_line.credit == 5: - assert move_line.credit == 4.75, "Writeoff amount is wrong." + elif move_line.amount_currency == 5: + assert move_line.debit == 4.75, "Writeoff amount is wrong." - - I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual + I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual and paid - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_invoice_jan")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice" - - I check the residual amuont of Invoice2, should be 0 in residual currency and 0 in amount_residual + I check the residual amuont of Invoice2, should be 0 in residual currency and 0 in amount_residual and paid - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_invoice_feb")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for second Invoice" \ No newline at end of file + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for second Invoice" \ No newline at end of file diff --git a/addons/account_voucher/test/case2_usd_eur.yml b/addons/account_voucher/test/case2_usd_eur.yml index 25d69a95bb1..35e0bf86231 100644 --- a/addons/account_voucher/test/case2_usd_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur.yml @@ -55,7 +55,7 @@ company_id: base.main_company view_id: account.account_journal_bank_view - - I assign accounts for 'Income Curreny Rate' and 'Expense Currency Rate' + I set up some accounts for currency rate expense/income in my company - !record {model: res.company, id: base.main_company}: property_expense_currency_exchange: account.o_expense @@ -98,7 +98,7 @@ - !workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan} - - I check that first invoice move is correct + I check that first invoice move is correct for debtor account(debit - credit == 150) - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) @@ -143,7 +143,8 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.debit - move_line.credit == 80), "Invoice move is incorrect for debtors account" - - I create the first voucher of payment with values 240 EUR, journal EUR, and fill amount 180 for the invoice of 200$ and 70 for the 100$ invoice. + I create the first voucher of payment + - !python {model: account.voucher}: | import netsvc, time @@ -198,20 +199,23 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - - I check that my voucher state is posted + I check that the move of my voucher is valid - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert voucher_id.state == 'posted', "Voucher state is not posted" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + assert move_line.state == 'valid', "Voucher move is not valid" - I check that my debtor account is correct - - I check that the debtor account has 2 new lines with -180 and -70 as amount_currency columns and their credit columns are respectively 135 and 56 and currency is USD($). + I check that the debtor account has 2 new lines with -180 and -70 in amount_currency columns and their credit columns are respectively 135 and 56 and currency is USD($). - - I check that my Currency Difference entry is created with a credit of 34, amount currency as 0.0 + I check that my currency rate difference is correct. 34 in credit with no amount_currency - - I check that my write-off entry is created with a credit of 15.00 and amount currency as 0.0 + I check that my writeoff is correct. 15 in credit with no amount_currency - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) @@ -221,12 +225,12 @@ for move_line in move_line_obj.browse(cr, uid, move_lines): if move_line.amount_currency == -180: assert move_line.credit == 135, "Debtor account has wrong entry." - if move_line.amount_currency == -70: + elif move_line.amount_currency == -70: assert move_line.credit == 56.00, "Debtor account has wrong entry." - if move_line.credit == 34: + elif move_line.credit == 34: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." - if move_line.credit == 15.00: - assert move_line.credit == 0.00, "Writeoff amount is wrong." + elif move_line.credit == 15.00: + assert move_line.amount_currency == 0.00, "Writeoff amount is wrong." - I check the residual amount of Invoice1, should be 20 in residual currency and 15 in amount_residual - @@ -246,7 +250,8 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.amount_residual_currency == 30 and move_line.amount_residual == 24) , "Residual amount is not correct for second Invoice" - - I create the second voucher of payment with values, 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$ + I create the second voucher of payment + - !python {model: account.voucher}: | import netsvc, time @@ -291,8 +296,7 @@ !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - curr_diff = voucher_id.currency_rate_difference - assert (voucher_id.currency_rate_difference == curr_diff), "currency rate difference is not -8.50" + assert (voucher_id.currency_rate_difference == -8.50), "currency rate difference is not -8.50" - I confirm the voucher - @@ -311,11 +315,11 @@ - I check that my debtor account is correct - - I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). + I check that the debtor account has 2 new lines with -20 and -30 in amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). - - I check that my Currency Difference entry is created with a credit of 8.5 + I check that my currency rate difference is correct. 8.50 in credit with no amount_currency - - I check that my write-off entry is created with a debit of 4.75 and amount currency as 0.0 + I check that my writeoff is correct. 4.75 in debit and 5 in amount_currency - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) @@ -323,30 +327,29 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): - d if move_line.amount_currency == -20: assert move_line.credit == 15, "Debtor account has wrong entry." - if move_line.amount_currency == -30: + elif move_line.amount_currency == -30: assert move_line.credit == 24, "Debtor account has wrong entry." - if move_line.credit == 8.5: + elif move_line.credit == 8.5: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." - if move_line.credit == 5: - assert move_line.credit == 4.75, "Writeoff amount is wrong." + elif move_line.amount_currency == 5: + assert move_line.debit == 4.75, "Writeoff amount is wrong." - - I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual + I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual and paid - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice" - - I check the residual amuont of invoice 2, should be 0 in residual currency and 0 in amount_residual + I check the residual amuont of invoice 2, should be 0 in residual currency and 0 in amount_residual and paid - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for second Invoice" \ No newline at end of file + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for second Invoice" \ No newline at end of file diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index d1b5de784a9..5779028641e 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -41,7 +41,7 @@ company_id: base.main_company view_id: account.account_journal_bank_view - - I assign accounts for 'Income Curreny Rate' and 'Expense Currency Rate' + I set up some accounts for currency rate expense/income in my company - !record {model: res.company, id: base.main_company}: property_expense_currency_exchange: account.o_expense @@ -84,7 +84,7 @@ - !workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_eur} - - I check that first invoice move is correct + I check that first invoice move is correct for debtor account(debit - credit == 150) - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur")) @@ -94,7 +94,7 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.debit - move_line.credit == 150.00), "Invoice move is incorrect for debtors account" - - I create the first invoice on 1st February for 80 EUR + I create the second invoice on 1st February for 80 EUR - !record {model: account.invoice, id: account_second_invoice_feb_eur}: account_id: account.a_recv @@ -119,7 +119,7 @@ - !workflow {model: account.invoice, action: invoice_open, ref: account_second_invoice_feb_eur} - - I check that second invoice move is correct + I check that second invoice move is correct for debtor account (debit - credit == 80) - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur")) @@ -129,7 +129,8 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.debit - move_line.credit == 80.00), "Invoice move is incorrect for debtors account" - - I create the first voucher of payment with values 120 EUR, journal EUR, and fill amounts 100 for the invoice of 150 and 20 for the 80 EUR invoice. + I create the first voucher of payment + - !python {model: account.voucher}: | import netsvc, time @@ -162,7 +163,7 @@ voucher_id = self.browse(cr, uid, id) assert (voucher_id.state=='draft'), "Voucher is not in draft state" - - I check that writeoff amount computed is 0 + I check that writeoff amount computed is 0.00 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) @@ -184,16 +185,19 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - - I check that my voucher state is posted + I check that the move of my first voucher is valid - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert voucher_id.state == 'posted', "Voucher state is not posted" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + assert move_line.state == 'valid', "Voucher move is not valid" - I check that my debtor account is correct - - I check that the debtor account has 2 new lines with 0.00 and 0.00 as amount_currency columns and their credit are 20 and 100 respectively + I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 20 and 100 respectively - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) @@ -203,7 +207,7 @@ for move_line in move_line_obj.browse(cr, uid, move_lines): if move_line.credit == 20: assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." - if move_line.credit == 100: + elif move_line.credit == 100: assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." - I check the residual amount of Invoice1 is 50 @@ -225,8 +229,7 @@ assert (move_line.amount_residual_currency == 60.0 and move_line.amount_residual == 60.0) , "Residual amount is not correct for second Invoice" - I create the second voucher of payment and check to let open the debtor overpaid amount. -- - I create the second voucher of payment with Paid Amount as 120, journal EUR, and fill amount 50 for the residual amount 50 for the invoice of 150 and 70 for the residual amount 60 for the invoice of 80 + - !python {model: account.voucher}: | import netsvc, time @@ -282,16 +285,19 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - - I check that my voucher state is posted + I check that the move of my second voucher is valid - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert voucher_id.state == 'posted', "Voucher state is not posted" + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + assert move_line.state == 'valid', "Voucher move is not valid" - I check that my debtor account is correct - - I check that the debtor account has 2 new lines with 0.00 and 0.00 as amount_currency columns and their credit are 70 and 50 + I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 70 and 50 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) @@ -301,7 +307,7 @@ for move_line in move_line_obj.browse(cr, uid, move_lines): if move_line.credit == 70.00: assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." - if move_line.credit == 50.00: + elif move_line.credit == 50.00: assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." - I check the residual amount of Invoice1 is 0 diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index 6ba92f6c8f3..3d989eaee7a 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -6,7 +6,7 @@ name: !eval "'%s-01-01' %(datetime.now().year)" rate: 1.338800 - - I create a currency rate for CAD for march of 0.500000 + I create a currency rate for CAD for march of 2.000000 - !record {model: res.currency.rate, id: mar_cad}: currency_id: base.CAD @@ -19,6 +19,13 @@ currency_id: base.CHF name: !eval "'%s-01-01' %(datetime.now().year)" rate: 1.308600 +- + I create a currency rate for CHF for march of 1.250000 +- + !record {model: res.currency.rate, id: jan_chf}: + currency_id: base.CHF + name: !eval "'%s-01-01' %(datetime.now().year)" + rate: 1.250000 - I create a bank journal with CHF as currency - @@ -34,7 +41,7 @@ company_id: base.main_company view_id: account.account_journal_bank_view - - I assign accounts for 'Income Curreny Rate' and 'Expense Currency Rate' + I set up some accounts for currency rate expense/income in my company - !record {model: res.company, id: base.main_company}: property_expense_currency_exchange: account.o_expense @@ -77,7 +84,7 @@ - !workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_cad} - - I check that accounting move for first invoice is correct + I check that first invoice move is correct for debtor account (debit - credit == 149.39) - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_cad")) @@ -87,7 +94,8 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.debit - move_line.credit == 149.39), "Invoice move is incorrect for debtors account" - - I create the first voucher of payment with Paid amount as 300, journal CHF, and fill amounts 200 for the invoice of 200. + I create the first voucher of payment + - !python {model: account.voucher}: | import netsvc, time @@ -95,7 +103,7 @@ res = self.onchange_partner_id(cr, uid, [], ref("res_partner_john0"), ref('bank_journal_CHF'), 300.0, 2, ttype='receipt', date=False) vals = { 'account_id': ref('account.cash'), - 'amount': 120.0, + 'amount': 300.0, 'company_id': ref('base.main_company'), 'currency_id': ref('base.CHF'), 'journal_id': ref('bank_journal_CHF'), @@ -130,7 +138,7 @@ !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment')]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.currency_rate_difference == 49.39), "currency rate difference is not 0.00" + assert (voucher_id.currency_rate_difference == 49.39), "currency rate difference is not 49.39" - I confirm the voucher - @@ -140,40 +148,44 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - - I check that my voucher state is posted + I check that the move of my voucher is valid - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment')]) voucher_id = self.browse(cr, uid, voucher[0]) + move_line_obj = self.pool.get('account.move.line') + move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) + for move_line in move_line_obj.browse(cr, uid, move_lines): + assert move_line.state == 'valid', "Voucher move is not valid" assert voucher_id.state == 'posted', "Voucher state is not posted" - I check that my debtor account is correct - - I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($). + I check that the debtor account has 1 new line with -200 as amount_currency columns and 149.39 of credit and currency is CAD($). - - I check that my Currency Difference entry is created with a credit of 8.5 + I check that my currency rate difference is correct. 49.39 in debit with no amount_currency - - I check that my write-off entry is created with a debit of 4.75 and amount currency as 0.0 + I check that my writeoff is correct. 140 credit and -175 amount_currency - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'Second payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment')]) voucher_id = self.browse(cr, uid, voucher[0]) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): if move_line.amount_currency == -200: assert move_line.credit == 149.39, "Debtor account has wrong entry." - if move_line.credit == 49.39: + elif move_line.debit == 49.39: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." - if move_line.credit == -140.00: - assert move_line.credit == -175, "Writeoff amount is wrong." + elif move_line.credit == 140.00: + assert move_line.amount_currency == -175, "Writeoff amount is wrong." - - I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual + I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual and paid - !python {model: account.invoice}: | invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) - assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice" - \ No newline at end of file From 1f4c3d2fbba83515f07d68193f67a2492bb0a3a7 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Thu, 4 Aug 2011 15:25:50 +0530 Subject: [PATCH 018/156] [IMP] improve find method of account period and make comapny_id as related on account voucher bzr revid: ara@tinyerp.com-20110804095550-xu04lz4wkfhusvg0 --- addons/account/account.py | 9 ++++++++- addons/account_voucher/account_voucher.py | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ad7b60ada4d..0c825b40b60 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -918,10 +918,17 @@ class account_period(osv.osv): return False def find(self, cr, uid, dt=None, context=None): + if context is None: context = {} if not dt: dt = time.strftime('%Y-%m-%d') #CHECKME: shouldn't we check the state of the period? - ids = self.search(cr, uid, [('date_start','<=',dt),('date_stop','>=',dt)]) + args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)] + if context.get('company_id', False): + args.append(('company_id', '=', context['company_id'])) + else: + company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id + args.append(('company_id', '=', company_id)) + ids = self.search(cr, uid, args, context=context) if not ids: raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%dt) return ids diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 17940aa6f25..49972b25233 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -39,7 +39,10 @@ class account_voucher(osv.osv): if context is None: context = {} if context.get('period_id', False): return context.get('period_id') - periods = self.pool.get('account.period').find(cr, uid) + if context.get('invoice_id', False): + company_id = self.pool.get('account.invoice').browse(cr, uid, context['invoice_id'], context=context).company_id.id + context.update({'company_id': company_id}) + periods = self.pool.get('account.period').find(cr, uid, context=context) return periods and periods[0] or False def _get_journal(self, cr, uid, context=None): @@ -228,7 +231,7 @@ class account_voucher(osv.osv): 'currency_id': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"), #duplicated field for display purposes 'currency_id2': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"), - 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), + 'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), 'company_currency': fields.related('company_id','currency_id', type='many2one', relation='res.currency', string='Currency', readonly=True), 'state':fields.selection( [('draft','Draft'), @@ -596,9 +599,13 @@ class account_voucher(osv.osv): @param context: context arguments, like lang, time zone @return: Returns a dict which contains new values, and context """ + if context is None: context = {} period_pool = self.pool.get('account.period') res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=context) - pids = period_pool.search(cr, uid, [('date_start', '<=', date), ('date_stop', '>=', date)]) + if context.get('invoice_id', False): + company_id = self.pool.get('account.invoice').browse(cr, uid, context['invoice_id'], context=context).company_id.id + context.update({'company_id': company_id}) + pids = period_pool.find(cr, uid, date, context=context) if pids: if not 'value' in res: res['value'] = {} @@ -606,6 +613,7 @@ class account_voucher(osv.osv): return res def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context=None): + if context is None: context = {} if not journal_id: return {} journal_pool = self.pool.get('account.journal') @@ -621,6 +629,9 @@ class account_voucher(osv.osv): if journal.currency: currency_id = journal.currency.id vals['value'].update({'currency_id':currency_id}) + context.update({'company_id': journal.company_id.id}) + periods = self.pool.get('account.period').find(cr, uid, context=context) + vals['value'].update({'period_id':periods[0]}) return vals def proforma_voucher(self, cr, uid, ids, context=None): From effaa191dcb673293bcb1c80a0ce2a07cf3dabd5 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Thu, 4 Aug 2011 15:34:57 +0530 Subject: [PATCH 019/156] [IMP] make move_line_id as required in account_voucher bzr revid: ara@tinyerp.com-20110804100457-50i5xn7dynpo1clg --- addons/account_voucher/account_voucher.py | 28 +++++++++---------- .../voucher_payment_receipt_view.xml | 14 +++++----- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 49972b25233..f30f04406a3 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -155,11 +155,11 @@ class account_voucher(osv.osv): for l in line_dr_ids: real_amount -= l.get('amount_in_company_currency', 0.0) counter_for_writeoff -= currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) - counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) for l in line_cr_ids: real_amount += l.get('amount_in_company_currency', 0.0) counter_for_writeoff += currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) - counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) writeoff_amount = amount - counter_for_writeoff currency_rate_difference = real_amount - counter_for_currency_diff return writeoff_amount, currency_rate_difference @@ -170,7 +170,7 @@ class account_voucher(osv.osv): line_osv = self.pool.get("account.voucher.line") line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context) line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context) - writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context) + writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context) return {'value': {'writeoff_amount': writeoff_amount,}}# 'currency_rate_difference': currency_rate_diff}} def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): @@ -188,15 +188,15 @@ class account_voucher(osv.osv): counter_for_writeoff -= (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency #ctx.update({'date': l.date_original}) #counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) - counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) + counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) for l in voucher.line_cr_ids: real_amount += l.amount_in_company_currency counter_for_writeoff += (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency #ctx.update({'date': l.date_original}) #counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) - counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) + counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) writeoff_amount = voucher.amount - counter_for_writeoff - res[voucher.id]['writeoff_amount'] = writeoff_amount + res[voucher.id]['writeoff_amount'] = writeoff_amount res[voucher.id]['currency_rate_difference'] = real_amount - counter_for_currency_diff return res @@ -548,9 +548,9 @@ class account_voucher(osv.osv): 'move_line_id':line.id, 'account_id':line.account_id.id, 'amount_original': amount_original, - 'amount': (move_line_found == line.id) and min(price, amount_unreconciled) or 0.0, + 'amount': (move_line_found == line.id) and min(price, amount_unreconciled) or 0.0, 'currency_id': currency_id, - 'voucher_currency_id': voucher_currency_id, + 'voucher_currency_id': voucher_currency_id, 'date_original':line.date, 'company_currency_id': line.company_id.currency_id.id, 'date_due':line.date_maturity, @@ -777,7 +777,7 @@ class account_voucher(osv.osv): account_id = voucher.company_id.property_income_currency_exchange if not account_id: raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) - + currency_diff_line = { 'name': _('Currency Difference'), 'debit': voucher.currency_rate_difference > 0 and voucher.currency_rate_difference or 0.0, @@ -844,7 +844,7 @@ class account_voucher(osv.osv): if not currency_pool.is_zero(cr, uid, voucher.currency_id, voucher.writeoff_amount): #create one line for the write off if needed - diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) + diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency) account_id = False write_off_name = '' if voucher.payment_option == 'with_writeoff': @@ -950,7 +950,7 @@ class account_voucher_line(osv.osv): def _get_amount_in_company_currency(self, cr, uid, ids, name, args, context=None): res = {} for line in self.browse(cr, uid, ids, context=context): - amount_in_company_currency, amount_in_voucher_currency = self.__company_currency_amount(cr, uid, line, line.amount, context=context) + amount_in_company_currency, amount_in_voucher_currency = self.__company_currency_amount(cr, uid, line, line.amount, context=context) res[line.id] = { 'amount_in_company_currency': amount_in_company_currency, 'amount_in_voucher_currency': amount_in_voucher_currency, @@ -959,7 +959,7 @@ class account_voucher_line(osv.osv): _columns = { 'voucher_id':fields.many2one('account.voucher', 'Voucher', required=1, ondelete='cascade'), - 'move_line_id': fields.many2one('account.move.line', 'Journal Item', required=True), + 'move_line_id': fields.many2one('account.move.line', 'Journal Item'), 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'), 'name':fields.char('Description', size=256), 'account_id':fields.many2one('account.account','Account', required=True), @@ -972,8 +972,8 @@ class account_voucher_line(osv.osv): 'voucher_currency_id': fields.related('voucher_id', 'currency_id', type='many2one', relation='res.currency', string="Voucher Currency"), 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')), - 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), - 'amount_in_voucher_currency': fields.function(_get_amount_in_company_currency, string='Amount in Voucher Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), + 'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), + 'amount_in_voucher_currency': fields.function(_get_amount_in_company_currency, string='Amount in Voucher Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"), 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1), 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1), diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index c2344d681c1..0e2ac917153 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -108,7 +108,7 @@ - @@ -122,7 +122,7 @@ - + @@ -173,7 +173,7 @@ - @@ -187,7 +187,7 @@ - + @@ -306,7 +306,7 @@ - @@ -316,7 +316,7 @@ - @@ -335,7 +335,7 @@ - From 07c4f41e31fa29cc8bc17ae818a5be60e64c6ca9 Mon Sep 17 00:00:00 2001 From: kbh Date: Thu, 4 Aug 2011 16:39:22 +0530 Subject: [PATCH 020/156] [FIX] Implemented Clear button for search view. bzr revid: kbh@bde-desktop-20110804110922-chcld5vyoovumzha --- addons/base/static/src/js/search.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/addons/base/static/src/js/search.js b/addons/base/static/src/js/search.js index 0a1f2396123..76cfb5864e8 100644 --- a/addons/base/static/src/js/search.js +++ b/addons/base/static/src/js/search.js @@ -315,10 +315,26 @@ openerp.base.SearchView = openerp.base.Widget.extend({ on_invalid: function (errors) { this.notification.notify("Invalid Search", "triggered from search view"); }, - do_clear: function (e) { - if (e && e.preventDefault) { e.preventDefault(); } - this.on_clear(); - }, + do_clear: function () { + this.$element.find(':input').each(function(){ + switch(this.type) { + case 'text': + case 'string': + $(this).val(''); + break; + } + }); + var string = ($("div.expanded").not("#oe_app_search table:first-child .expanded")); + if (string){ + $(string).removeClass('expanded'); + $(string).addClass('folded'); + } + $('#oe_app_search table:last').css('display', 'none'); + $('.searchview_extended_groups_list').empty(); + $('.filter_label').removeClass('enabled'); + this.$element.find('form').submit(); + + }, /** * Triggered when the search view gets cleared * From b505b056e81c20589eb386a1c4053e032be48883 Mon Sep 17 00:00:00 2001 From: mtr Date: Thu, 4 Aug 2011 17:18:57 +0530 Subject: [PATCH 021/156] [IMP] account_voucher: corrected values and currency rate records so that demo data rates doesn't over shadow it bzr revid: mtr@mtr-20110804114857-zditm8vsx2hxr348 --- addons/account_voucher/test/case1_usd_usd.yml | 68 +++++++++---------- addons/account_voucher/test/case2_usd_eur.yml | 56 +++++++-------- addons/account_voucher/test/case3_eur_eur.yml | 25 ++++--- addons/account_voucher/test/case4_cad_chf.yml | 34 +++++----- 4 files changed, 92 insertions(+), 91 deletions(-) diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index a4e59ccc4b3..123a4463172 100755 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -1,11 +1,12 @@ - I create a currency rate for USD for january of 1.333333 - - !record {model: res.currency.rate, id: jan_usd}: - currency_id: base.USD - name: !eval "'%s-01-01' %(datetime.now().year)" - rate: 1.333333 - + !python {model: res.currency.rate}: | + from datetime import datetime + curr_id = self.pool.get('res.currency').search(cr, uid, [('name', '=', 'USD')]) + date = '%s-01-01' %(datetime.now().year) + ids = self.search(cr, uid, [('currency_id','=',curr_id), ('name', '=', date)]) + self.write(cr, uid, ids, {'rate': 1.333333}) - I create a currency rate for USD for february of 1.250000 - @@ -141,10 +142,10 @@ !python {model: account.voucher}: | import netsvc, time vals = {} - res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 240.0, 2, ttype='receipt', date=False) + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 240.00, 2, ttype='receipt', date=False) vals = { 'account_id': ref('account.cash'), - 'amount': 240.0, + 'amount': 240.00, 'company_id': ref('base.main_company'), 'currency_id': ref('base.USD'), 'journal_id': ref('bank_journal_USD'), @@ -160,28 +161,28 @@ if not res['value']['line_cr_ids']: res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] for item in res['value']['line_cr_ids']: - if item['amount_unreconciled'] == 200: - item['amount'] = 180 + if item['amount_unreconciled'] == 200.00: + item['amount'] = 180.00 else: - item['amount'] = 70 + item['amount'] = 70.00 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals) voucher_id = self.browse(cr, uid, id) assert (voucher_id.state=='draft'), "Voucher is not in draft state" - - I check that writeoff amount computed is -10 + I check that writeoff amount computed is -10.0 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == -10), "writeoff amount is not -10" + assert (voucher_id.writeoff_amount == -10.0), "Writeoff amount is not -10.0" - - I check that currency rate difference is -34 + I check that currency rate difference is -34.0 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.currency_rate_difference == -34), "currency rate difference is not -34" + assert (voucher_id.currency_rate_difference == -34.0), "Currency rate difference is not -34.0" - I confirm the voucher - @@ -215,14 +216,14 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): - if move_line.amount_currency == -180: + if move_line.amount_currency == -180.00: assert move_line.credit == 135.00, "Debtor account has wrong entry." - elif move_line.amount_currency == -70: + elif move_line.amount_currency == -70.00: assert move_line.credit == 56.00, "Debtor account has wrong entry." elif move_line.credit == 34.00: - assert move_line.amount_currency == 0, "Incorrect currency rate difference." - elif move_line.amount_currency == 10: - assert move_line.debit == 9.0, "Writeoff amount is wrong." + assert move_line.amount_currency == 0.00, "Incorrect currency rate difference." + elif move_line.amount_currency == 10.00: + assert move_line.debit == 9.00, "Writeoff amount is wrong." - I check the residual amount of Invoice1, should be 20 in amount_currency and 15 in company currency - @@ -249,10 +250,10 @@ !python {model: account.voucher}: | import netsvc, time vals = {} - res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 45.0, 2, ttype='receipt', date=False) + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 45.00, 2, ttype='receipt', date=False) vals = { 'account_id': ref('account.cash'), - 'amount': 45.0, + 'amount': 45.00, 'company_id': ref('base.main_company'), 'currency_id': ref('base.USD'), 'journal_id': ref('bank_journal_USD'), @@ -268,29 +269,28 @@ if not res['value']['line_cr_ids']: res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] for item in res['value']['line_cr_ids']: - if item['amount_unreconciled'] == 20: - item['amount'] = 20 + if item['amount_unreconciled'] == 20.00: + item['amount'] = 20.00 else: - item['amount'] = 30 + item['amount'] = 30.00 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals) voucher_id = self.browse(cr, uid, id) assert (voucher_id.state=='draft'), "Voucher is not in draft state" - - I check that writeoff amount computed is -5 + I check that writeoff amount computed is -5.0 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == -5), "writeoff amount is not -5" + assert (voucher_id.writeoff_amount == -5.0), "Writeoff amount is not -5.0" - I check that currency rate difference is -8.50 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - curr_diff = voucher_id.currency_rate_difference - assert (voucher_id.currency_rate_difference == curr_diff), "currency rate difference is not -8.50" + assert (voucher_id.currency_rate_difference == -8.50), "Currency rate difference is not -8.50" - I confirm the voucher - @@ -324,13 +324,13 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): - if move_line.amount_currency == -20: - assert move_line.credit == 15, "Debtor account has wrong entry." - elif move_line.amount_currency == -30: - assert move_line.credit == 24, "Debtor account has wrong entry." - elif move_line.credit == 8.5: + if move_line.amount_currency == -20.00: + assert move_line.credit == 15.00, "Debtor account has wrong entry." + elif move_line.amount_currency == -30.00: + assert move_line.credit == 24.00, "Debtor account has wrong entry." + elif move_line.credit == 8.50: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." - elif move_line.amount_currency == 5: + elif move_line.amount_currency == 5.00: assert move_line.debit == 4.75, "Writeoff amount is wrong." - I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual and paid diff --git a/addons/account_voucher/test/case2_usd_eur.yml b/addons/account_voucher/test/case2_usd_eur.yml index 35e0bf86231..e6d24fb5a1b 100644 --- a/addons/account_voucher/test/case2_usd_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur.yml @@ -1,10 +1,12 @@ - I create a currency rate for USD for january of 1.333333 - - !record {model: res.currency.rate, id: janu_usd}: - currency_id: base.USD - name: !eval "'%s-01-01' %(datetime.now().year)" - rate: 1.333333 + !python {model: res.currency.rate}: | + from datetime import datetime + curr_id = self.pool.get('res.currency').search(cr, uid, [('name', '=', 'USD')]) + date = '%s-01-01' %(datetime.now().year) + ids = self.search(cr, uid, [('currency_id', '=', curr_id), ('name', '=', date)]) + self.write(cr, uid, ids, {'rate': 1.333333}) - I create a currency rate for USD for february of 1.250000 - @@ -168,28 +170,28 @@ if not res['value']['line_cr_ids']: res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] for item in res['value']['line_cr_ids']: - if item['amount_unreconciled'] == 200: - item['amount'] = 180 + if item['amount_unreconciled'] == 200.00: + item['amount'] = 180.00 else: - item['amount'] = 70 + item['amount'] = 70.00 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals) voucher_id = self.browse(cr, uid, id) assert (voucher_id.state=='draft'), "Voucher is not in draft state" - - I check that writeoff amount computed is 15 + I check that writeoff amount computed is 15.0 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == 15), "writeoff amount is not 15" + assert (voucher_id.writeoff_amount == 15.0), "Writeoff amount is not 15.0" - - I check that currency rate difference is -34 + I check that currency rate difference is -34.0 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.currency_rate_difference == -34), "currency rate difference is not -34" + assert (voucher_id.currency_rate_difference == -34.0), "Currency rate difference is not -34.0" - I confirm the voucher - @@ -223,11 +225,11 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): - if move_line.amount_currency == -180: - assert move_line.credit == 135, "Debtor account has wrong entry." - elif move_line.amount_currency == -70: + if move_line.amount_currency == -180.00: + assert move_line.credit == 135.00, "Debtor account has wrong entry." + elif move_line.amount_currency == -70.00: assert move_line.credit == 56.00, "Debtor account has wrong entry." - elif move_line.credit == 34: + elif move_line.credit == 34.00: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." elif move_line.credit == 15.00: assert move_line.amount_currency == 0.00, "Writeoff amount is wrong." @@ -275,28 +277,28 @@ if not res['value']['line_cr_ids']: res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] for item in res['value']['line_cr_ids']: - if item['amount_unreconciled'] == 20: - item['amount'] = 20 + if item['amount_unreconciled'] == 20.00: + item['amount'] = 20.00 else: - item['amount'] = 30 + item['amount'] = 30.00 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals) voucher_id = self.browse(cr, uid, id) assert (voucher_id.state=='draft'), "Voucher is not in draft state" - - I check that writeoff amount computed is -5 + I check that writeoff amount computed is -5.0 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == -5), "writeoff amount is not -5" + assert (voucher_id.writeoff_amount == -5.0), "Writeoff amount is not -5.0" - I check that currency rate difference is -8.50 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.currency_rate_difference == -8.50), "currency rate difference is not -8.50" + assert (voucher_id.currency_rate_difference == -8.50), "Currency rate difference is not -8.50" - I confirm the voucher - @@ -327,13 +329,13 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): - if move_line.amount_currency == -20: - assert move_line.credit == 15, "Debtor account has wrong entry." - elif move_line.amount_currency == -30: - assert move_line.credit == 24, "Debtor account has wrong entry." - elif move_line.credit == 8.5: + if move_line.amount_currency == -20.00: + assert move_line.credit == 15.00, "Debtor account has wrong entry." + elif move_line.amount_currency == -30.00: + assert move_line.credit == 24.00, "Debtor account has wrong entry." + elif move_line.credit == 8.50: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." - elif move_line.amount_currency == 5: + elif move_line.amount_currency == 5.00: assert move_line.debit == 4.75, "Writeoff amount is wrong." - I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual and paid diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index 5779028641e..904abb7f0db 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -138,7 +138,7 @@ res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, 2, ttype='receipt', date=False) vals = { 'account_id': ref('account.cash'), - 'amount': 120.0, + 'amount': 120.00, 'company_id': ref('base.main_company'), 'currency_id': ref('base.EUR'), 'journal_id': ref('bank_journal_EUR'), @@ -154,10 +154,10 @@ if not res['value']['line_cr_ids']: res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] for item in res['value']['line_cr_ids']: - if item['amount_unreconciled'] == 150: - item['amount'] = 100 + if item['amount_unreconciled'] == 150.00: + item['amount'] = 100.00 else: - item['amount'] = 20 + item['amount'] = 20.00 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals) voucher_id = self.browse(cr, uid, id) @@ -168,14 +168,14 @@ !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == 0), "writeoff amount is not 0" + assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0.00" - I check that currency rate difference is 0.00 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.currency_rate_difference == 0.00), "currency rate difference is not 0.00" + assert (voucher_id.currency_rate_difference == 0.00), "Currency rate difference is not 0.00" - I confirm the voucher - @@ -205,9 +205,9 @@ move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) for move_line in move_line_obj.browse(cr, uid, move_lines): - if move_line.credit == 20: + if move_line.credit == 20.00: assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." - elif move_line.credit == 100: + elif move_line.credit == 100.00: assert move_line.amount_currency == 0.00, "Debtor account has wrong entry." - I check the residual amount of Invoice1 is 50 @@ -234,10 +234,10 @@ !python {model: account.voucher}: | import netsvc, time vals = {} - res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.0, 2, ttype='receipt', date=False) + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, 2, ttype='receipt', date=False) vals = { 'account_id': ref('account.cash'), - 'amount': 120.0, + 'amount': 120.00, 'company_id': ref('base.main_company'), 'currency_id': ref('base.EUR'), 'journal_id': ref('bank_journal_EUR'), @@ -267,15 +267,14 @@ !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'),('partner_id', '=', ref('res_partner_peter0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == 0.00), "writeoff amount is not 0" + assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0" - I check that currency rate difference is 0.00 - !python {model: account.voucher}: | voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - curr_diff = voucher_id.currency_rate_difference - assert (voucher_id.currency_rate_difference == curr_diff), "currency rate difference is not 0" + assert (voucher_id.currency_rate_difference == 0.00), "Currency rate difference is not 0" - I confirm the voucher - diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index 3d989eaee7a..56795fa127a 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -11,7 +11,7 @@ !record {model: res.currency.rate, id: mar_cad}: currency_id: base.CAD name: !eval "'%s-03-01' %(datetime.now().year)" - rate: 0.500000 + rate: 2.000000 - I create a currency rate for CHF for january of 1.308600 - @@ -24,7 +24,7 @@ - !record {model: res.currency.rate, id: jan_chf}: currency_id: base.CHF - name: !eval "'%s-01-01' %(datetime.now().year)" + name: !eval "'%s-03-01' %(datetime.now().year)" rate: 1.250000 - I create a bank journal with CHF as currency @@ -100,10 +100,10 @@ !python {model: account.voucher}: | import netsvc, time vals = {} - res = self.onchange_partner_id(cr, uid, [], ref("res_partner_john0"), ref('bank_journal_CHF'), 300.0, 2, ttype='receipt', date=False) + res = self.onchange_partner_id(cr, uid, [], ref("res_partner_john0"), ref('bank_journal_CHF'), 300.00, 2, ttype='receipt', date=False) vals = { 'account_id': ref('account.cash'), - 'amount': 300.0, + 'amount': 300.00, 'company_id': ref('base.main_company'), 'currency_id': ref('base.CHF'), 'journal_id': ref('bank_journal_CHF'), @@ -119,39 +119,40 @@ if not res['value']['line_cr_ids']: res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] for item in res['value']['line_cr_ids']: - if item['amount_unreconciled'] == 200: - item['amount'] = 200 + if item['amount_unreconciled'] == 200.00: + item['amount'] = 200.00 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals) voucher_id = self.browse(cr, uid, id) assert (voucher_id.state=='draft'), "Voucher is not in draft state" - - I check that writeoff amount computed is 175 + I check that writeoff amount computed is 175.0 - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.writeoff_amount == 175), "writeoff amount is not 175" + assert (voucher_id.writeoff_amount == 175.0), "Writeoff amount is not 175.0" - I check that currency rate difference is 49.39 - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))]) voucher_id = self.browse(cr, uid, voucher[0]) - assert (voucher_id.currency_rate_difference == 49.39), "currency rate difference is not 49.39" + curr_diff = float(str(voucher_id.currency_rate_difference)) + assert (curr_diff == 49.39), "Currency rate difference is not 49.39" - I confirm the voucher - !python {model: account.voucher}: | import netsvc - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))]) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr) - I check that the move of my voucher is valid - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))]) voucher_id = self.browse(cr, uid, voucher[0]) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) @@ -168,7 +169,7 @@ I check that my writeoff is correct. 140 credit and -175 amount_currency - !python {model: account.voucher}: | - voucher = self.search(cr, uid, [('name', '=', 'First payment')]) + voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))]) voucher_id = self.browse(cr, uid, voucher[0]) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)]) @@ -178,14 +179,13 @@ elif move_line.debit == 49.39: assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." elif move_line.credit == 140.00: - assert move_line.amount_currency == -175, "Writeoff amount is wrong." + assert move_line.amount_currency == -175.00, "Writeoff amount is wrong." - I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual and paid - !python {model: account.invoice}: | - invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan")) + invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_cad")) move_line_obj = self.pool.get('account.move.line') move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)]) move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice" -- \ No newline at end of file From b752dde2870db8f2ff13135a4298cb11acaecf7c Mon Sep 17 00:00:00 2001 From: mtr Date: Fri, 5 Aug 2011 14:28:29 +0530 Subject: [PATCH 022/156] [IMP] account_voucher:improved strings bzr revid: mtr@mtr-20110805085829-m6qhtwu26fky7y9h --- addons/account_voucher/test/case1_usd_usd.yml | 11 +++++++---- addons/account_voucher/test/case2_usd_eur.yml | 11 +++++++---- addons/account_voucher/test/case3_eur_eur.yml | 11 +++++++---- addons/account_voucher/test/case4_cad_chf.yml | 13 ++++++++----- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index 123a4463172..dc7654ab9c3 100755 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -1,5 +1,8 @@ - - I create a currency rate for USD for january of 1.333333 + In order to check the Account_voucher module with multi-currency in OpenERP, + I create 2 Invoices in USD and make 2 Payments in USD based on the currency rating on that particular date +- + I create currency USD in OpenERP for January of 1.333333 Rate - !python {model: res.currency.rate}: | from datetime import datetime @@ -8,7 +11,7 @@ ids = self.search(cr, uid, [('currency_id','=',curr_id), ('name', '=', date)]) self.write(cr, uid, ids, {'rate': 1.333333}) - - I create a currency rate for USD for february of 1.250000 + I create currency USD in OpenERP for February of 1.250000 Rate - !record {model: res.currency.rate, id: feb_usd}: currency_id: base.USD @@ -16,7 +19,7 @@ rate: 1.250000 - - I create a currency rate for USD for march of 1.111111 + I create currency USD in OpenERP for March of 1.111111 Rate - !record {model: res.currency.rate, id: mar_usd}: currency_id: base.USD @@ -24,7 +27,7 @@ rate: 1.111111 - - I create a currency rate for USD for april of 1.052632 + I create currency USD in OpenERP for April of 1.052632 Rate - !record {model: res.currency.rate, id: apr_usd}: currency_id: base.USD diff --git a/addons/account_voucher/test/case2_usd_eur.yml b/addons/account_voucher/test/case2_usd_eur.yml index e6d24fb5a1b..ded95095e5a 100644 --- a/addons/account_voucher/test/case2_usd_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur.yml @@ -1,5 +1,8 @@ - - I create a currency rate for USD for january of 1.333333 + In order to check the Account_voucher module with multi-currency in OpenERP, + I create 2 Invoices in USD and make 2 Payments one in USD and another in EUR, based on the currency rating on that particular date +- + I create currency USD in OpenERP for January of 1.333333 Rate - !python {model: res.currency.rate}: | from datetime import datetime @@ -8,21 +11,21 @@ ids = self.search(cr, uid, [('currency_id', '=', curr_id), ('name', '=', date)]) self.write(cr, uid, ids, {'rate': 1.333333}) - - I create a currency rate for USD for february of 1.250000 + I create currency USD in OpenERP for February of 1.250000 Rate - !record {model: res.currency.rate, id: febr_usd}: currency_id: base.USD name: !eval "'%s-02-01' %(datetime.now().year)" rate: 1.250000 - - I create a currency rate for USD for march of 1.111111 + I create currency USD in OpenERP for March of 1.111111 Rate - !record {model: res.currency.rate, id: marc_usd}: currency_id: base.USD name: !eval "'%s-03-01' %(datetime.now().year)" rate: 1.111111 - - I create a currency rate for USD for april of 1.052632 + I create currency USD in OpenERP for April of 1.052632 Rate - !record {model: res.currency.rate, id: apri_usd}: currency_id: base.USD diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index 904abb7f0db..b35daf49402 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -1,26 +1,29 @@ - - I create a currency rate for EUR for january of 1.000000 + In order to check the Account_voucher module with multi-currency in OpenERP, + I create 2 Invoices in EUR and make 2 Payments in EUR based on the currency rating on that particular date. +- + I create currency EUR in OpenERP for January of 1.000000 Rate - !record {model: res.currency.rate, id: jan_eur}: currency_id: base.EUR name: !eval "'%s-01-01' %(datetime.now().year)" rate: 1.000000 - - I create a currency rate for EUR for february of 1.000000 + I create currency EUR in OpenERP for February of 1.000000 Rate - !record {model: res.currency.rate, id: feb_eur}: currency_id: base.EUR name: !eval "'%s-02-01' %(datetime.now().year)" rate: 1.000000 - - I create a currency rate for EUR for march of 1.000000 + I create currency EUR in OpenERP for March of 1.000000 Rate - !record {model: res.currency.rate, id: mar_eur}: currency_id: base.EUR name: !eval "'%s-03-01' %(datetime.now().year)" rate: 1.000000 - - I create a currency rate for EUR for april of 1.000000 + I create currency EUR in OpenERP for April of 1.000000 Rate - !record {model: res.currency.rate, id: apr_eur}: currency_id: base.EUR diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index 56795fa127a..b6ed790dffb 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -1,28 +1,31 @@ - - I create a currency rate for CAD for january of 1.338800 + In order to check the Account_voucher module with multi-currency in OpenERP, + I create an invoice in CAD and make its Payment in CHF based on the currency rating on that particular date. +- + I create currency CAD in OpenERP for January of 1.338800 Rate - !record {model: res.currency.rate, id: jan_cad}: currency_id: base.CAD name: !eval "'%s-01-01' %(datetime.now().year)" rate: 1.338800 - - I create a currency rate for CAD for march of 2.000000 + I create currency CAD in OpenERP for March of 2.000000 Rate - !record {model: res.currency.rate, id: mar_cad}: currency_id: base.CAD name: !eval "'%s-03-01' %(datetime.now().year)" rate: 2.000000 - - I create a currency rate for CHF for january of 1.308600 + I create currency CHF in OpenERP for January of 1.308600 Rate - !record {model: res.currency.rate, id: jan_chf}: currency_id: base.CHF name: !eval "'%s-01-01' %(datetime.now().year)" rate: 1.308600 - - I create a currency rate for CHF for march of 1.250000 + I create currency CHF in OpenERP for March of 1.250000 Rate - - !record {model: res.currency.rate, id: jan_chf}: + !record {model: res.currency.rate, id: mar_chf}: currency_id: base.CHF name: !eval "'%s-03-01' %(datetime.now().year)" rate: 1.250000 From d852a2a828371f02522677de5f5c2e5e7cde3903 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 8 Aug 2011 18:38:57 +0530 Subject: [PATCH 023/156] [IMP]account,hr_timesheet_sheet,mrp,pad,point_of_sale,purchase:Improvement is done in company view bzr revid: mma@tinyerp.com-20110808130857-fyxra4gte3nsp60u --- addons/account/company.py | 6 +++--- .../hr_timesheet_sheet/hr_timesheet_sheet_view.xml | 13 ++++++++----- addons/mrp/company_view.xml | 6 +++--- addons/pad/company_pad.xml | 9 ++++++--- addons/point_of_sale/point_of_sale_view.xml | 13 ++++++++----- addons/procurement/company_view.xml | 10 +++++----- addons/project/project_view.xml | 9 ++++++--- addons/purchase/company_view.xml | 6 +++--- addons/sale/company_view.xml | 6 +++--- 9 files changed, 45 insertions(+), 33 deletions(-) diff --git a/addons/account/company.py b/addons/account/company.py index c7836e0128b..82a60beb461 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -36,9 +36,9 @@ class res_company(osv.osv): } _defaults = { - 'overdue_msg': 'Please note that the following payments are now due. If your payment \ - has been sent, kindly forward your payment details. If payment will be \ - delayed further, please contact us to discuss. \ + 'overdue_msg': 'Please note that the following payments are now due.\ + \nIf your payment has been sent, kindly forward your payment details.\ + \nIf payment will be delayed further, please contact us to discuss.\ \nWould your payment have been carried out after this mail was sent, please consider the present one as void.' } diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 321e4c2addd..be6c4509557 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -202,14 +202,17 @@ res.company.sheet res.company form + 18 - - - - + + + + + - + + diff --git a/addons/mrp/company_view.xml b/addons/mrp/company_view.xml index f5f06518565..3c33a332977 100644 --- a/addons/mrp/company_view.xml +++ b/addons/mrp/company_view.xml @@ -6,12 +6,12 @@ res.company.mrp.config res.company form - 22 + 24 - + - + diff --git a/addons/pad/company_pad.xml b/addons/pad/company_pad.xml index 754776715d7..0ee80937d18 100644 --- a/addons/pad/company_pad.xml +++ b/addons/pad/company_pad.xml @@ -6,9 +6,12 @@ form - - - + + + + + + diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 1435f6cc2b6..8bf7155096c 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -637,13 +637,16 @@ view.company.form.pos res.company form + 25 - - - - - + + + + + + + diff --git a/addons/procurement/company_view.xml b/addons/procurement/company_view.xml index 4d14f69edde..a5319c43640 100644 --- a/addons/procurement/company_view.xml +++ b/addons/procurement/company_view.xml @@ -6,14 +6,14 @@ res.company.mrp.config res.company form - 17 + 25 - + - - - + + + diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 85cde448c6d..cafe538e12a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -528,13 +528,16 @@ res.company.task.config res.company form + 22 - - + + + - + + diff --git a/addons/purchase/company_view.xml b/addons/purchase/company_view.xml index d9d2fb9f9ee..04e48af29d9 100644 --- a/addons/purchase/company_view.xml +++ b/addons/purchase/company_view.xml @@ -6,12 +6,12 @@ res.company.mrp.config res.company form - 19 + 22 - + - + diff --git a/addons/sale/company_view.xml b/addons/sale/company_view.xml index 96ff91e8e90..567bf50948f 100644 --- a/addons/sale/company_view.xml +++ b/addons/sale/company_view.xml @@ -5,12 +5,12 @@ res.company.mrp.config res.company form - 24 + 20 - + - + From 3008bf4b02f89e9659f433d7333942551fd14e78 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Tue, 9 Aug 2011 14:25:04 +0530 Subject: [PATCH 024/156] [IMP] improve period of account_voucher bzr revid: ara@tinyerp.com-20110809085504-d9clu2tbry1vagt8 --- addons/account_voucher/account_voucher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index f30f04406a3..e42bf519b3d 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -631,7 +631,8 @@ class account_voucher(osv.osv): vals['value'].update({'currency_id':currency_id}) context.update({'company_id': journal.company_id.id}) periods = self.pool.get('account.period').find(cr, uid, context=context) - vals['value'].update({'period_id':periods[0]}) + if periods: + vals['value'].update({'period_id':periods[0]}) return vals def proforma_voucher(self, cr, uid, ids, context=None): From de2cb73d3add5e7c06bfceb229946865353e71cb Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 10 Aug 2011 11:34:26 +0530 Subject: [PATCH 025/156] [IMP]l10n_ch: rml_footer2 Replace with account_number2 bzr revid: mma@tinyerp.com-20110810060426-3y4ea0reolawrz42 --- addons/l10n_ch/company_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_ch/company_view.xml b/addons/l10n_ch/company_view.xml index df49cf123be..9a9b1464f8d 100644 --- a/addons/l10n_ch/company_view.xml +++ b/addons/l10n_ch/company_view.xml @@ -7,7 +7,7 @@ form - + From 081b7d77d60f583cb184f034b3424bb1a620c610 Mon Sep 17 00:00:00 2001 From: kbh Date: Fri, 12 Aug 2011 11:33:06 +0530 Subject: [PATCH 026/156] [FIX] Fixed clear option. bzr revid: kbh@bde-desktop-20110812060306-ozmfx36vvz1uy1h0 --- addons/base/static/src/js/search.js | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/addons/base/static/src/js/search.js b/addons/base/static/src/js/search.js index 76cfb5864e8..8a4f542f1c7 100644 --- a/addons/base/static/src/js/search.js +++ b/addons/base/static/src/js/search.js @@ -316,24 +316,13 @@ openerp.base.SearchView = openerp.base.Widget.extend({ this.notification.notify("Invalid Search", "triggered from search view"); }, do_clear: function () { - this.$element.find(':input').each(function(){ - switch(this.type) { - case 'text': - case 'string': - $(this).val(''); - break; - } - }); - var string = ($("div.expanded").not("#oe_app_search table:first-child .expanded")); - if (string){ - $(string).removeClass('expanded'); - $(string).addClass('folded'); - } - $('#oe_app_search table:last').css('display', 'none'); + var string = $('a.searchview_group_string'); + _.each(string, function(str){ + $(str).closest('div.searchview_group').removeClass("expanded").addClass('folded'); + }); + this.$element.find('table:last').hide(); $('.searchview_extended_groups_list').empty(); $('.filter_label').removeClass('enabled'); - this.$element.find('form').submit(); - }, /** * Triggered when the search view gets cleared @@ -475,7 +464,7 @@ openerp.base.search.FilterGroup = openerp.base.search.Widget.extend({ }); openerp.base.search.add_expand_listener = function($root) { $root.find('a.searchview_group_string').click(function (e) { - $root.toggleClass('folded expanded'); + $root.toggleClass('folded expanded'); e.stopPropagation(); e.preventDefault(); }); From ddd53dc30ea3b1edeaf4c9506a1405002107a420 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Tue, 16 Aug 2011 17:51:44 +0530 Subject: [PATCH 027/156] [Usability] Changed meni location of the -job position bzr revid: tta@openerp.com-20110816122144-4hjrj4qyk848hkma --- addons/hr/hr_view.xml | 2 +- addons/hr_recruitment/hr_recruitment_menu.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 64580a7dbe1..c463cf436e0 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -377,7 +377,7 @@ - + diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index 2e941877b65..9883e311fba 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -46,6 +46,9 @@ name="Applicants" parent="base.menu_crm_case_job_req_main" id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/> + + + From 90569c64cac1ff269e6734a1a481d7b949ecb8cf Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Tue, 16 Aug 2011 18:20:51 +0530 Subject: [PATCH 028/156] [Usability] Product : Lable changed ,Real Stock and Virtual Stock respectively Quanity On Hand and Quantity On Order. bzr revid: tta@openerp.com-20110816125051-4lgrd1x567v2ea0k --- addons/product/product.py | 4 ++-- addons/stock/product.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index 8e6e132296d..5eb4247fd29 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -469,8 +469,8 @@ class product_product(osv.osv): _inherits = {'product.template': 'product_tmpl_id'} _order = 'default_code,name_template' _columns = { - 'qty_available': fields.function(_product_qty_available, type='float', string='Real Stock'), - 'virtual_available': fields.function(_product_virtual_available, type='float', string='Virtual Stock'), + 'qty_available': fields.function(_product_qty_available, type='float', string='Quantity On Hand'), + 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity On Order'), 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'), 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'), 'price': fields.function(_product_price, type='float', string='Pricelist', digits_compute=dp.get_precision('Sale Price')), diff --git a/addons/stock/product.py b/addons/stock/product.py index 70925a82d10..46a5dec759d 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -330,8 +330,8 @@ class product_product(osv.osv): return res _columns = { - 'qty_available': fields.function(_product_available, type='float', string='Real Stock', help="Current quantities of products in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), - 'virtual_available': fields.function(_product_available, type='float', string='Virtual Stock', help="Future stock for this product according to the selected locations or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), + 'qty_available': fields.function(_product_available, type='float', string='Quantity On Hand', help="Current quantities of products in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), + 'virtual_available': fields.function(_product_available, type='float', string='Quantity On Order', help="Future stock for this product according to the selected locations or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), 'incoming_qty': fields.function(_product_available, type='float', string='Incoming', help="Quantities of products that are planned to arrive in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), 'outgoing_qty': fields.function(_product_available, type='float', string='Outgoing', help="Quantities of products that are planned to leave in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), 'track_production': fields.boolean('Track Manufacturing Lots' , help="Forces to specify a Production Lot for all moves containing this product and generated by a Manufacturing Order"), From 170ee9bf72132b553dfd856cb5476b0c00d9419d Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Tue, 16 Aug 2011 19:03:53 +0530 Subject: [PATCH 029/156] [IMP]: remove stage type in lead and opportunity bzr revid: ksa@tinyerp.co.in-20110816133353-kfgzeotfuwoe0jle --- addons/crm/crm_lead.py | 2 +- addons/crm/crm_lead_view.xml | 2 +- addons/crm/crm_opportunity.py | 2 +- addons/crm/crm_opportunity_view.xml | 2 +- addons/crm/report/crm_lead_report.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 294c5dfbf56..7644bf08042 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -155,7 +155,7 @@ class crm_lead(crm_case, osv.osv): ],'Type', help="Type is used to separate Leads and Opportunities"), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), 'date_closed': fields.datetime('Closed', readonly=True), - 'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('type','=','lead')]"), + 'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[(section_ids', '=', section_id)]"), 'user_id': fields.many2one('res.users', 'Salesman'), 'referred': fields.char('Referred By', size=64), 'date_open': fields.datetime('Opened', readonly=True), diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index cc0297c16f4..812ba11b623 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -74,7 +74,7 @@ - + + +
+ + + + +
+ CHANGE PASSWORD +
+ + + + + + + + + + + + + + + + +
+
+
From ef6a454dbb85c07820da0e419a3ca60e92cd903b Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 12:02:14 +0200 Subject: [PATCH 058/156] [FIX] account_voucher: fixed writeoff amount method to compute correct values under multi-currency scenario bzr revid: qdp-launchpad@openerp.com-20110822100214-exxx5xigufvrppdu --- addons/account_voucher/account_voucher.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 17940aa6f25..2168cd31add 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -182,15 +182,11 @@ class account_voucher(osv.osv): ctx.update({'date': voucher.date}) for l in voucher.line_dr_ids: real_amount -= l.amount_in_company_currency - counter_for_writeoff -= (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency - #ctx.update({'date': l.date_original}) - #counter_for_writeoff -= currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) + counter_for_writeoff -= (l.voucher_currency_id.id == l.currency_id.id) and l.amount or l.amount_in_voucher_currency counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) for l in voucher.line_cr_ids: real_amount += l.amount_in_company_currency - counter_for_writeoff += (l.voucher_currency_id.id == l.company_currency_id.id) and l.amount_in_company_currency or l.amount_in_voucher_currency - #ctx.update({'date': l.date_original}) - #counter_for_writeoff += currency_pool.compute(cr, uid, voucher.company_id.currency_id.id, voucher.currency_id.id, l.amount_in_company_currency, context=ctx) + counter_for_writeoff += (l.voucher_currency_id.id == l.currency_id.id) and l.amount or l.amount_in_voucher_currency counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx) writeoff_amount = voucher.amount - counter_for_writeoff res[voucher.id]['writeoff_amount'] = writeoff_amount From 592297de432b6b0d2757a9942537697e40388095 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 12:53:39 +0200 Subject: [PATCH 059/156] [FIX] account_voucher: fixed currency on voucher.line in case there was no move_line_id bzr revid: qdp-launchpad@openerp.com-20110822105339-i8r8lcy1pki43gdo --- addons/account_voucher/account_voucher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index c9c2ee2aed2..ad3c4035f48 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -899,7 +899,10 @@ class account_voucher_line(osv.osv): res = {} for line in self.browse(cr, uid, ids, context=context): move_line = line.move_line_id - res[line.id] = move_line.currency_id and move_line.currency_id.id or move_line.company_id.currency_id.id + if move_line: + res[line.id] = move_line.currency_id and move_line.currency_id.id or move_line.company_id.currency_id.id + else: + res[line.id] = line.voucher_id.currency_id.id return res def _get_amounts(self, cr, uid, line_browse_rec, context=None): From b8796fa5f149563320fb2b3b4e94c9a20f55d696 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 13:15:06 +0200 Subject: [PATCH 060/156] [FIX] account_voucher: usability. onchange amount in lines now update correctly the wirteoff amounts and amount of currency rate difference bzr revid: qdp-launchpad@openerp.com-20110822111506-r4pdrp4g6xiaiadd --- addons/account_voucher/account_voucher.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index ad3c4035f48..cc74b3485c1 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -148,17 +148,18 @@ class account_voucher(osv.osv): def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=None): if context is None: context = {} + print 'ici changer' currency_pool = self.pool.get('res.currency') ctx = context.copy() counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0 ctx.update({'date': voucher_date}) for l in line_dr_ids: real_amount -= l.get('amount_in_company_currency', 0.0) - counter_for_writeoff -= currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) + counter_for_writeoff -= l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or l.get('amount_in_voucher_currency',0.0) counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) for l in line_cr_ids: real_amount += l.get('amount_in_company_currency', 0.0) - counter_for_writeoff += currency_pool.compute(cr, uid, l['company_currency_id'], l['voucher_currency_id'], l.get('amount_in_company_currency',0.0), context=ctx) + counter_for_writeoff += l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or l.get('amount_in_voucher_currency',0.0) counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) writeoff_amount = amount - counter_for_writeoff currency_rate_difference = real_amount - counter_for_currency_diff @@ -171,7 +172,7 @@ class account_voucher(osv.osv): line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context) line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context) writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context) - return {'value': {'writeoff_amount': writeoff_amount,}}# 'currency_rate_difference': currency_rate_diff}} + return {'value': {'writeoff_amount': writeoff_amount, 'currency_rate_difference': currency_rate_diff}} def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): if not ids: return {} From e140748bc7da47df1688a00d86157a63d5492e2b Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 13:37:22 +0200 Subject: [PATCH 061/156] [IMP] account_voucher: improved __openerp__ file and module description bzr revid: qdp-launchpad@openerp.com-20110822113722-xuc50rclszlp0img --- addons/account_voucher/__openerp__.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index e9be5cc061e..289d26bb258 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -25,15 +25,22 @@ "author" : 'OpenERP SA', 'complexity': "normal", "description": """ -Account Voucher module includes all the basic requirements of Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc. -==================================================================================================================================== +Account Voucher module offers an easy way to deal with all the basic requirements of Voucher Entries +==================================================================================================== - * Voucher Entry - * Voucher Receipt - * Cheque Register +Its increased usabililty allows you to create easily sales/purchases documents but also to encode payments. +Doing so, you'll be able to see all the open transactions for the selected partner and that will help you +to reconcile your entry with its invoice. + +Account Voucher module multi-currency support +============================================= + +Thanks to the contribution of CampToCamp, the vouchers fully support the multi currency and compute the +currency rate difference besides the write off amount. Of course, the accounting entries are also created +accordingly. """, "category" : "Finance", - "website" : "http://tinyerp.com", + "website" : "http://www.openerp.com", "images" : ["images/customer_payment.jpeg","images/journal_voucher.jpeg","images/sales_receipt.jpeg","images/supplier_voucher.jpeg"], "depends" : ["account"], "init_xml" : [], From eb940e8a683fd6409914d8544bd027266dbcde0b Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 13:45:15 +0200 Subject: [PATCH 062/156] [IMP] account_voucher: removed debug statement bzr revid: qdp-launchpad@openerp.com-20110822114515-fdjibh32530k9jpz --- addons/account_voucher/account_voucher.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index cc74b3485c1..793d6f8634b 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -148,7 +148,6 @@ class account_voucher(osv.osv): def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=None): if context is None: context = {} - print 'ici changer' currency_pool = self.pool.get('res.currency') ctx = context.copy() counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0 From 69937fdd19a9441ea2c18e065c931ba352d34a27 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 13:47:14 +0200 Subject: [PATCH 063/156] [IMP] account: when an invoice is put back to draft state, men should be able to change its date bzr revid: qdp-launchpad@openerp.com-20110822114714-fr3mdt7n6laow20i --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 09e8304340c..547d3a9bd3e 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -209,7 +209,7 @@ class account_invoice(osv.osv): \n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \ \n* The \'Paid\' state is set automatically when invoice is paid.\ \n* The \'Cancelled\' state is used when user cancel invoice.'), - 'date_invoice': fields.date('Invoice Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True, help="Keep empty to use the current date"), + 'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"), 'date_due': fields.date('Due Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True, help="If you use payment terms, the due date will be computed automatically at the generation "\ "of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."), From 5d29ffa125352da50138148d0bb92486f11ad864 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 14:10:38 +0200 Subject: [PATCH 064/156] [FIX] account_voucher: typo bzr revid: qdp-launchpad@openerp.com-20110822121038-njpa3w6pszizheom --- addons/account_voucher/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 289d26bb258..2e3797c4745 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -35,7 +35,7 @@ to reconcile your entry with its invoice. Account Voucher module multi-currency support ============================================= -Thanks to the contribution of CampToCamp, the vouchers fully support the multi currency and compute the +Thanks to the contribution of Camptocamp, the vouchers fully support the multi currency and compute the currency rate difference besides the write off amount. Of course, the accounting entries are also created accordingly. """, From 6cc14d8764f5245254e2d1a0750d793c81a84bf6 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 22 Aug 2011 14:53:18 +0200 Subject: [PATCH 065/156] [IMP] account_voucher: selection of a specific invoice when coming from the button 'pay invoice' on that object, and context propagation bzr revid: qdp-launchpad@openerp.com-20110822125318-cdqdixkqdf1arpv3 --- addons/account_voucher/account_voucher.py | 9 +++--- .../voucher_payment_receipt_view.xml | 31 ++++++++++++++----- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 793d6f8634b..edd94d200f3 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -515,10 +515,11 @@ class account_voucher(osv.osv): continue if line.debit and line.reconcile_partial_id and ttype == 'payment': continue - if invoice_id and line.move_id.invoice_id.id == invoice_id: - move_line_found = line.id - break - if voucher_currency_id == company_currency: + if invoice_id: + if line.invoice.id == invoice_id: + move_line_found = line.id + break + elif voucher_currency_id == company_currency: if line.amount_residual == price: move_line_found = line.id break diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index f0ae39282d3..7f5363636e8 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -275,20 +275,35 @@
- + + widget="selection" + select="1" + on_change="onchange_partner_id(partner_id, journal_id, amount, + currency_id, type, date, context)" + string="Payment Method" + colspan="4"/> + on_change="onchange_partner_id(partner_id, journal_id, amount, + currency_id, type, date, context)"/> - + @@ -300,7 +315,7 @@ - + - + Date: Mon, 22 Aug 2011 15:31:14 +0200 Subject: [PATCH 066/156] [IMP] account_voucher: new voucher in multi-currency for suppliers payment too bzr revid: qdp-launchpad@openerp.com-20110822133114-0wyxfv98omjhhs43 --- .../voucher_payment_receipt_view.xml | 107 +++++++++++++----- 1 file changed, 78 insertions(+), 29 deletions(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 7f5363636e8..6b8bce0408a 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -74,14 +74,24 @@ - - + - + + - + - - - + + + + + + + + - - - + + + + + + + + + + @@ -137,15 +159,28 @@ - - + - + + @@ -166,18 +201,30 @@ - - - + + + + + + + + - - - + + + + + + + + + + @@ -185,24 +232,26 @@ - - - + + + + + + + domain="[('type','=','other')]" colspan="4"/> + attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" colspan="4"/> + groups="analytic.group_analytic_accounting" colspan="4"/> - - + From 754205281d966d02f0014cbdd1fc438c869701e6 Mon Sep 17 00:00:00 2001 From: vishmita Date: Tue, 23 Aug 2011 10:36:07 +0530 Subject: [PATCH 067/156] [IMP]remove title in change password dialog. bzr revid: vja@vja-desktop-20110823050607-tdu2bzwrsfz04tvf --- addons/base/static/src/xml/base.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/addons/base/static/src/xml/base.xml b/addons/base/static/src/xml/base.xml index 7baf8d91c13..31c5ac6693a 100644 --- a/addons/base/static/src/xml/base.xml +++ b/addons/base/static/src/xml/base.xml @@ -1309,13 +1309,6 @@ - - - - -
- CHANGE PASSWORD -
From 9d93821bae21cba47b9e7237af19c9d64cafa2d0 Mon Sep 17 00:00:00 2001 From: vishmita Date: Tue, 23 Aug 2011 14:47:21 +0530 Subject: [PATCH 068/156] [IMP]remove RPC method in Preferences. bzr revid: vja@vja-desktop-20110823091721-83v50nq5fhojkf7v --- addons/base/static/src/js/chrome.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/base/static/src/js/chrome.js b/addons/base/static/src/js/chrome.js index 861a02cc49a..d0901e37d07 100644 --- a/addons/base/static/src/js/chrome.js +++ b/addons/base/static/src/js/chrome.js @@ -628,8 +628,8 @@ openerp.base.Header = openerp.base.Widget.extend({ on_preferences: function(){ var self = this; var action_manager = new openerp.base.ActionManager(this); - this.rpc('/base/dataset/call', {model: 'res.users',method:"action_get",args: []},function(result){ - self.rpc('/base/action/load', { action_id: result}, function(result){ + var dataset = new openerp.base.DataSet (this,'res.users',this.context); + dataset.call ('action_get','',function (result){self.rpc('/base/action/load', {action_id:result}, function(result){ result['result']['res_id'] = self.session.uid; result['result']['res_model']= 'res.users'; result['result']['view_id']=result['result']['views'][0][0]; @@ -641,7 +641,7 @@ openerp.base.Header = openerp.base.Widget.extend({ result['result']['flags']['pager']=false; action_manager.do_action(result['result']); }); - }); + }); this.dialog = new openerp.base.Dialog(this,{ modal: true, title: 'Preferences', From f2325382caf64e3021cd5c0df116180802b2f89e Mon Sep 17 00:00:00 2001 From: vishmita Date: Tue, 23 Aug 2011 18:28:02 +0530 Subject: [PATCH 069/156] [IMP]Improve code in change password. bzr revid: vja@vja-desktop-20110823125802-c4jhe4qqjn2ra7n4 --- addons/base/controllers/main.py | 13 ++++++++----- addons/base/static/src/js/chrome.js | 15 ++++----------- addons/base/static/src/xml/base.xml | 16 ++++++++-------- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 6a7f143776c..9493620c1cb 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -295,15 +295,18 @@ class Session(openerpweb.Controller): } @openerpweb.jsonrequest def change_password (self,req,fields): - old_password, new_password,confirm_password = operator.itemgetter('old_pwd', 'new_pwd','confirm_pwd')( + old_password, new_password,confirm_password = operator.itemgetter('old_pwd', 'new_password','confirm_pwd')( dict(map(operator.itemgetter('name', 'value'), fields))) + if not (old_password.strip() and new_password.strip() and confirm_password.strip()): + return {'error':'All passwords have to be filled.','title': 'Change Password'} + if new_password != confirm_password: + return {'error': 'The new password and its confirmation must be identical.','title': 'Change Password'} try: if req.session.model('res.users').change_password( old_password, new_password): - req.session.password = new_password - return dict(changed=True) - raise redirect('/') - except xmlrpclib.Fault, e: + req.session.password = new_password; + return dict(changed=True) + except: return {'error': 'Original password incorrect, your password was not changed.', 'title': 'Change Password'} @openerpweb.jsonrequest diff --git a/addons/base/static/src/js/chrome.js b/addons/base/static/src/js/chrome.js index d0901e37d07..1a3289457c3 100644 --- a/addons/base/static/src/js/chrome.js +++ b/addons/base/static/src/js/chrome.js @@ -459,7 +459,7 @@ openerp.base.Database = openerp.base.Widget.extend({ } self.notification.notify("Changed Password", "Password has been changed successfully"); }); - } + }, }); } }); @@ -681,22 +681,15 @@ openerp.base.Header = openerp.base.Widget.extend({ this.dialog.open(); this.dialog.$element.html(QWeb.render("Change_Pwd", self)); this.dialog.$element.find("form[name=change_password_form]").validate({ - messages: { - old_password: "Please enter your previous password", - new_password: "Please enter your new password", - confirm_password: { - required: "Please confirm your new password", - equalTo: "The confirmation does not match the password" - }, - }, submitHandler: function (form) { + console.log('form',form) self.rpc("/base/session/change_password",{ - 'fields': $("form[name=change_password_form]").serializeArray() + 'fields': $(form).serializeArray() }, function(result) { if (result.error) { self.display_error(result); return; - } + }; self.notification.notify("Changed Password", "Password has been changed successfully"); self.dialog.close(); }); diff --git a/addons/base/static/src/xml/base.xml b/addons/base/static/src/xml/base.xml index 31c5ac6693a..03257f7976b 100644 --- a/addons/base/static/src/xml/base.xml +++ b/addons/base/static/src/xml/base.xml @@ -1309,21 +1309,21 @@ -
+
- - - + + - + - + From ccc5925c9b062744f61d24093242580d53751da6 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 23 Aug 2011 15:27:01 +0200 Subject: [PATCH 070/156] [IMP] account_voucher: fixed the assignation of voucher amount per voucher line bzr revid: qdp-launchpad@openerp.com-20110823132701-wttepevy2jckm104 --- addons/account_voucher/account_voucher.py | 35 ++++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index edd94d200f3..60b84019b6e 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -484,32 +484,27 @@ class account_voucher(osv.osv): if journal.type not in ('cash', 'bank'): return default - total_credit = 0.0 - total_debit = 0.0 account_type = 'receivable' if ttype == 'payment': account_type = 'payable' - total_debit = price or 0.0 else: - total_credit = price or 0.0 account_type = 'receivable' if not context.get('move_line_ids', False): ids = move_line_pool.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context) else: ids = context['move_line_ids'] + + #computation of the assignation of voucher amount on voucher lines + total_credit = account_type == 'receivable' and price or 0.0 + total_debit = account_type == 'payable' and price or 0.0 + moves = move_line_pool.browse(cr, uid, ids, context=context) + company_currency = journal.company_id.currency_id.id + invoice_id = context.get('invoice_id', False) + move_line_found = False #order the lines by most old first ids.reverse() - moves = move_line_pool.browse(cr, uid, ids, context=context) - company_currency = journal.company_id.currency_id.id - if company_currency != voucher_currency_id and ttype == 'payment': - total_debit = currency_pool.compute(cr, uid, voucher_currency_id, company_currency, total_debit, context=context_multi_currency) - elif company_currency != voucher_currency_id and ttype == 'receipt': - total_credit = currency_pool.compute(cr, uid, voucher_currency_id, company_currency, total_credit, context=context_multi_currency) - - invoice_id = context.get('invoice_id', False) - move_line_found = False for line in moves: if line.credit and line.reconcile_partial_id and ttype == 'receipt': continue @@ -517,20 +512,28 @@ class account_voucher(osv.osv): continue if invoice_id: if line.invoice.id == invoice_id: + #if the invoice linked to the voucher line is equal to the invoice_id in context + #then we assign the amount on that line, whatever the other voucher lines move_line_found = line.id break elif voucher_currency_id == company_currency: + #otherwise treatments is the same but with other field names if line.amount_residual == price: + #if the amount residual is equal the amount voucher, we assign it to that voucher + #line, whatever the other voucher lines move_line_found = line.id break + #otherwise we will split the voucher amount on each line (by most old first) total_credit += line.credit or 0.0 total_debit += line.debit or 0.0 elif voucher_currency_id == line.currency_id.id: if line.amount_residual_currency == price: move_line_found = line.id break - total_credit += line.amount_currency or 0.0 - total_debit += line.amount_currency or 0.0 + total_credit += line.credit and line.amount_currency or 0.0 + total_debit += line.debit and line.amount_currency or 0.0 + + #voucher line creation for line in moves: if line.credit and line.reconcile_partial_id and ttype == 'receipt': continue @@ -554,9 +557,7 @@ class account_voucher(osv.osv): 'amount_unreconciled': amount_unreconciled, 'amount_in_company_currency': 0.0, } - if not move_line_found: - #TODO: this part isn't working really: we should assign the voucher amount on only lines that are or the same currency if company_currency == voucher_currency_id: if line.credit: amount = min(amount_unreconciled, abs(total_debit)) From 606484f0dbdb80c244b88581fc3fe7d1adea6f67 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 23 Aug 2011 16:23:44 +0200 Subject: [PATCH 071/156] [IMP] account_voucher: onchange amount now sets the writeoff amount and currency rate difference accordingly to the saved (and correct) values bzr revid: qdp-launchpad@openerp.com-20110823142344-cwvgp309xu445f1b --- addons/account_voucher/account_voucher.py | 74 +++++++++++++++-------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 60b84019b6e..01fd24c4a5a 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -153,12 +153,34 @@ class account_voucher(osv.osv): counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0 ctx.update({'date': voucher_date}) for l in line_dr_ids: - real_amount -= l.get('amount_in_company_currency', 0.0) - counter_for_writeoff -= l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or l.get('amount_in_voucher_currency',0.0) + #compute the amount in voucher currency and in company currency if there aren't set yet + if not l.get('amount_in_company_currency', False): + ctx.update({'date': l['date_original']}) + amount_in_company_currency = currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + ctx.update({'date': voucher_date}) + else: + amount_in_company_currency = l.get('amount_in_company_currency', 0.0) + if not l.get('amount_in_voucher_currency'): + amount_in_voucher_currency = currency_pool.compute(cr, uid, l['currency_id'], l['voucher_currency_id'], l['amount'], context=ctx) + else: + amount_in_voucher_currency = l.get('amount_in_voucher_currency', 0.0) + real_amount -= amount_in_company_currency + counter_for_writeoff -= l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or amount_in_voucher_currency counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) for l in line_cr_ids: - real_amount += l.get('amount_in_company_currency', 0.0) - counter_for_writeoff += l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or l.get('amount_in_voucher_currency',0.0) + #compute the amount in voucher currency and in company currency if there aren't set yet + if not l.get('amount_in_company_currency', False): + ctx.update({'date': l['date_original']}) + amount_in_company_currency = currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) + ctx.update({'date': voucher_date}) + else: + amount_in_company_currency = l.get('amount_in_company_currency', 0.0) + if not l.get('amount_in_voucher_currency'): + amount_in_voucher_currency = currency_pool.compute(cr, uid, l['currency_id'], l['voucher_currency_id'], l['amount'], context=ctx) + else: + amount_in_voucher_currency = l.get('amount_in_voucher_currency', 0.0) + real_amount += amount_in_company_currency + counter_for_writeoff += l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or amount_in_voucher_currency counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx) writeoff_amount = amount - counter_for_writeoff currency_rate_difference = real_amount - counter_for_currency_diff @@ -287,7 +309,7 @@ class account_voucher(osv.osv): tax_pool = self.pool.get('account.tax') partner_pool = self.pool.get('res.partner') position_pool = self.pool.get('account.fiscal.position') - voucher_line_pool = self.pool.get('account.voucher.line') + voucher_voucher_line_obj = self.pool.get('account.voucher.line') voucher_pool = self.pool.get('account.voucher') if context is None: context = {} @@ -296,7 +318,7 @@ class account_voucher(osv.osv): for line in voucher.line_ids: voucher_amount += line.untax_amount or line.amount line.amount = line.untax_amount or line.amount - voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount}) + voucher_voucher_line_obj.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount}) if not voucher.tax_id: self.write(cr, uid, [voucher.id], {'amount':voucher_amount, 'tax_amount':0.0}) @@ -324,7 +346,7 @@ class account_voucher(osv.osv): line_total += tax_line.get('price_unit') total_tax += line_tax untax_amount = line.untax_amount or line.amount - voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount}) + voucher_voucher_line_obj.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount}) self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax}) return True @@ -334,14 +356,14 @@ class account_voucher(osv.osv): tax_pool = self.pool.get('account.tax') partner_pool = self.pool.get('res.partner') position_pool = self.pool.get('account.fiscal.position') - line_pool = self.pool.get('account.voucher.line') + voucher_line_obj = self.pool.get('account.voucher.line') res = { 'tax_amount': False, 'amount': False, } voucher_total = 0.0 - line_ids = resolve_o2m_operations(cr, uid, line_pool, line_ids, ["amount"], context) + line_ids = resolve_o2m_operations(cr, uid, voucher_line_obj, line_ids, ["amount"], context) total = 0.0 total_tax = 0.0 @@ -449,10 +471,10 @@ class account_voucher(osv.osv): context_multi_currency.update({'date': date}) currency_pool = self.pool.get('res.currency') - move_line_pool = self.pool.get('account.move.line') + move_line_obj = self.pool.get('account.move.line') partner_pool = self.pool.get('res.partner') journal_pool = self.pool.get('account.journal') - line_pool = self.pool.get('account.voucher.line') + voucher_line_obj = self.pool.get('account.voucher.line') #get default values vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context=context) vals = vals.get('value',{}) @@ -462,9 +484,9 @@ class account_voucher(osv.osv): } #drop existing lines - line_ids = ids and line_pool.search(cr, uid, [('voucher_id', 'in', ids)]) or [] + line_ids = ids and voucher_line_obj.search(cr, uid, [('voucher_id', 'in', ids)]) or [] if line_ids: - line_pool.unlink(cr, uid, line_ids, context=context) + voucher_line_obj.unlink(cr, uid, line_ids, context=context) if not partner_id: return default @@ -491,14 +513,14 @@ class account_voucher(osv.osv): account_type = 'receivable' if not context.get('move_line_ids', False): - ids = move_line_pool.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context) + ids = move_line_obj.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context) else: ids = context['move_line_ids'] #computation of the assignation of voucher amount on voucher lines total_credit = account_type == 'receivable' and price or 0.0 total_debit = account_type == 'payable' and price or 0.0 - moves = move_line_pool.browse(cr, uid, ids, context=context) + moves = move_line_obj.browse(cr, uid, ids, context=context) company_currency = journal.company_id.currency_id.id invoice_id = context.get('invoice_id', False) move_line_found = False @@ -540,7 +562,7 @@ class account_voucher(osv.osv): if line.debit and line.reconcile_partial_id and ttype == 'payment': continue original_amount = line.credit or line.debit or 0.0 - amount_original, amount_unreconciled = line_pool._get_amounts(cr, uid, line, context=context) + amount_original, amount_unreconciled = voucher_line_obj._get_amounts(cr, uid, line, context=context) currency_id = line.currency_id and line.currency_id.id or line.company_id.currency_id.id rs = { 'name':line.move_id.name, @@ -555,8 +577,8 @@ class account_voucher(osv.osv): 'company_currency_id': line.company_id.currency_id.id, 'date_due':line.date_maturity, 'amount_unreconciled': amount_unreconciled, - 'amount_in_company_currency': 0.0, } + #split voucher amount by most old first if not move_line_found: if company_currency == voucher_currency_id: if line.credit: @@ -587,7 +609,7 @@ class account_voucher(osv.osv): default['value']['pre_line'] = 1 elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0: default['value']['pre_line'] = 1 - default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, date, context=context) + default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, date, context=context) return default def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): @@ -704,7 +726,7 @@ class account_voucher(osv.osv): if context is None: context = {} move_pool = self.pool.get('account.move') - move_line_pool = self.pool.get('account.move.line') + move_line_obj = self.pool.get('account.move.line') currency_pool = self.pool.get('res.currency') tax_obj = self.pool.get('account.tax') seq_obj = self.pool.get('ir.sequence') @@ -764,7 +786,7 @@ class account_voucher(osv.osv): 'date': voucher.date, 'date_maturity': voucher.date_due } - move_line_pool.create(cr, uid, move_line) + move_line_obj.create(cr, uid, move_line) #create the move line for the currency difference if voucher.currency_rate_difference: @@ -789,7 +811,7 @@ class account_voucher(osv.osv): 'date': voucher.date, 'date_maturity': voucher.date_due } - move_line_pool.create(cr, uid, currency_diff_line, context=context) + move_line_obj.create(cr, uid, currency_diff_line, context=context) rec_list_ids = [] for line in voucher.line_ids: @@ -836,7 +858,7 @@ class account_voucher(osv.osv): raise osv.except_osv(_('No Account Base Code and Account Tax Code!'),_("You have to configure account base code and account tax code on the '%s' tax!") % (tax_data.name)) sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1 move_line['amount_currency'] = company_currency <> line.currency_id.id and sign * line.amount or 0.0 - voucher_line = move_line_pool.create(cr, uid, move_line) + voucher_line = move_line_obj.create(cr, uid, move_line) if line.move_line_id.id: rec_ids = [voucher_line, line.move_line_id.id] rec_list_ids.append(rec_ids) @@ -864,7 +886,7 @@ class account_voucher(osv.osv): 'amount_currency': company_currency <> voucher_currency and -voucher.writeoff_amount or 0.0, 'currency_id': company_currency <> voucher_currency and voucher_currency or False, } - move_line_pool.create(cr, uid, move_line) + move_line_obj.create(cr, uid, move_line) self.write(cr, uid, [voucher.id], { 'move_id': move_id, 'state': 'posted', @@ -874,7 +896,7 @@ class account_voucher(osv.osv): move_pool.post(cr, uid, [move_id], context={}) for rec_ids in rec_list_ids: if len(rec_ids) >= 2: - move_line_pool.reconcile_partial(cr, uid, rec_ids) + move_line_obj.reconcile_partial(cr, uid, rec_ids) return True def copy(self, cr, uid, id, default={}, context=None): @@ -998,9 +1020,9 @@ class account_voucher_line(osv.osv): @return: Returns a dict which contains new values, and context """ res = {} - move_line_pool = self.pool.get('account.move.line') + move_line_obj = self.pool.get('account.move.line') if move_line_id: - move_line = move_line_pool.browse(cr, user, move_line_id, context=context) + move_line = move_line_obj.browse(cr, user, move_line_id, context=context) if move_line.credit: ttype = 'dr' else: From ae7b1699cb3d0ae8863c2669972913884c95a6c9 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Wed, 24 Aug 2011 04:37:28 +0000 Subject: [PATCH 072/156] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110823050537-7q5lx6k2wq8n70ld bzr revid: launchpad_translations_on_behalf_of_openerp-20110824043728-ri9o75i5hp2tss1x --- addons/account/i18n/ca.po | 2 +- addons/account/i18n/es.po | 2 +- addons/account_analytic_analysis/i18n/nb.po | 11 +- addons/account_analytic_plans/i18n/ca.po | 2 +- addons/account_asset/i18n/ca.po | 2 +- addons/account_followup/i18n/ca.po | 2 +- addons/account_payment/i18n/ca.po | 2 +- addons/account_sequence/i18n/ca.po | 2 +- addons/base_module_quality/i18n/ca.po | 2 +- addons/base_tools/i18n/ar.po | 32 + addons/caldav/i18n/ca.po | 2 +- addons/crm/i18n/ca.po | 2 +- addons/crm/i18n/nb.po | 67 +- addons/crm_claim/i18n/ca.po | 2 +- addons/document_webdav/i18n/ca.po | 2 +- addons/email_template/i18n/ca.po | 2 +- addons/fetchmail/i18n/el.po | 17 +- addons/hr/i18n/nb.po | 34 +- addons/hr_evaluation/i18n/tr.po | 896 ++++++++++ addons/hr_payroll/i18n/tr.po | 1618 +++++++++++++++++++ addons/hr_payroll_account/i18n/ca.po | 2 +- addons/hr_payroll_account/i18n/tr.po | 331 ++++ addons/hr_recruitment/i18n/tr.po | 957 +++++++++++ addons/hr_timesheet_invoice/i18n/ca.po | 2 +- addons/l10n_in/i18n/ca.po | 2 +- addons/l10n_syscohada/i18n/ca.po | 2 +- addons/marketing/i18n/ca.po | 2 +- addons/mrp/i18n/ca.po | 2 +- addons/point_of_sale/i18n/ca.po | 2 +- addons/portal/i18n/ca.po | 2 +- addons/project/i18n/ca.po | 2 +- addons/project_issue/i18n/ca.po | 2 +- addons/project_long_term/i18n/ca.po | 2 +- addons/project_messages/i18n/ca.po | 2 +- addons/project_scrum/i18n/ca.po | 2 +- addons/project_scrum/i18n/zh_CN.po | 2 +- addons/purchase/i18n/ca.po | 2 +- addons/purchase_requisition/i18n/ca.po | 2 +- addons/report_webkit/i18n/ca.po | 2 +- addons/resource/i18n/es_EC.po | 2 +- addons/sale_crm/i18n/ca.po | 2 +- addons/share/i18n/ca.po | 2 +- addons/stock/i18n/ca.po | 2 +- addons/stock_planning/i18n/ca.po | 2 +- 44 files changed, 3933 insertions(+), 100 deletions(-) create mode 100644 addons/base_tools/i18n/ar.po create mode 100644 addons/hr_evaluation/i18n/tr.po create mode 100644 addons/hr_payroll/i18n/tr.po create mode 100644 addons/hr_payroll_account/i18n/tr.po create mode 100644 addons/hr_recruitment/i18n/tr.po diff --git a/addons/account/i18n/ca.po b/addons/account/i18n/ca.po index cf110b23577..2456348d569 100644 --- a/addons/account/i18n/ca.po +++ b/addons/account/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account diff --git a/addons/account/i18n/es.po b/addons/account/i18n/es.po index d1cf677ef46..02d26c82815 100644 --- a/addons/account/i18n/es.po +++ b/addons/account/i18n/es.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account diff --git a/addons/account_analytic_analysis/i18n/nb.po b/addons/account_analytic_analysis/i18n/nb.po index d87530e248d..ab0b8283735 100644 --- a/addons/account_analytic_analysis/i18n/nb.po +++ b/addons/account_analytic_analysis/i18n/nb.po @@ -8,21 +8,22 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2010-08-02 21:56+0000\n" -"Last-Translator: Mantavya Gajjar (Open ERP) \n" +"PO-Revision-Date: 2011-08-23 11:12+0000\n" +"Last-Translator: Rolv Råen (adEgo) \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:20+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" #. module: account_analytic_analysis #: help:account.analytic.account,hours_qtt_invoiced:0 msgid "" "Number of hours that can be invoiced plus those that already have been " "invoiced." -msgstr "Antall timer som faktureres plus de som allerede har blitt fakturert" +msgstr "" +"Antall timer som kan faktureres pluss de som allerede har blitt fakturert" #. module: account_analytic_analysis #: help:account.analytic.account,remaining_ca:0 diff --git a/addons/account_analytic_plans/i18n/ca.po b/addons/account_analytic_plans/i18n/ca.po index 8c979a5a9bf..1afeab9bde3 100644 --- a/addons/account_analytic_plans/i18n/ca.po +++ b/addons/account_analytic_plans/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account_analytic_plans diff --git a/addons/account_asset/i18n/ca.po b/addons/account_asset/i18n/ca.po index 3f92d51f740..ba4241bcbbb 100755 --- a/addons/account_asset/i18n/ca.po +++ b/addons/account_asset/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account_asset diff --git a/addons/account_followup/i18n/ca.po b/addons/account_followup/i18n/ca.po index 10ee4d15f05..debbd6f4923 100644 --- a/addons/account_followup/i18n/ca.po +++ b/addons/account_followup/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account_followup diff --git a/addons/account_payment/i18n/ca.po b/addons/account_payment/i18n/ca.po index 75e0067fe1e..4f0c9e0b5a1 100644 --- a/addons/account_payment/i18n/ca.po +++ b/addons/account_payment/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account_payment diff --git a/addons/account_sequence/i18n/ca.po b/addons/account_sequence/i18n/ca.po index 6f7523bf4c8..ba2e30542e5 100644 --- a/addons/account_sequence/i18n/ca.po +++ b/addons/account_sequence/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: account_sequence diff --git a/addons/base_module_quality/i18n/ca.po b/addons/base_module_quality/i18n/ca.po index ba7ac4851ed..0b40e891b02 100644 --- a/addons/base_module_quality/i18n/ca.po +++ b/addons/base_module_quality/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: base_module_quality diff --git a/addons/base_tools/i18n/ar.po b/addons/base_tools/i18n/ar.po new file mode 100644 index 00000000000..6f57e891a4f --- /dev/null +++ b/addons/base_tools/i18n/ar.po @@ -0,0 +1,32 @@ +# Arabic translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-08-23 01:58+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Arabic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" + +#. module: base_tools +#: model:ir.module.module,shortdesc:base_tools.module_meta_information +msgid "Common base for tools modules" +msgstr "قاعدة أساسية لأدوات البرامج" + +#. module: base_tools +#: model:ir.module.module,description:base_tools.module_meta_information +msgid "" +"\n" +" " +msgstr "" +"\n" +" " diff --git a/addons/caldav/i18n/ca.po b/addons/caldav/i18n/ca.po index be755a581a8..c0a111803d1 100644 --- a/addons/caldav/i18n/ca.po +++ b/addons/caldav/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: caldav diff --git a/addons/crm/i18n/ca.po b/addons/crm/i18n/ca.po index 6cd1f755618..735371162e7 100644 --- a/addons/crm/i18n/ca.po +++ b/addons/crm/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: crm diff --git a/addons/crm/i18n/nb.po b/addons/crm/i18n/nb.po index ecb8ece2f54..c082abdfc3b 100644 --- a/addons/crm/i18n/nb.po +++ b/addons/crm/i18n/nb.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-03-31 18:06+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2011-08-23 11:25+0000\n" +"Last-Translator: Rolv Råen (adEgo) \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 04:58+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" #. module: crm #: view:crm.lead.report:0 @@ -42,7 +42,7 @@ msgstr "Månedlig" #. module: crm #: view:crm.opportunity2phonecall:0 msgid "Schedule a PhoneCall" -msgstr "" +msgstr "Planlegg en telefonsamtale" #. module: crm #: model:ir.model,name:crm.model_crm_case_stage @@ -52,17 +52,17 @@ msgstr "" #. module: crm #: view:crm.meeting:0 msgid "Visibility" -msgstr "" +msgstr "Synlighet" #. module: crm #: field:crm.lead,title:0 msgid "Title" -msgstr "" +msgstr "Tittel" #. module: crm #: field:crm.meeting,show_as:0 msgid "Show as" -msgstr "" +msgstr "Vis som" #. module: crm #: field:crm.meeting,day:0 @@ -74,7 +74,7 @@ msgstr "" #: view:crm.lead:0 #: view:crm.phonecall:0 msgid "Today" -msgstr "" +msgstr "I dag" #. module: crm #: view:crm.merge.opportunity:0 @@ -87,7 +87,7 @@ msgstr "" #: view:crm.phonecall2phonecall:0 #: view:crm.send.mail:0 msgid " " -msgstr "" +msgstr " " #. module: crm #: view:crm.lead.report:0 @@ -125,7 +125,7 @@ msgid "The code of the sales team must be unique !" msgstr "" #. module: crm -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:93 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:95 #, python-format msgid "Lead '%s' has been converted to an opportunity." msgstr "" @@ -142,8 +142,8 @@ msgid "No Repeat" msgstr "" #. module: crm -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:133 -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:258 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:135 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:260 #: code:addons/crm/wizard/crm_lead_to_partner.py:55 #: code:addons/crm/wizard/crm_phonecall_to_partner.py:52 #, python-format @@ -153,7 +153,7 @@ msgstr "Advarsel !" #. module: crm #: selection:crm.meeting,rrule_type:0 msgid "Yearly" -msgstr "" +msgstr "Årlig" #. module: crm #: field:crm.segmentation.line,name:0 @@ -168,7 +168,7 @@ msgstr "Regelnavn" #: field:crm.lead.report,type_id:0 #: model:ir.model,name:crm.model_crm_case_resource_type msgid "Campaign" -msgstr "" +msgstr "Kampanje" #. module: crm #: selection:crm.lead2opportunity.partner,action:0 @@ -226,7 +226,7 @@ msgstr "Partner" #: field:crm.meeting,organizer:0 #: field:crm.meeting,organizer_id:0 msgid "Organizer" -msgstr "" +msgstr "Organisator" #. module: crm #: view:crm.phonecall:0 @@ -250,7 +250,7 @@ msgstr "" #: view:res.partner:0 #, python-format msgid "Phone Call" -msgstr "" +msgstr "Telefonsamtale" #. module: crm #: field:crm.lead,optout:0 @@ -275,7 +275,7 @@ msgstr "" #. module: crm #: view:crm.lead:0 msgid "Send New Email" -msgstr "" +msgstr "Send ny e-post" #. module: crm #: field:crm.segmentation,segmentation_line:0 @@ -295,7 +295,7 @@ msgstr "Seksjoner" #. module: crm #: view:crm.merge.opportunity:0 msgid "_Merge" -msgstr "" +msgstr "_Flett" #. module: crm #: view:crm.lead.report:0 @@ -315,13 +315,13 @@ msgstr "" #. module: crm #: selection:crm.meeting,class:0 msgid "Public" -msgstr "" +msgstr "Offentlig" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_resource_type_act #: model:ir.ui.menu,name:crm.menu_crm_case_resource_type_act msgid "Campaigns" -msgstr "" +msgstr "Kampanjer" #. module: crm #: model:ir.actions.act_window,name:crm.crm_lead_categ_action @@ -333,7 +333,7 @@ msgstr "Kategorier" #. module: crm #: selection:crm.meeting,end_type:0 msgid "Forever" -msgstr "" +msgstr "For alltid" #. module: crm #: help:crm.lead,optout:0 @@ -350,7 +350,7 @@ msgstr "" #. module: crm #: field:crm.lead,contact_name:0 msgid "Contact Name" -msgstr "" +msgstr "Kontaktnavn" #. module: crm #: selection:crm.lead2opportunity.partner,action:0 @@ -535,9 +535,9 @@ msgstr "" #. module: crm #: code:addons/crm/crm_lead.py:278 -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:195 -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:229 -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:297 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:197 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:231 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:299 #: view:crm.lead2opportunity:0 #: view:crm.partner2opportunity:0 #: model:ir.actions.act_window,name:crm.action_crm_lead2opportunity @@ -808,8 +808,8 @@ msgid "Statistics Dashboard" msgstr "" #. module: crm -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:86 -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:96 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:88 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:98 #: code:addons/crm/wizard/crm_partner_to_opportunity.py:101 #: code:addons/crm/wizard/crm_phonecall_to_opportunity.py:117 #: view:crm.lead:0 @@ -1085,7 +1085,7 @@ msgstr "" #. module: crm #: code:addons/crm/crm_opportunity.py:208 -#: code:addons/crm/crm_phonecall.py:184 +#: code:addons/crm/crm_phonecall.py:185 #: code:addons/crm/wizard/crm_phonecall_to_meeting.py:55 #: code:addons/crm/wizard/crm_phonecall_to_meeting.py:137 #: view:crm.meeting:0 @@ -2591,7 +2591,7 @@ msgid "Meeting Type" msgstr "" #. module: crm -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:312 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:314 #, python-format msgid "Merge with Existing Opportunity" msgstr "" @@ -3103,8 +3103,8 @@ msgid "Schedule Call" msgstr "" #. module: crm -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:133 -#: code:addons/crm/wizard/crm_lead_to_opportunity.py:258 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:135 +#: code:addons/crm/wizard/crm_lead_to_opportunity.py:260 #, python-format msgid "Closed/Cancelled Leads Could not convert into Opportunity" msgstr "" @@ -3975,9 +3975,6 @@ msgstr "" #~ msgid "Mail to responsible" #~ msgstr "E-post til ansvarlig" -#~ msgid "%(case_date)s = Creation date" -#~ msgstr "%(case_date)s = Registreringsdato" - #~ msgid "Set responsible to" #~ msgstr "Sett ansvarlig til" diff --git a/addons/crm_claim/i18n/ca.po b/addons/crm_claim/i18n/ca.po index 831daf236f9..df58f0d2704 100644 --- a/addons/crm_claim/i18n/ca.po +++ b/addons/crm_claim/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: crm_claim diff --git a/addons/document_webdav/i18n/ca.po b/addons/document_webdav/i18n/ca.po index 7d7d92b786c..d0ed431246d 100644 --- a/addons/document_webdav/i18n/ca.po +++ b/addons/document_webdav/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: document_webdav diff --git a/addons/email_template/i18n/ca.po b/addons/email_template/i18n/ca.po index 6b0e49ba10f..22650083ff1 100644 --- a/addons/email_template/i18n/ca.po +++ b/addons/email_template/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: email_template diff --git a/addons/fetchmail/i18n/el.po b/addons/fetchmail/i18n/el.po index 561000f87be..402020e4f8c 100644 --- a/addons/fetchmail/i18n/el.po +++ b/addons/fetchmail/i18n/el.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2010-11-27 17:59+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2011-08-23 14:49+0000\n" +"Last-Translator: Tryfon Farmakakis \n" "Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:45+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" #. module: fetchmail #: constraint:email.server:0 @@ -53,7 +53,7 @@ msgstr "" #. module: fetchmail #: selection:email.server,state:0 msgid "Not Confirmed" -msgstr "" +msgstr "Μη Επιβεβαιωμένο" #. module: fetchmail #: field:email.server,user:0 @@ -91,7 +91,7 @@ msgstr "" #. module: fetchmail #: field:email.server,attach:0 msgid "Add Attachments ?" -msgstr "" +msgstr "Προσθήκη Επισυνάψεων;" #. module: fetchmail #: view:email.server:0 @@ -124,6 +124,7 @@ msgid "Password" msgstr "" #. module: fetchmail +#: model:ir.actions.act_window,name:fetchmail.act_server_history #: view:mailgate.message:0 msgid "Emails" msgstr "" @@ -131,7 +132,7 @@ msgstr "" #. module: fetchmail #: view:email.server:0 msgid "Search Email Servers" -msgstr "" +msgstr "Αναζήτηση Εξυπηρτεητή Email" #. module: fetchmail #: view:email.server:0 @@ -141,7 +142,7 @@ msgstr "" #. module: fetchmail #: view:email.server:0 msgid "Auto Reply?" -msgstr "" +msgstr "Αυτόματη Απάντηση;" #. module: fetchmail #: field:email.server,name:0 diff --git a/addons/hr/i18n/nb.po b/addons/hr/i18n/nb.po index d537a99ad31..1d041d0da11 100644 --- a/addons/hr/i18n/nb.po +++ b/addons/hr/i18n/nb.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-04-05 22:56+0000\n" -"Last-Translator: Rolv Råen \n" +"PO-Revision-Date: 2011-08-23 11:20+0000\n" +"Last-Translator: Rolv Råen (adEgo) \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:30+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" #. module: hr #: model:process.node,name:hr.process_node_openerpuser0 @@ -26,7 +26,7 @@ msgstr "OpenERP bruker" #: view:hr.job:0 #: field:hr.job,requirements:0 msgid "Requirements" -msgstr "" +msgstr "Krav" #. module: hr #: constraint:hr.department:0 @@ -90,7 +90,7 @@ msgstr "" #. module: hr #: view:hr.job:0 msgid "Jobs" -msgstr "" +msgstr "Jobber" #. module: hr #: view:hr.job:0 @@ -118,7 +118,7 @@ msgstr "" #. module: hr #: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason_config msgid "Holidays" -msgstr "" +msgstr "Ferie" #. module: hr #: help:hr.installer,hr_holidays:0 @@ -184,7 +184,7 @@ msgstr "" #. module: hr #: view:hr.employee:0 msgid "Position" -msgstr "" +msgstr "Stilling" #. module: hr #: model:ir.actions.act_window,name:hr.action2 @@ -228,7 +228,7 @@ msgstr "" #. module: hr #: field:hr.installer,hr_evaluation:0 msgid "Periodic Evaluations" -msgstr "" +msgstr "Periodisk evaluering" #. module: hr #: field:hr.installer,hr_timesheet_sheet:0 @@ -248,7 +248,7 @@ msgstr "Personnummer" #. module: hr #: help:hr.job,no_of_employee:0 msgid "Number of employee with that job." -msgstr "" +msgstr "Antall ansatte med denne jobben" #. module: hr #: field:hr.employee,work_phone:0 @@ -321,7 +321,7 @@ msgstr "" #: field:hr.employee,job_id:0 #: view:hr.job:0 msgid "Job" -msgstr "" +msgstr "Jobb" #. module: hr #: view:hr.department:0 @@ -398,7 +398,7 @@ msgstr "Mann" #. module: hr #: field:hr.installer,progress:0 msgid "Configuration Progress" -msgstr "" +msgstr "Konfigurasjonsfremdrift" #. module: hr #: model:ir.actions.act_window,name:hr.open_view_categ_form @@ -415,7 +415,7 @@ msgstr "Ansattkategori" #. module: hr #: field:hr.installer,config_logo:0 msgid "Image" -msgstr "" +msgstr "Bilde" #. module: hr #: model:process.process,name:hr.process_process_employeecontractprocess0 @@ -503,7 +503,7 @@ msgstr "Status" #. module: hr #: view:hr.installer:0 msgid "Configure" -msgstr "" +msgstr "Konfigurer" #. module: hr #: model:ir.actions.act_window,name:hr.open_view_categ_tree @@ -692,7 +692,7 @@ msgstr "Single" #. module: hr #: field:hr.job,name:0 msgid "Job Name" -msgstr "" +msgstr "Jobbnavn" #. module: hr #: view:hr.job:0 @@ -772,7 +772,7 @@ msgstr "Avdelingsnavn" #. module: hr #: help:hr.employee,ssnid:0 msgid "Social Security Number" -msgstr "" +msgstr "Personnummer" #. module: hr #: model:process.node,note:hr.process_node_openerpuser0 @@ -782,7 +782,7 @@ msgstr "Opprettelse av en OpenERP bruker" #. module: hr #: field:hr.department,child_ids:0 msgid "Child Departments" -msgstr "" +msgstr "Underavdelinger" #. module: hr #: model:ir.actions.act_window,name:hr.action_hr_job diff --git a/addons/hr_evaluation/i18n/tr.po b/addons/hr_evaluation/i18n/tr.po new file mode 100644 index 00000000000..562d4ba4d4d --- /dev/null +++ b/addons/hr_evaluation/i18n/tr.po @@ -0,0 +1,896 @@ +# Turkish translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-08-23 11:09+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,state:0 +#: selection:hr_evaluation.evaluation,state:0 +msgid "Plan In Progress" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,wait:0 +msgid "Wait Previous Phases" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr.evaluation.report:0 +#: view:hr_evaluation.plan:0 +msgid "Group By..." +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.interview,request_id:0 +#: field:hr.evaluation.report,request_id:0 +msgid "Request_id" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,progress_bar:0 +#: field:hr_evaluation.evaluation,progress:0 +msgid "Progress" +msgstr "" + +#. module: hr_evaluation +#: view:board.board:0 +#: model:ir.actions.act_window,name:hr_evaluation.act_hr_evaluation_tree +msgid "My Evaluation Remaining" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Legend" +msgstr "" + +#. module: hr_evaluation +#: code:addons/hr_evaluation/hr_evaluation.py:311 +#, python-format +msgid "You cannot start evaluation without Evaluation." +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "March" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,delay_date:0 +msgid "Delay to Start" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr_evaluation.evaluation,rating:0 +msgid "Appreciation" +msgstr "" + +#. module: hr_evaluation +#: code:addons/hr_evaluation/hr_evaluation.py:242 +#: code:addons/hr_evaluation/hr_evaluation.py:311 +#, python-format +msgid "Warning !" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan:0 +#: field:hr_evaluation.plan,company_id:0 +#: field:hr_evaluation.plan.phase,company_id:0 +msgid "Company" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,name:hr_evaluation.act_hr_employee_2_hr__evaluation_interview +msgid "Evaluation Interviews" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,survey_id:0 +msgid "Appraisal Form" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,day:0 +msgid "Day" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.interview,evaluation_id:0 +msgid "Evaluation Form" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan.phase,send_anonymous_employee:0 +msgid "Send an anonymous summary to the employee" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan,month_first:0 +msgid "" +"This number of months will be used to schedule the first evaluation date of " +"the employee when selecting an evaluation plan. " +msgstr "" + +#. module: hr_evaluation +#: view:hr.employee:0 +msgid "Notes" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +msgid "Interview Request" +msgstr "" + +#. module: hr_evaluation +#: constraint:hr.employee:0 +msgid "" +"Error ! You cannot select a department for which the employee is the manager." +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Mail Body" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: model:ir.actions.act_window,name:hr_evaluation.action_evaluation_report_all +#: model:ir.ui.menu,name:hr_evaluation.menu_evaluation_report_all +msgid "Evaluations Analysis" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,state:0 +#: selection:hr_evaluation.evaluation,state:0 +msgid "Cancelled" +msgstr "" + +#. module: hr_evaluation +#: model:ir.model,name:hr_evaluation.model_hr_evaluation_reminder +msgid "Sends Reminders to employess to fill the evaluations" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,rating:0 +#: selection:hr_evaluation.evaluation,rating:0 +msgid "Did not meet expectations" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Appraisal" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "July" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan,month_next:0 +msgid "Periodicity of Evaluations (months)" +msgstr "" + +#. module: hr_evaluation +#: code:addons/hr_evaluation/hr_evaluation.py:242 +#, python-format +msgid "" +"You cannot change state, because some appraisal in waiting answer or draft " +"state" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.evaluation,date_close:0 +msgid "Ending Date" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan,month_first:0 +msgid "First Evaluation in (months)" +msgstr "" + +#. module: hr_evaluation +#: code:addons/hr_evaluation/hr_evaluation.py:81 +#, python-format +msgid "" +"\n" +"Date: %(date)s\n" +"\n" +"Dear %(employee_name)s,\n" +"\n" +"I am doing an evaluation regarding %(eval_name)s.\n" +"\n" +"Kindly submit your response.\n" +"\n" +"\n" +"Thanks,\n" +"--\n" +"%(user_signature)s\n" +"\n" +" " +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Send to Employees" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,deadline:0 +msgid "Deadline" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +msgid " Month " +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan,month_next:0 +msgid "" +"The number of month that depicts the delay between each evaluation of this " +"plan (after the first one)." +msgstr "" + +#. module: hr_evaluation +#: model:ir.ui.menu,name:hr_evaluation.menu_eval_hr_config +msgid "Periodic Evaluations" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.reminder:0 +msgid "Send evaluation reminder" +msgstr "" + +#. module: hr_evaluation +#: model:ir.module.module,description:hr_evaluation.module_meta_information +msgid "" +"\n" +" Ability to create employees evaluation.\n" +" An evaluation can be created by employee for subordinates,\n" +" juniors as well as his manager.The evaluation is done under a " +"plan\n" +" in which various surveys can be created and it can be defined " +"which\n" +" level of employee hierarchy fills what and final review and " +"evaluation\n" +" is done by the manager.Every evaluation filled by the employees " +"can be viewed\n" +" in the form of.Implements a dashboard for My Current Evaluations\n" +" " +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "(date)s: Current Date" +msgstr "" + +#. module: hr_evaluation +#: code:addons/hr_evaluation/hr_evaluation.py:80 +#, python-format +msgid "Regarding " +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,state:0 +#: view:hr_evaluation.evaluation:0 +#: field:hr_evaluation.evaluation,state:0 +msgid "State" +msgstr "" + +#. module: hr_evaluation +#: model:ir.model,name:hr_evaluation.model_hr_evaluation_plan_phase +msgid "Evaluation Plan Phase" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,employee_id:0 +#: view:hr_evaluation.evaluation:0 +#: field:hr_evaluation.evaluation,employee_id:0 +#: model:ir.model,name:hr_evaluation.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,overpass_delay:0 +msgid "Overpassed Deadline" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,mail_body:0 +msgid "Email" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,rating:0 +#: selection:hr_evaluation.evaluation,rating:0 +msgid "Exceeds expectations" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan.phase,mail_feature:0 +msgid "" +"Check this box if you want to send mail to employees coming under this phase" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan.phase,send_answer_manager:0 +msgid "Send all answers to the manager" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +msgid " Month-1 " +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Public Notes" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.evaluation,date:0 +msgid "Evaluation Deadline" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr_evaluation.evaluation:0 +msgid "Print Interview" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,closed:0 +msgid "closed" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,rating:0 +#: selection:hr_evaluation.evaluation,rating:0 +msgid "Meet expectations" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,nbr:0 +msgid "# of Requests" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,name:hr_evaluation.open_view_hr_evaluation_tree +#: model:ir.ui.menu,name:hr_evaluation.menu_eval_hr +#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_hr_evaluation_tree +msgid "Evaluations" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,help:hr_evaluation.open_view_hr_evaluation_tree +msgid "" +"Each employee may be assigned an evaluation plan. Such a plan defines the " +"frequency and the way you manage your periodic personnel evaluation. You " +"will be able to define steps and attach interviews to each step. OpenERP " +"manages all kind of evaluations: bottom-up, top-down, self-evaluation and " +"final evaluation by the manager." +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Action to Perform" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.evaluation,note_action:0 +msgid "Action Plan" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "(eval_name)s:Evaluation Name" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Ending Summary" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,rating:0 +#: selection:hr_evaluation.evaluation,rating:0 +msgid "Significantly exceeds expectations" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "In progress" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,send_answer_employee:0 +#: field:hr_evaluation.plan.phase,send_answer_manager:0 +msgid "All Answers" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "September" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "December" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,month:0 +msgid "Month" +msgstr "" + +#. module: hr_evaluation +#: model:ir.module.module,shortdesc:hr_evaluation.module_meta_information +msgid "Human Resources Evaluation" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Group by..." +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Mail Settings" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.interview,user_to_review_id:0 +msgid "Employee to Interview" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr_evaluation.evaluation:0 +msgid "Interview Question" +msgstr "" + +#. module: hr_evaluation +#: field:survey.request,is_evaluation:0 +msgid "Is Evaluation?" +msgstr "" + +#. module: hr_evaluation +#: model:ir.model,name:hr_evaluation.model_survey_request +msgid "survey.request" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan.phase,wait:0 +msgid "" +"Check this box if you want to wait that all preceding phases are finished " +"before launching this phase." +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Evaluation Data" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.evaluation,note_action:0 +msgid "" +"If the evaluation does not meet the expectations, you can proposean action " +"plan" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,state:0 +#: selection:hr_evaluation.evaluation,state:0 +msgid "Draft" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.evaluation,note_summary:0 +msgid "Evaluation Summary" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,send_anonymous_employee:0 +#: field:hr_evaluation.plan.phase,send_anonymous_manager:0 +msgid "Anonymous Summary" +msgstr "" + +#. module: hr_evaluation +#: view:hr.employee:0 +#: view:hr_evaluation.evaluation:0 +msgid "Evaluation" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "7 Days" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +msgid " Year " +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "August" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Start Evaluation" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +msgid "To Do" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "June" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,rating:0 +#: selection:hr_evaluation.evaluation,rating:0 +msgid "Significantly bellow expectations" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid " (employee_name)s: Partner name" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,plan_id:0 +#: view:hr_evaluation.evaluation:0 +#: field:hr_evaluation.evaluation,plan_id:0 +msgid "Plan" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan,active:0 +msgid "Active" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "November" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +msgid "Extended Filters..." +msgstr "" + +#. module: hr_evaluation +#: constraint:hr.employee:0 +msgid "Error ! You cannot create recursive Hierarchy of Employees." +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "October" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "January" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.reminder:0 +msgid "Send Mail" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan.phase,send_anonymous_manager:0 +msgid "Send an anonymous summary to the manager" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr_evaluation.evaluation:0 +msgid "Interview Evaluation" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,name:hr_evaluation.open_view_hr_evaluation_plan_tree +#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_hr_evaluation_plan_tree +msgid "Evaluation Plans" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Date" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +msgid "Survey" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.evaluation,rating:0 +msgid "This is the appreciation on that summarize the evaluation" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,action:0 +msgid "Action" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: selection:hr.evaluation.report,state:0 +msgid "Final Validation" +msgstr "" + +#. module: hr_evaluation +#: selection:hr_evaluation.evaluation,state:0 +msgid "Waiting Appreciation" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,mail_feature:0 +msgid "Send mail for this phase" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,rating:0 +msgid "Overall Rating" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr_evaluation.evaluation:0 +msgid "Late" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr_evaluation.evaluation:0 +msgid "Interviewer" +msgstr "" + +#. module: hr_evaluation +#: model:ir.model,name:hr_evaluation.model_hr_evaluation_report +msgid "Evaluations Statistics" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +msgid "Deadline Date" +msgstr "" + +#. module: hr_evaluation +#: selection:hr_evaluation.plan.phase,action:0 +msgid "Top-Down Appraisal Requests" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "General" +msgstr "" + +#. module: hr_evaluation +#: help:hr_evaluation.plan.phase,send_answer_employee:0 +msgid "Send all answers to the employee" +msgstr "" + +#. module: hr_evaluation +#: field:hr.employee,evaluation_date:0 +msgid "Next Evaluation Date" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: selection:hr.evaluation.report,state:0 +#: view:hr_evaluation.evaluation:0 +#: selection:hr_evaluation.evaluation,state:0 +msgid "Done" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Evaluation Plan Phases" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.reminder:0 +#: view:hr_evaluation.evaluation:0 +msgid "Cancel" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +msgid "In Progress" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,help:hr_evaluation.action_hr_evaluation_interview_tree +msgid "" +"Interview Requests are generated automatically by OpenERP according to an " +"employee's evaluation plan. Each user receives automatic emails and requests " +"to evaluate their colleagues periodically." +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan:0 +#: field:hr_evaluation.plan,phase_ids:0 +msgid "Evaluation Phases" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Current" +msgstr "" + +#. module: hr_evaluation +#: model:ir.model,name:hr_evaluation.model_hr_evaluation_interview +msgid "Evaluation Interview" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.reminder,evaluation_id:0 +msgid "Interview" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.reminder:0 +#: model:ir.ui.menu,name:hr_evaluation.menu_eval_send_mail +msgid "Evaluation Reminders" +msgstr "" + +#. module: hr_evaluation +#: selection:hr_evaluation.plan.phase,action:0 +msgid "Self Appraisal Requests" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,email_subject:0 +msgid "char" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.evaluation,survey_request_ids:0 +msgid "Appraisal Forms" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "May" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Internal Notes" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.evaluation:0 +msgid "Validate Evaluation" +msgstr "" + +#. module: hr_evaluation +#: selection:hr_evaluation.plan.phase,action:0 +msgid "Final Interview" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,name:0 +msgid "Phase" +msgstr "" + +#. module: hr_evaluation +#: selection:hr_evaluation.plan.phase,action:0 +msgid "Bottom-Up Appraisal Requests" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.interview:0 +#: view:hr_evaluation.evaluation:0 +msgid "Search Evaluation" +msgstr "" + +#. module: hr_evaluation +#: field:hr.employee,evaluation_plan_id:0 +#: view:hr_evaluation.plan:0 +#: field:hr_evaluation.plan,name:0 +#: field:hr_evaluation.plan.phase,plan_id:0 +#: model:ir.model,name:hr_evaluation.model_hr_evaluation_plan +msgid "Evaluation Plan" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "February" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "Send to Managers" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,name:hr_evaluation.action_hr_evaluation_send_mail +msgid "Evaluation Send Mail" +msgstr "" + +#. module: hr_evaluation +#: selection:hr.evaluation.report,month:0 +msgid "April" +msgstr "" + +#. module: hr_evaluation +#: model:ir.model,name:hr_evaluation.model_hr_evaluation_evaluation +msgid "Employee Evaluation" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan:0 +msgid "Search Evaluation Plan" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan:0 +msgid "(months)" +msgstr "" + +#. module: hr_evaluation +#: field:hr_evaluation.plan.phase,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: hr_evaluation +#: view:hr_evaluation.plan.phase:0 +msgid "(user_signature)s: User name" +msgstr "" + +#. module: hr_evaluation +#: model:ir.actions.act_window,name:hr_evaluation.action_hr_evaluation_interview_tree +#: model:ir.ui.menu,name:hr_evaluation.menu_open_hr_evaluation_interview_requests +msgid "Interview Requests" +msgstr "" + +#. module: hr_evaluation +#: field:hr.evaluation.report,create_date:0 +msgid "Create Date" +msgstr "" + +#. module: hr_evaluation +#: view:hr.evaluation.report:0 +#: field:hr.evaluation.report,year:0 +msgid "Year" +msgstr "" + +#. module: hr_evaluation +#: help:hr.employee,evaluation_date:0 +msgid "" +"The date of the next evaluation is computed by the evaluation plan's dates " +"(first evaluation + periodicity)." +msgstr "" diff --git a/addons/hr_payroll/i18n/tr.po b/addons/hr_payroll/i18n/tr.po new file mode 100644 index 00000000000..e4298555f66 --- /dev/null +++ b/addons/hr_payroll/i18n/tr.po @@ -0,0 +1,1618 @@ +# Turkish translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-08-23 11:18+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "E-mail Address" +msgstr "" + +#. module: hr_payroll +#: view:hr.allounce.deduction.categoty:0 +msgid "Based" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,net:0 +#: field:hr.employee,net:0 +#: field:hr.payroll.register,net:0 +#: field:hr.payslip,net:0 +#: report:salary.structure:0 +msgid "Net Salary" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Recompute Sheet" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "Employees Salary Details" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "Allowances with Basic:" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: report:salary.structure:0 +msgid "Department" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "Deductions:" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,gratuity:0 +msgid "Use for Gratuity ?" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,working_days_per_week:0 +#: field:hr.payslip,working_days:0 +#: report:payslip.pdf:0 +msgid "Working Days" +msgstr "" + +#. module: hr_payroll +#: selection:hr.allounce.deduction.categoty,type:0 +#: selection:hr.payslip.line,type:0 +msgid "Loan" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "Salary Payment Register" +msgstr "" + +#. module: hr_payroll +#: field:hr.employee,slip_ids:0 +#: view:hr.payroll.register:0 +#: field:hr.payroll.register,line_ids:0 +#: model:ir.actions.act_window,name:hr_payroll.act_hr_employee_payslip_list +msgid "Payslips" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.report.xml,name:hr_payroll.year_salary_report +msgid "Year Salary Report" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "Paid Salary" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "(" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,company_id:0 +#: field:hr.allounce.deduction.categoty,company_id:0 +#: field:hr.contibution.register,company_id:0 +#: field:hr.holidays.status,company_id:0 +#: field:hr.payroll.advice,company_id:0 +#: field:hr.payroll.register,company_id:0 +#: field:hr.payroll.structure,company_id:0 +#: field:hr.payslip,company_id:0 +msgid "Company" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "The Manager" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +msgid "Letter Details" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +#: report:payslip.pdf:0 +msgid "," +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +#: view:hr.payroll.register:0 +#: view:hr.payslip:0 +msgid "Set to Draft" +msgstr "" + +#. module: hr_payroll +#: code:addons/hr_payroll/hr_payroll.py:180 +#: code:addons/hr_payroll/hr_payroll.py:195 +#: code:addons/hr_payroll/hr_payroll.py:285 +#: code:addons/hr_payroll/hr_payroll.py:835 +#: code:addons/hr_payroll/hr_payroll.py:1111 +#: code:addons/hr_payroll/hr_payroll.py:1126 +#: code:addons/hr_payroll/hr_payroll.py:1410 +#, python-format +msgid "Variable Error: %s " +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Expire" +msgstr "" + +#. module: hr_payroll +#: selection:hr.holidays.status,type:0 +msgid "Half-Pay Holiday" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +#: field:hr.payslip,other_pay:0 +msgid "Others" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip.line,slip_id:0 +#: model:ir.model,name:hr_payroll.model_hr_payslip +#: report:payslip.pdf:0 +msgid "Pay Slip" +msgstr "" + +#. module: hr_payroll +#: report:salary.structure:0 +msgid "Contract Detail:" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,igross:0 +#: field:hr.payslip,inet:0 +msgid "Calculaton Field" +msgstr "" + +#. module: hr_payroll +#: help:hr.payroll.advice,bank_id:0 +#: help:hr.payroll.register,bank_id:0 +msgid "Select the Bank Address from whcih the salary is going to be paid" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +#: field:hr.payroll.advice.line,advice_id:0 +msgid "Bank Advice" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.advice,state:0 +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "Reject" +msgstr "" + +#. module: hr_payroll +#: selection:hr.allounce.deduction.categoty,type:0 +#: selection:hr.payslip.line,type:0 +msgid "Leaves" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register.line,register_id:0 +#: view:hr.payslip:0 +#: field:hr.payslip,register_id:0 +#: report:payslip.pdf:0 +msgid "Register" +msgstr "" + +#. module: hr_payroll +#: constraint:hr.employee:0 +msgid "" +"Error ! You cannot select a department for which the employee is the manager." +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Total Deductions" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution.line,value:0 +#: field:hr.payslip.line.line,value:0 +msgid "Value" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "Name of the Employee" +msgstr "" + +#. module: hr_payroll +#: view:hr.contibution.register:0 +msgid "Register Lines" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Salary Computation" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice.line,amount:0 +#: report:payroll.advice:0 +#: report:salary.structure:0 +msgid "Amount" +msgstr "" + +#. module: hr_payroll +#: code:addons/hr_payroll/hr_payroll.py:1225 +#, python-format +msgid "Please check configuration of %s, payroll head is missing" +msgstr "" + +#. module: hr_payroll +#: selection:company.contribution,amount_type:0 +msgid "Percentage" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +msgid "Other Information" +msgstr "" + +#. module: hr_payroll +#: field:hr.passport,country_id:0 +msgid "Country of Issue" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register.line,emp_deduction:0 +msgid "Employee Deduction" +msgstr "" + +#. module: hr_payroll +#: selection:hr.allounce.deduction.categoty,type:0 +#: selection:hr.payslip.line,type:0 +msgid "Other Deduction" +msgstr "" + +#. module: hr_payroll +#: selection:hr.holidays.status,type:0 +msgid "Paid Holiday" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +#: view:hr.passport:0 +#: view:hr.payslip:0 +msgid "Group By..." +msgstr "" + +#. module: hr_payroll +#: field:hr.passport,date_expire:0 +msgid "Passport Expire Date" +msgstr "" + +#. module: hr_payroll +#: selection:hr.holidays.status,type:0 +msgid "Un-Paid Holiday" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Valid From" +msgstr "" + +#. module: hr_payroll +#: help:hr.payslip,igross:0 +#: help:hr.payslip,inet:0 +msgid "" +"Calculation field used for internal calculation, do not place this on form" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Amount (in words) :" +msgstr "" + +#. module: hr_payroll +#: field:hr.holidays.status,type:0 +msgid "Payment" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.structure:0 +#: view:hr.payslip:0 +#: field:hr.payslip,line_ids:0 +#: view:hr.payslip.line:0 +#: model:ir.model,name:hr_payroll.model_hr_payslip_line +msgid "Payslip Line" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Identification No" +msgstr "" + +#. module: hr_payroll +#: view:hr.allounce.deduction.categoty:0 +#: field:hr.allounce.deduction.categoty,base:0 +msgid "Based on" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "Wating for Verification" +msgstr "" + +#. module: hr_payroll +#: model:ir.module.module,shortdesc:hr_payroll.module_meta_information +msgid "Human Resource Payroll" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "Total:" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Posted" +msgstr "" + +#. module: hr_payroll +#: model:ir.module.module,description:hr_payroll.module_meta_information +msgid "" +"Generic Payroll system\n" +" * Employee Details\n" +" * Employee Contracts\n" +" * Passport based Contract\n" +" * Allowances / Deductions\n" +" * Allow to configure Basic / Grows / Net Salary\n" +" * Employee Payslip\n" +" * Monthly Payroll Register\n" +" * Integrated with Holiday Management\n" +" " +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_holidays_status +msgid "Leave Type" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "Date :" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip.line,total:0 +msgid "Sub Total" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Payments -" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,visa_no:0 +msgid "Visa No" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution.line,from_val:0 +#: report:employees.salary:0 +#: field:hr.payslip.line.line,from_val:0 +#: report:year.salary:0 +msgid "From" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice.line,bysal:0 +#: report:payroll.advice:0 +msgid "By Salary" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.employees.detail,date_to:0 +#: field:hr.payroll.year.salary,date_to:0 +#: report:salary.structure:0 +msgid "End Date" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.report.xml,name:hr_payroll.salary_payslip +msgid "Employee PaySlip" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,leaves:0 +msgid "Leave Deductions" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +#: report:payroll.advice:0 +msgid "Authorised Signature" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payslip.line,amount_type:0 +msgid "Function Value" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_contibution_register_line +msgid "Contribution Register Line" +msgstr "" + +#. module: hr_payroll +#: report:salary.structure:0 +msgid "Notes:" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice,state:0 +#: field:hr.payroll.register,state:0 +#: field:hr.payslip,state:0 +msgid "State" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +msgid "Paymeny Lines" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Other Lines" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +#: view:hr.payroll.structure:0 +#: view:hr.payslip:0 +#: view:hr.payslip.line:0 +msgid "Function Arguments" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.act_window,name:hr_payroll.action_hr_company_contribution_tree +#: model:ir.ui.menu,name:hr_payroll.menu_hr_company_contribution_tree +msgid "Company Contributions" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register.line,employee_id:0 +#: field:hr.passport,employee_id:0 +#: field:hr.payroll.advice.line,employee_id:0 +#: field:hr.payslip,employee_id:0 +#: field:hr.payslip.line,employee_id:0 +#: model:ir.model,name:hr_payroll.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip.line,base:0 +msgid "Formula" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_payroll_advice_line +msgid "Bank Advice Lines" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +#: field:hr.allounce.deduction.categoty,type:0 +#: field:hr.payslip.line,type:0 +#: report:salary.structure:0 +msgid "Type" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Email" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "#" +msgstr "" + +#. module: hr_payroll +#: code:addons/hr_payroll/hr_payroll.py:469 +#: code:addons/hr_payroll/hr_payroll.py:1225 +#, python-format +msgid "Error !" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +#: view:hr.payslip:0 +msgid "Verify Sheet" +msgstr "" + +#. module: hr_payroll +#: help:hr.contract,working_days_per_week:0 +msgid "No of Working days / week for an employee" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "New Slip" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,basic:0 +msgid "Net Basic" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,gross:0 +#: field:hr.employee,gross:0 +#: field:hr.payroll.register,grows:0 +#: field:hr.payslip,grows:0 +#: report:salary.structure:0 +msgid "Gross Salary" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Total Earnings" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.act_window,name:hr_payroll.action_hr_payroll_employees_detail +#: model:ir.ui.menu,name:hr_payroll.menu_hr_payroll_employees_detail +msgid "Employee Salary Statement" +msgstr "" + +#. module: hr_payroll +#: selection:hr.allounce.deduction.categoty,type:0 +#: selection:hr.payslip.line,type:0 +msgid "Other Payment" +msgstr "" + +#. module: hr_payroll +#: field:hr.employee,advantages_net:0 +#: report:payslip.pdf:0 +#: report:salary.structure:0 +msgid "Deductions" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "C/D" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,permit_no:0 +msgid "Work Permit No" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice,line_ids:0 +msgid "Employee Salary" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice,chaque_nos:0 +msgid "Chaque Nos" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register,monthly_total_by_emp:0 +msgid "Total By Employee" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: selection:company.contribution,amount_type:0 +#: selection:company.contribution.line,amount_type:0 +#: selection:hr.payslip.line,amount_type:0 +#: selection:hr.payslip.line.line,amount_type:0 +msgid "Fixed Amount" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution.line,to_val:0 +#: report:employees.salary:0 +#: field:hr.payslip.line.line,to_val:0 +#: report:year.salary:0 +msgid "To" +msgstr "" + +#. module: hr_payroll +#: code:addons/hr_payroll/hr_payroll.py:180 +#: code:addons/hr_payroll/hr_payroll.py:195 +#: code:addons/hr_payroll/hr_payroll.py:285 +#: code:addons/hr_payroll/hr_payroll.py:835 +#: code:addons/hr_payroll/hr_payroll.py:1111 +#: code:addons/hr_payroll/hr_payroll.py:1126 +#: code:addons/hr_payroll/hr_payroll.py:1410 +#, python-format +msgid "Variable Error !" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_payroll_employees_detail +msgid "hr.payroll.employees.detail" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +#: view:hr.payslip:0 +msgid "Pay Salary" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice.line,name:0 +msgid "Bank Account A/C" +msgstr "" + +#. module: hr_payroll +#: view:hr.contibution.register:0 +msgid "Contribution Lines" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "For the month of" +msgstr "" + +#. module: hr_payroll +#: view:hr.allounce.deduction.categoty:0 +#: selection:hr.allounce.deduction.categoty,type:0 +#: field:hr.payroll.register,deduction:0 +#: report:hr.payroll.register.sheet:0 +#: field:hr.payslip,deduction:0 +#: selection:hr.payslip.line,type:0 +msgid "Deduction" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_payroll_advice +msgid "Bank Advice Note" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +#: view:hr.payslip:0 +msgid "Payslip" +msgstr "" + +#. module: hr_payroll +#: constraint:hr.contract:0 +msgid "Error! contract start-date must be lower then contract end-date." +msgstr "" + +#. module: hr_payroll +#: selection:hr.allounce.deduction.categoty,type:0 +#: selection:hr.payslip.line,type:0 +msgid "Loan Installment" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +msgid "Complete HR Checking" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "Yours Sincerely" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "SI. No." +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Net Amount" +msgstr "" + +#. module: hr_payroll +#: report:salary.structure:0 +msgid "Salary Structure:" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.report.xml,name:hr_payroll.year_employees_detail +msgid "Employees Salary Detail" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_payslip_line_line +msgid "Function Line" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +#: selection:hr.payroll.advice,state:0 +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "Confirm Sheet" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "Others:" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: selection:company.contribution,amount_type:0 +msgid "Function Calculation" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,worked_days:0 +#: report:payslip.pdf:0 +msgid "Worked Day" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register,monthly_total_by_comp:0 +msgid "Total By Company" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice.line,flag:0 +msgid "D/C" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Country & Address" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "Employee Code" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Basic Salary – Leaves" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,amount_type:0 +#: field:company.contribution.line,amount_type:0 +#: field:hr.payslip.line,amount_type:0 +#: field:hr.payslip.line.line,amount_type:0 +#: report:salary.structure:0 +msgid "Amount Type" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: field:hr.payslip.line,category_id:0 +msgid "Category" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +#: field:hr.payslip.line,company_contrib:0 +#: model:ir.model,name:hr_payroll.model_company_contribution +msgid "Company Contribution" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,category_id:0 +msgid "Heads" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.report.xml,name:hr_payroll.year_payroll_register +msgid "Print Statement" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Draft" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Earnings" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +#: report:salary.structure:0 +msgid "Basic" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.act_window,name:hr_payroll.action_hr_passport_tree +msgid "All Passports" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.act_window,name:hr_payroll.action_hr_payroll_year_salary +#: model:ir.ui.menu,name:hr_payroll.menu_wizard_print_year_salary +msgid "Salary Register" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: report:hr.payroll.register.sheet:0 +msgid "Employee Name" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_passport +msgid "Passport Detail" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payslip.line,amount_type:0 +msgid "Percentage (%)" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice,register_id:0 +#: view:hr.payroll.register:0 +#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payroll_register_form +#: model:ir.model,name:hr_payroll.model_hr_payroll_register +#: model:ir.ui.menu,name:hr_payroll.hr_menu_payroll_register +msgid "Payroll Register" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +#: report:payroll.advice:0 +msgid "For" +msgstr "" + +#. module: hr_payroll +#: field:hr.passport,contracts_ids:0 +msgid "Contracts" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.structure:0 +msgid "Employee Function" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Paid" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Approve Sheet" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,paid:0 +msgid "Paid ? " +msgstr "" + +#. module: hr_payroll +#: view:hr.holidays.status:0 +msgid "Validation" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +msgid "Title" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +msgid "Search Company Contribution" +msgstr "" + +#. module: hr_payroll +#: field:hr.allounce.deduction.categoty,user_id:0 +msgid "User" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +msgid "Payment Lines" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Compute Sheet" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,active:0 +#: field:hr.payroll.register,active:0 +msgid "Active" +msgstr "" + +#. module: hr_payroll +#: help:hr.allounce.deduction.categoty,condition:0 +msgid "Applied this head for calculation if condition is true" +msgstr "" + +#. module: hr_payroll +#: report:year.salary:0 +msgid "Yearly Salary Details" +msgstr "" + +#. module: hr_payroll +#: constraint:hr.employee:0 +msgid "Error ! You cannot create recursive Hierarchy of Employees." +msgstr "" + +#. module: hr_payroll +#: field:hr.allounce.deduction.categoty,condition:0 +msgid "Condition" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "Wating for HR Verification" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "Payment Advice:" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +msgid "Compute" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: field:hr.payslip,deg_id:0 +#: report:payslip.pdf:0 +#: report:salary.structure:0 +msgid "Designation" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "HR Manager" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,basic:0 +#: field:hr.employee,basic:0 +#: field:hr.payslip,basic_before_leaves:0 +#: report:payslip.pdf:0 +msgid "Basic Salary" +msgstr "" + +#. module: hr_payroll +#: field:hr.allounce.deduction.categoty,code:0 +msgid "Category Code" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +msgid "Salary Information" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty +#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty_line +msgid "Allowance Deduction Categoty" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Companies" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Authorized Signature" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,contract_id:0 +#: model:ir.model,name:hr_payroll.model_hr_contract +msgid "Contract" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.advice,state:0 +msgid "Draft Sheet" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.year.salary,salary_on:0 +msgid "Next Month Date" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register.line,date:0 +#: field:hr.payroll.advice,date:0 +#: field:hr.payroll.register,date:0 +#: field:hr.payslip,date:0 +msgid "Date" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,visa_expire:0 +msgid "Visa Expire Date" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Search Passport" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: report:salary.structure:0 +msgid "Phone No." +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,contribute_per:0 +#: field:company.contribution.line,contribution_id:0 +#: view:hr.allounce.deduction.categoty:0 +#: view:hr.contibution.register:0 +#: view:hr.contibution.register.line:0 +msgid "Contribution" +msgstr "" + +#. module: hr_payroll +#: field:hr.allounce.deduction.categoty,state:0 +msgid "Label" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.structure:0 +#: view:hr.payslip:0 +#: view:hr.payslip.line:0 +msgid "Company contribution" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: report:salary.structure:0 +msgid "Other No." +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,code:0 +#: field:hr.contibution.register.line,code:0 +#: field:hr.holidays.status,code:0 +#: field:hr.payroll.structure,code:0 +#: field:hr.payslip.line,code:0 +#: report:payslip.pdf:0 +#: report:salary.structure:0 +msgid "Code" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_bank_advice_tree +#: model:ir.ui.menu,name:hr_payroll.hr_menu_payment_advice +msgid "Payment Advice" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "Number :" +msgstr "" + +#. module: hr_payroll +#: help:hr.allounce.deduction.categoty,base:0 +msgid "" +"This will use to computer the % fields values, in general its on basic, but " +"You can use all heads code field in small letter as a variable name i.e. " +"hra, ma, lta, etc...., also you can use, static varible basic" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Computation Overview" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.year.salary,salary_on:0 +msgid "Salary On" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.advice,number:0 +#: field:hr.payroll.register,number:0 +#: field:hr.payslip,number:0 +msgid "Number" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,struct_id:0 +#: field:hr.employee,line_ids:0 +#: view:hr.payroll.structure:0 +#: field:hr.payroll.structure,line_ids:0 +#: view:hr.payslip:0 +#: view:hr.payslip.line:0 +#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_employee_grade_form +#: model:ir.actions.report.xml,name:hr_payroll.salary_structure_register +#: model:ir.model,name:hr_payroll.model_hr_payroll_structure +#: model:ir.ui.menu,name:hr_payroll.menu_hr_employee_function +msgid "Salary Structure" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register,register_line_ids:0 +msgid "Register Line" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +#: view:hr.payslip:0 +msgid "Cancel" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.employees.detail:0 +#: view:hr.payroll.year.salary:0 +msgid "Close" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip.line,amount:0 +msgid "Amount / Percentage" +msgstr "" + +#. module: hr_payroll +#: field:hr.employee,advantages_gross:0 +#: report:hr.payroll.register.sheet:0 +#: report:salary.structure:0 +msgid "Allowances" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.year.salary,salary_on:0 +msgid "Current Month Date" +msgstr "" + +#. module: hr_payroll +#: report:salary.structure:0 +msgid "Salary" +msgstr "" + +#. module: hr_payroll +#: field:hr.contract,passport_id:0 +#: field:hr.passport,name:0 +msgid "Passport No" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Passport" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "Total Salary" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "for period" +msgstr "" + +#. module: hr_payroll +#: field:hr.holidays.status,head_id:0 +msgid "Payroll Head" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,register_id:0 +#: model:ir.actions.act_window,name:hr_payroll.action_contibution_register_form +#: model:ir.model,name:hr_payroll.model_hr_contibution_register +#: model:ir.ui.menu,name:hr_payroll.menu_action_hr_contibution_register_form +msgid "Contribution Register" +msgstr "" + +#. module: hr_payroll +#: report:salary.structure:0 +msgid "E-mail" +msgstr "" + +#. module: hr_payroll +#: view:hr.allounce.deduction.categoty:0 +#: model:ir.actions.act_window,name:hr_payroll.hr_allounce_deduction_tree +#: model:ir.ui.menu,name:hr_payroll.menu_hr_allounce_deduction_tree +msgid "Salary Heads" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.employees.detail:0 +#: view:hr.payroll.year.salary:0 +msgid "Print Report" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,line_ids:0 +#: view:hr.payroll.structure:0 +#: view:hr.payslip:0 +#: view:hr.payslip.line:0 +#: field:hr.payslip.line,line_ids:0 +msgid "Calculations" +msgstr "" + +#. module: hr_payroll +#: help:company.contribution,contribute_per:0 +msgid "" +"Define Company contribution ratio 1.00=100% contribution, If Employee " +"Contribute 5% then company will and here 0.50 defined then company will " +"contribute 50% on employee 5% contribution" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Other Informations" +msgstr "" + +#. module: hr_payroll +#: view:hr.contibution.register:0 +msgid "Month" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Issue" +msgstr "" + +#. module: hr_payroll +#: view:hr.allounce.deduction.categoty:0 +msgid "Dynamic Computation" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Basic Salary without Leave:" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +#: view:hr.payroll.structure:0 +#: view:hr.payslip:0 +#: view:hr.payslip.line:0 +#: field:hr.payslip.line,function_id:0 +msgid "Function" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "States" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "Dear Sir/Madam," +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty +msgid "Allowance Deduction Heads" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "Gross Sal." +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: field:company.contribution,note:0 +#: view:hr.allounce.deduction.categoty:0 +#: field:hr.allounce.deduction.categoty,note:0 +#: view:hr.contibution.register:0 +#: field:hr.contibution.register,note:0 +#: view:hr.passport:0 +#: field:hr.passport,note:0 +#: field:hr.payroll.advice,note:0 +#: field:hr.payroll.register,note:0 +#: view:hr.payroll.structure:0 +#: field:hr.payroll.structure,note:0 +#: view:hr.payslip:0 +#: field:hr.payslip,note:0 +#: view:hr.payslip.line:0 +#: field:hr.payslip.line,note:0 +msgid "Description" +msgstr "" + +#. module: hr_payroll +#: field:hr.payroll.employees.detail,date_from:0 +#: field:hr.payroll.year.salary,date_from:0 +#: report:salary.structure:0 +msgid "Start Date" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Deduction -" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid ")" +msgstr "" + +#. module: hr_payroll +#: view:hr.contibution.register:0 +msgid "Contribution Registers" +msgstr "" + +#. module: hr_payroll +#: model:ir.ui.menu,name:hr_payroll.menu_hr_payroll_reporting +#: model:ir.ui.menu,name:hr_payroll.menu_hr_root_payroll +#: model:ir.ui.menu,name:hr_payroll.payroll_configure +msgid "Payroll" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_contract_wage_type +msgid "Wage Type" +msgstr "" + +#. module: hr_payroll +#: report:hr.payroll.register.sheet:0 +msgid "Net Sal." +msgstr "" + +#. module: hr_payroll +#: sql_constraint:hr.passport:0 +msgid "The Passport No must be unique !" +msgstr "" + +#. module: hr_payroll +#: field:hr.allounce.deduction.categoty,name:0 +msgid "Category Name" +msgstr "" + +#. module: hr_payroll +#: model:ir.model,name:hr_payroll.model_hr_payroll_year_salary +msgid "hr.payroll.year.salary" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: field:hr.passport,address_id:0 +#: report:payslip.pdf:0 +#: report:salary.structure:0 +msgid "Address" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip.line.line,slipline_id:0 +msgid "Slip Line" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Number of Leaves" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: field:hr.payroll.advice,bank_id:0 +#: field:hr.payroll.register,bank_id:0 +#: report:salary.structure:0 +msgid "Bank" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +msgid "Cancel Sheet" +msgstr "" + +#. module: hr_payroll +#: selection:hr.allounce.deduction.categoty,type:0 +#: selection:hr.payslip.line,type:0 +msgid "Advance" +msgstr "" + +#. module: hr_payroll +#: report:salary.structure:0 +msgid "Special Allowances and Deductions For Employee:" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution,name:0 +#: field:company.contribution.line,name:0 +#: field:hr.contibution.register,name:0 +#: field:hr.contibution.register.line,name:0 +#: field:hr.payroll.advice,name:0 +#: field:hr.payroll.register,name:0 +#: field:hr.payroll.structure,name:0 +#: field:hr.payslip,name:0 +#: field:hr.payslip.line,name:0 +#: field:hr.payslip.line.line,name:0 +#: report:payslip.pdf:0 +#: report:salary.structure:0 +#: report:year.salary:0 +msgid "Name" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Leaved Deduction" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +msgid "Country" +msgstr "" + +#. module: hr_payroll +#: view:hr.passport:0 +#: view:hr.payroll.employees.detail:0 +#: field:hr.payroll.employees.detail,employee_ids:0 +#: view:hr.payroll.year.salary:0 +#: field:hr.payroll.year.salary,employee_ids:0 +#: view:hr.payslip:0 +msgid "Employees" +msgstr "" + +#. module: hr_payroll +#: report:payroll.advice:0 +msgid "Bank Account" +msgstr "" + +#. module: hr_payroll +#: help:company.contribution,register_id:0 +msgid "Contribution register based on company" +msgstr "" + +#. module: hr_payroll +#: help:hr.allounce.deduction.categoty,sequence:0 +msgid "Use to arrange calculation sequence" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,total_pay:0 +msgid "Total Payment" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Leave Deductions Line:" +msgstr "" + +#. module: hr_payroll +#: selection:hr.payroll.register,state:0 +#: selection:hr.payslip,state:0 +msgid "Wating for Account Verification" +msgstr "" + +#. module: hr_payroll +#: field:hr.contibution.register.line,comp_deduction:0 +msgid "Company Deduction" +msgstr "" + +#. module: hr_payroll +#: view:hr.holidays.status:0 +msgid "Payroll Configurtion" +msgstr "" + +#. module: hr_payroll +#: code:addons/hr_payroll/hr_payroll.py:469 +#, python-format +msgid "Please define bank account for the %s employee" +msgstr "" + +#. module: hr_payroll +#: field:hr.passport,date_issue:0 +msgid "Passport Issue Date" +msgstr "" + +#. module: hr_payroll +#: view:hr.allounce.deduction.categoty:0 +#: selection:hr.allounce.deduction.categoty,type:0 +#: field:hr.payroll.register,allounce:0 +#: field:hr.payslip,allounce:0 +#: selection:hr.payslip.line,type:0 +msgid "Allowance" +msgstr "" + +#. module: hr_payroll +#: field:hr.payslip,holiday_days:0 +msgid "No of Leaves" +msgstr "" + +#. module: hr_payroll +#: field:hr.employee,otherid:0 +msgid "Other Id" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Bank Details" +msgstr "" + +#. module: hr_payroll +#: report:payslip.pdf:0 +msgid "Slip ID" +msgstr "" + +#. module: hr_payroll +#: field:company.contribution.line,sequence:0 +#: field:hr.allounce.deduction.categoty,sequence:0 +#: field:hr.payslip.line,sequence:0 +#: field:hr.payslip.line.line,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payslip_form +#: model:ir.ui.menu,name:hr_payroll.menu_department_tree +msgid "Employee Payslip" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.advice:0 +msgid "Letter Content" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.employees.detail:0 +#: view:hr.payroll.year.salary:0 +msgid "Year Salary" +msgstr "" + +#. module: hr_payroll +#: view:hr.payroll.register:0 +msgid "Allowance / Deduction" +msgstr "" + +#. module: hr_payroll +#: model:ir.actions.report.xml,name:hr_payroll.payroll_advice +msgid "Bank Payment Advice" +msgstr "" + +#. module: hr_payroll +#: view:hr.payslip:0 +msgid "Search Payslips" +msgstr "" + +#. module: hr_payroll +#: report:employees.salary:0 +#: field:hr.contibution.register.line,total:0 +#: report:year.salary:0 +msgid "Total" +msgstr "" + +#. module: hr_payroll +#: view:company.contribution:0 +#: view:hr.allounce.deduction.categoty:0 +#: field:hr.allounce.deduction.categoty,contribute_ids:0 +msgid "Contributions" +msgstr "" diff --git a/addons/hr_payroll_account/i18n/ca.po b/addons/hr_payroll_account/i18n/ca.po index 178543a4bde..938d53ae1a3 100644 --- a/addons/hr_payroll_account/i18n/ca.po +++ b/addons/hr_payroll_account/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: hr_payroll_account diff --git a/addons/hr_payroll_account/i18n/tr.po b/addons/hr_payroll_account/i18n/tr.po new file mode 100644 index 00000000000..8adbaa643fe --- /dev/null +++ b/addons/hr_payroll_account/i18n/tr.po @@ -0,0 +1,331 @@ +# Turkish translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-08-23 11:18+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" + +#. module: hr_payroll_account +#: field:hr.payslip,move_line_ids:0 +msgid "Accounting Lines" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payroll.register,bank_journal_id:0 +#: field:hr.payslip,bank_journal_id:0 +msgid "Bank Journal" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_contibution_register_line +msgid "Contribution Register Line" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_contibution_register +msgid "Contribution Register" +msgstr "" + +#. module: hr_payroll_account +#: help:hr.employee,analytic_account:0 +msgid "Analytic Account for Salary Analysis" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payroll.register,journal_id:0 +#: field:hr.payslip,journal_id:0 +msgid "Expense Journal" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.contibution.register.line,period_id:0 +msgid "Period" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +msgid "Other Informations" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.employee,salary_account:0 +msgid "Salary Account" +msgstr "" + +#. module: hr_payroll_account +#: help:hr.employee,property_bank_account:0 +msgid "Select Bank Account from where Salary Expense will be Paid" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_payroll_register +msgid "Payroll Register" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_payslip_account_move +msgid "Account Move Link to Pay Slip" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +msgid "Description" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:331 +#, python-format +msgid "Please Confirm all Expense Invoice appear for Reimbursement" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:432 +#, python-format +msgid "Please defined partner in bank account for %s !" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +msgid "Accounting Informations" +msgstr "" + +#. module: hr_payroll_account +#: help:hr.employee,salary_account:0 +msgid "Expense account when Salary Expense will be recorded" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:429 +#, python-format +msgid "Please defined bank account for %s !" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.module.module,description:hr_payroll_account.module_meta_information +msgid "" +"Generic Payroll system Integrated with Accountings\n" +" * Expanse Encoding\n" +" * Payment Encoding\n" +" * Comany Contribution Managemet\n" +" " +msgstr "" + +#. module: hr_payroll_account +#: model:ir.module.module,shortdesc:hr_payroll_account.module_meta_information +msgid "Human Resource Payroll Accounting" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +#: field:hr.payslip,move_payment_ids:0 +msgid "Payment Lines" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:270 +#: code:addons/hr_payroll_account/hr_payroll_account.py:445 +#, python-format +msgid "Please define fiscal year for perticular contract" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payslip.account.move,slip_id:0 +#: model:ir.model,name:hr_payroll_account.model_hr_payslip +msgid "Pay Slip" +msgstr "" + +#. module: hr_payroll_account +#: constraint:hr.employee:0 +msgid "Error ! You cannot create recursive Hierarchy of Employees." +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +msgid "Account Lines" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.contibution.register,account_id:0 +#: field:hr.holidays.status,account_id:0 +#: field:hr.payroll.advice,account_id:0 +msgid "Account" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.employee,property_bank_account:0 +msgid "Bank Account" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payslip.account.move,name:0 +msgid "Name" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_payslip_line +msgid "Payslip Line" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +msgid "Accounting Vouchers" +msgstr "" + +#. module: hr_payroll_account +#: constraint:hr.employee:0 +msgid "" +"Error ! You cannot select a department for which the employee is the manager." +msgstr "" + +#. module: hr_payroll_account +#: help:hr.payroll.register,period_id:0 +#: help:hr.payslip,period_id:0 +msgid "Keep empty to use the period of the validation(Payslip) date." +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_payroll_advice +msgid "Bank Advice Note" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payslip.account.move,move_id:0 +msgid "Expense Entries" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payslip,move_ids:0 +msgid "Accounting vouchers" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:270 +#: code:addons/hr_payroll_account/hr_payroll_account.py:277 +#: code:addons/hr_payroll_account/hr_payroll_account.py:280 +#: code:addons/hr_payroll_account/hr_payroll_account.py:297 +#: code:addons/hr_payroll_account/hr_payroll_account.py:331 +#: code:addons/hr_payroll_account/hr_payroll_account.py:445 +#: code:addons/hr_payroll_account/hr_payroll_account.py:452 +#: code:addons/hr_payroll_account/hr_payroll_account.py:455 +#: code:addons/hr_payroll_account/hr_payroll_account.py:469 +#: code:addons/hr_payroll_account/hr_payroll_account.py:492 +#, python-format +msgid "Warning !" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.employee,employee_account:0 +msgid "Employee Account" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payslip.line,account_id:0 +msgid "General Account" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.contibution.register,yearly_total_by_emp:0 +msgid "Total By Employee" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payslip.account.move,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.payroll.register,period_id:0 +#: field:hr.payslip,period_id:0 +msgid "Force Period" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_holidays_status +msgid "Leave Type" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:277 +#: code:addons/hr_payroll_account/hr_payroll_account.py:452 +#, python-format +msgid "Fiscal Year is not defined for slip date %s" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.contibution.register,analytic_account_id:0 +#: field:hr.employee,analytic_account:0 +#: field:hr.holidays.status,analytic_account_id:0 +#: field:hr.payroll.structure,account_id:0 +#: field:hr.payslip.line,analytic_account_id:0 +msgid "Analytic Account" +msgstr "" + +#. module: hr_payroll_account +#: help:hr.employee,employee_account:0 +msgid "Employee Payable Account" +msgstr "" + +#. module: hr_payroll_account +#: field:hr.contibution.register,yearly_total_by_comp:0 +msgid "Total By Company" +msgstr "" + +#. module: hr_payroll_account +#: model:ir.model,name:hr_payroll_account.model_hr_payroll_structure +msgid "Salary Structure" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:557 +#, python-format +msgid "Please Configure Partners Receivable Account!!" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.contibution.register:0 +msgid "Year" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:280 +#: code:addons/hr_payroll_account/hr_payroll_account.py:455 +#, python-format +msgid "Period is not defined for slip date %s" +msgstr "" + +#. module: hr_payroll_account +#: view:hr.payslip:0 +msgid "Accounting Details" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:540 +#, python-format +msgid "Please Configure Partners Payable Account!!" +msgstr "" + +#. module: hr_payroll_account +#: code:addons/hr_payroll_account/hr_payroll_account.py:429 +#: code:addons/hr_payroll_account/hr_payroll_account.py:432 +#: code:addons/hr_payroll_account/hr_payroll_account.py:533 +#: code:addons/hr_payroll_account/hr_payroll_account.py:550 +#, python-format +msgid "Integrity Error !" +msgstr "" diff --git a/addons/hr_recruitment/i18n/tr.po b/addons/hr_recruitment/i18n/tr.po new file mode 100644 index 00000000000..6a7e92dac48 --- /dev/null +++ b/addons/hr_recruitment/i18n/tr.po @@ -0,0 +1,957 @@ +# Turkish translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-08-23 11:19+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n" +"X-Generator: Launchpad (build 13697)\n" + +#. module: hr_recruitment +#: help:hr.applicant,active:0 +msgid "" +"If the active field is set to false, it will allow you to hide the case " +"without removing it." +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.stage:0 +#: field:hr.recruitment.stage,requirements:0 +msgid "Requirements" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,delay_open:0 +msgid "Avg. Delay to Open" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,nbr:0 +msgid "# of Cases" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Group By..." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,department_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,department_id:0 +#: field:hr.recruitment.stage,department_id:0 +msgid "Department" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date_action:0 +msgid "Next Action Date" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Jobs" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,company_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,company_id:0 +msgid "Company" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,email_cc:0 +msgid "Watchers Emails" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.partner.create,close:0 +msgid "Close job request" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,day_open:0 +msgid "Days to Open" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.job2phonecall,note:0 +msgid "Goals" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,partner_address_id:0 +msgid "Partner Contact Name" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: view:hr.recruitment.partner.create:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_partner_create +msgid "Create Partner" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,day:0 +msgid "Day" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Contract Data" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Add Internal Note" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_mobile:0 +msgid "Mobile" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Notes" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,message_ids:0 +msgid "Messages" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Next Actions" +msgstr "" + +#. module: hr_recruitment +#: model:crm.case.categ,name:hr_recruitment.categ_job2 +msgid "Junior Developer" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,job_id:0 +#: field:hr.recruitment.report,job_id:0 +msgid "Applied Job" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_graduate +msgid "Graduate" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job1 +msgid "Initial Jobs Demand" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_address_id:0 +msgid "Partner Contact" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,reference:0 +msgid "Reference" +msgstr "" + +#. module: hr_recruitment +#: view:board.board:0 +#: view:hr.applicant:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_applicants_status +msgid "Applicants Status" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "My Recruitment" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,title_action:0 +msgid "Next Action" +msgstr "" + +#. module: hr_recruitment +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_recruitment +msgid "Recruitment" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_prop:0 +msgid "Salary Proposed" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,partner_id:0 +msgid "Partner" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Avg Proposed Salary" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.recruitment.report,available:0 +msgid "Availability" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Previous" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_phonecall.py:107 +#: view:hr.applicant:0 +#, python-format +msgid "Phone Call" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.partner.create:0 +msgid "Convert To Partner" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_report +msgid "Recruitments Statistics" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Next" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_job +msgid "Job Description" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Send New Email" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:39 +#, python-format +msgid "A partner is already defined on this job request." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: selection:hr.recruitment.report,state:0 +msgid "New" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,email_from:0 +msgid "Email" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,availability:0 +msgid "Availability (Days)" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Available" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Good" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:38 +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:57 +#, python-format +msgid "Error !" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,help:hr_recruitment.hr_job_stage_act +msgid "" +"Define here your stages of the recruitment process, for example: " +"qualification call, first interview, second interview, refused, hired." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,create_date:0 +#: view:hr.recruitment.report:0 +msgid "Creation Date" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.job2phonecall,deadline:0 +msgid "Planned Date" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,priority:0 +#: field:hr.recruitment.report,priority:0 +msgid "Appreciation" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Job" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,stage_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,stage_id:0 +#: view:hr.recruitment.stage:0 +msgid "Stage" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job3 +msgid "Second Interview" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_exp:0 +msgid "Salary Expected" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,salary_expected:0 +#: view:hr.recruitment.report:0 +msgid "Expected Salary" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "July" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Subject" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: model:ir.actions.act_window,name:hr_recruitment.crm_case_categ0_act_job +#: model:ir.ui.menu,name:hr_recruitment.menu_crm_case_categ0_act_job +msgid "Applicants" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "History Information" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Dates" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid " Month-1 " +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_bac5 +msgid " > Bac +5" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_applicant +msgid "Applicant" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.stage,sequence:0 +msgid "Gives the sequence order when displaying a list of stages." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Contact" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Qualification" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "March" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_stage +msgid "Stage of Recruitment" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.stage:0 +#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_stage_act +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_stage +msgid "Stages" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "In progress" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Jobs - Recruitment Form" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,probability:0 +msgid "Probability" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "September" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "December" +msgstr "" + +#. module: hr_recruitment +#: model:ir.module.module,shortdesc:hr_recruitment.module_meta_information +msgid "HR - Recruitement" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Job Info" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job2 +msgid "First Interview" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,write_date:0 +msgid "Update Date" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,salary_proposed:0 +#: view:hr.recruitment.report:0 +msgid "Proposed Salary" +msgstr "" + +#. module: hr_recruitment +#: model:crm.case.categ,name:hr_recruitment.categ_job1 +msgid "Salesman" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Search Jobs" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.job2phonecall,category_id:0 +msgid "Category" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_name:0 +msgid "Applicant's Name" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Very Good" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "# Cases" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date_open:0 +msgid "Opened" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Group By ..." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +msgid "In Progress" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Reset to New" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,salary_expected:0 +msgid "Salary Expected by Applicant" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,email_cc:0 +msgid "" +"These email addresses will be added to the CC field of all inbound and " +"outbound emails for this record before being sent. Separate multiple email " +"addresses with a comma" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date_closed:0 +#: field:hr.recruitment.report,date_closed:0 +msgid "Closed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.stage:0 +msgid "Stage Definition" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Answer" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,delay_close:0 +msgid "Avg. Delay to Close" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,salary_proposed:0 +msgid "Salary Proposed by the Organisation" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Meeting" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: selection:hr.recruitment.report,state:0 +msgid "Pending" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Status" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Communication & History" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "August" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,type_id:0 +#: view:hr.recruitment.degree:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,type_id:0 +#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_degree_action +msgid "Degree" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_phone:0 +msgid "Phone" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Global CC" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "October" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "June" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.hr_job_stage_act +msgid "Applicant Stages" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job7 +msgid "Refused by Company" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,day_close:0 +msgid "Days to Close" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,user_id:0 +msgid "User" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Excellent" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,active:0 +msgid "Active" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "November" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Extended Filters..." +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,response:0 +msgid "Response" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_licenced +msgid "Licenced" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_prop_avg:0 +msgid "Avg Salary Proposed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.job2phonecall:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_phonecall +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_job2phonecall +msgid "Schedule Phone Call" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "January" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,email_from:0 +msgid "These people will receive email." +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Not Good" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date:0 +#: field:hr.recruitment.report,date:0 +msgid "Date" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.job2phonecall:0 +msgid "Phone Call Description" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.partner.create:0 +msgid "Are you sure you want to create a partner based on this job request ?" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,help:hr_recruitment.crm_case_categ0_act_job +msgid "" +"From this menu you can track applicants in the recruitment process and " +"manage all operations: meetings, interviews, phone calls, etc. If you setup " +"the email gateway, applicants and their attached CV are created " +"automatically when an email is sent to jobs@yourcompany.com. If you install " +"the document management modules, all documents (CV and motivation letters) " +"are indexed automatically, so that you can easily search through their " +"content." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "History" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Attachments" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job4 +msgid "Contract Proposed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,state:0 +msgid "State" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.job2phonecall:0 +#: view:hr.recruitment.partner.create:0 +msgid "Cancel" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.hr_job_categ_action +msgid "Applicant Categories" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,state:0 +msgid "Open" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:57 +#, python-format +msgid "A partner is already existing with the same name." +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.degree,sequence:0 +msgid "Gives the sequence order when displaying a list of degrees." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,user_id:0 +#: view:hr.recruitment.report:0 +msgid "Responsible" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_report_all +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_report_all +msgid "Recruitment Analysis" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Current" +msgstr "" + +#. module: hr_recruitment +#: model:ir.module.module,description:hr_recruitment.module_meta_information +msgid "" +"\n" +"Manages job positions and the recruitement process. It's integrated with " +"the\n" +"survey module to allow you to define interview for different jobs.\n" +"\n" +"This module is integrated with the mail gateway to automatically tracks " +"email\n" +"sent to jobs@YOURCOMPANY.com. It's also integrated with the document " +"management\n" +"system to store and search in your CV base.\n" +" " +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Details" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Cases By Stage and Estimates" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Reply" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Interview" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,month:0 +msgid "Month" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,description:0 +msgid "Description" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "May" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job5 +msgid "Contract Signed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: selection:hr.recruitment.report,state:0 +msgid "Refused" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/hr_recruitment.py:412 +#, python-format +msgid "Applicant '%s' is being hired." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: selection:hr.recruitment.report,state:0 +msgid "Hired" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job6 +msgid "Refused by Employee" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "On Average" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_degree +msgid "Degree of Recruitment" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "February" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,name:0 +#: field:hr.recruitment.degree,name:0 +#: field:hr.recruitment.stage,name:0 +msgid "Name" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_partner_create +msgid "Create Partner from job application" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "April" +msgstr "" + +#. module: hr_recruitment +#: model:crm.case.section,name:hr_recruitment.section_hr_department +msgid "HR Department" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.degree,sequence:0 +#: field:hr.recruitment.stage,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.job2phonecall,user_id:0 +msgid "Assign To" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/hr_recruitment.py:396 +#, python-format +msgid "The job request '%s' has been set 'in progress'." +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,year:0 +msgid "Year" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.report,delay_close:0 +#: help:hr.recruitment.report,delay_open:0 +msgid "Number of Days to close the project issue" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,survey:0 +#: field:hr.job,survey_id:0 +msgid "Survey" +msgstr "" diff --git a/addons/hr_timesheet_invoice/i18n/ca.po b/addons/hr_timesheet_invoice/i18n/ca.po index a33367afd08..53388ea83b4 100644 --- a/addons/hr_timesheet_invoice/i18n/ca.po +++ b/addons/hr_timesheet_invoice/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: hr_timesheet_invoice diff --git a/addons/l10n_in/i18n/ca.po b/addons/l10n_in/i18n/ca.po index dfef5cf2438..0a1feb5729d 100644 --- a/addons/l10n_in/i18n/ca.po +++ b/addons/l10n_in/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: l10n_chart_in diff --git a/addons/l10n_syscohada/i18n/ca.po b/addons/l10n_syscohada/i18n/ca.po index 251c2b9b4ae..b5f77621716 100644 --- a/addons/l10n_syscohada/i18n/ca.po +++ b/addons/l10n_syscohada/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: l10n_syscohada diff --git a/addons/marketing/i18n/ca.po b/addons/marketing/i18n/ca.po index f7afeb06ca4..bceff96e4ee 100644 --- a/addons/marketing/i18n/ca.po +++ b/addons/marketing/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: marketing diff --git a/addons/mrp/i18n/ca.po b/addons/mrp/i18n/ca.po index a841711d6d0..3bba5023b65 100644 --- a/addons/mrp/i18n/ca.po +++ b/addons/mrp/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: mrp diff --git a/addons/point_of_sale/i18n/ca.po b/addons/point_of_sale/i18n/ca.po index 99dfbcdbd7a..78797f79274 100644 --- a/addons/point_of_sale/i18n/ca.po +++ b/addons/point_of_sale/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: point_of_sale diff --git a/addons/portal/i18n/ca.po b/addons/portal/i18n/ca.po index 392ac771b0f..3220ce0d722 100644 --- a/addons/portal/i18n/ca.po +++ b/addons/portal/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: portal diff --git a/addons/project/i18n/ca.po b/addons/project/i18n/ca.po index e3969112968..36053262038 100644 --- a/addons/project/i18n/ca.po +++ b/addons/project/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: project diff --git a/addons/project_issue/i18n/ca.po b/addons/project_issue/i18n/ca.po index a8a9a4069d8..d075394e764 100644 --- a/addons/project_issue/i18n/ca.po +++ b/addons/project_issue/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: project_issue diff --git a/addons/project_long_term/i18n/ca.po b/addons/project_long_term/i18n/ca.po index 6e5b17e27ad..c3845a869d9 100644 --- a/addons/project_long_term/i18n/ca.po +++ b/addons/project_long_term/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: project_long_term diff --git a/addons/project_messages/i18n/ca.po b/addons/project_messages/i18n/ca.po index 3e4f91cf3d5..dc3908b9e1e 100644 --- a/addons/project_messages/i18n/ca.po +++ b/addons/project_messages/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: project_messages diff --git a/addons/project_scrum/i18n/ca.po b/addons/project_scrum/i18n/ca.po index 4ed0a518f05..a4a6b79d00f 100644 --- a/addons/project_scrum/i18n/ca.po +++ b/addons/project_scrum/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: project_scrum diff --git a/addons/project_scrum/i18n/zh_CN.po b/addons/project_scrum/i18n/zh_CN.po index 4480e459b37..f4e74f6bedc 100644 --- a/addons/project_scrum/i18n/zh_CN.po +++ b/addons/project_scrum/i18n/zh_CN.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: project_scrum diff --git a/addons/purchase/i18n/ca.po b/addons/purchase/i18n/ca.po index 373dc8765bc..e37438439db 100644 --- a/addons/purchase/i18n/ca.po +++ b/addons/purchase/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: purchase diff --git a/addons/purchase_requisition/i18n/ca.po b/addons/purchase_requisition/i18n/ca.po index d6770a1c94f..81da87848b4 100644 --- a/addons/purchase_requisition/i18n/ca.po +++ b/addons/purchase_requisition/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: purchase_requisition diff --git a/addons/report_webkit/i18n/ca.po b/addons/report_webkit/i18n/ca.po index 7550a145bb8..c36665785b6 100644 --- a/addons/report_webkit/i18n/ca.po +++ b/addons/report_webkit/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: report_webkit diff --git a/addons/resource/i18n/es_EC.po b/addons/resource/i18n/es_EC.po index b3e99a2ff2e..4c1379293a8 100644 --- a/addons/resource/i18n/es_EC.po +++ b/addons/resource/i18n/es_EC.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: resource diff --git a/addons/sale_crm/i18n/ca.po b/addons/sale_crm/i18n/ca.po index b1ab980b59d..55e6f21d1b9 100644 --- a/addons/sale_crm/i18n/ca.po +++ b/addons/sale_crm/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: sale_crm diff --git a/addons/share/i18n/ca.po b/addons/share/i18n/ca.po index ad46750e101..7a9a19fa5c8 100644 --- a/addons/share/i18n/ca.po +++ b/addons/share/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: share diff --git a/addons/stock/i18n/ca.po b/addons/stock/i18n/ca.po index 758e398bfc7..65837d40b31 100644 --- a/addons/stock/i18n/ca.po +++ b/addons/stock/i18n/ca.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: stock diff --git a/addons/stock_planning/i18n/ca.po b/addons/stock_planning/i18n/ca.po index b446cfb9606..bd877a5ede2 100644 --- a/addons/stock_planning/i18n/ca.po +++ b/addons/stock_planning/i18n/ca.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n" +"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n" "X-Generator: Launchpad (build 13697)\n" #. module: stock_planning From e5c9698d6fd4ba60cc9c34eddd7f7a617a6eb0cd Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Wed, 24 Aug 2011 10:29:36 +0530 Subject: [PATCH 073/156] [Usability] purchase -> config -> pricelist are only for extended view group bzr revid: tta@openerp.com-20110824045936-p9enqj2p66mcndzr --- addons/purchase/purchase_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 8973f7aa574..137c44347d2 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -14,7 +14,7 @@ + parent="menu_purchase_config_purchase" sequence="50" groups="base.group_extended"/> Date: Wed, 24 Aug 2011 15:58:35 +0200 Subject: [PATCH 074/156] [IMP] remove date widget on datetime fields in search view bzr revid: xmo@openerp.com-20110824135835-ooqqw87301n6mxja --- addons/mrp_operations/mrp_operations_view.xml | 2 +- addons/procurement/procurement_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index b39619ead6f..92faddc66b0 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -147,7 +147,7 @@ - + diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index ed353f996f8..329b65ad6c5 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -112,7 +112,7 @@ - + From 58fc194593402c98bc0f5c93765e96ec64f59e61 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Aug 2011 16:03:09 +0200 Subject: [PATCH 075/156] [IMP] pos: remove select=1 attributes in views, not really used anymore bzr revid: xmo@openerp.com-20110824140309-864i0mhydruk7yu2 --- addons/point_of_sale/point_of_sale_view.xml | 46 ++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index b0434718a8c..233bb019443 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -235,11 +235,11 @@ form - - + + - + @@ -282,10 +282,10 @@ form
- - - - + + + + @@ -373,7 +373,7 @@ form - + @@ -388,7 +388,7 @@ tree - + @@ -439,7 +439,7 @@ form - + @@ -454,7 +454,7 @@ tree - + @@ -507,7 +507,7 @@ - + @@ -524,7 +524,7 @@ - + @@ -574,7 +574,7 @@ - + @@ -591,7 +591,7 @@ - + @@ -672,12 +672,12 @@ - + - + @@ -685,8 +685,8 @@ - - + + @@ -781,10 +781,10 @@ tree - - - - + + + + From d45883d44abd462958f46155b88cc00078ccb86c Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 24 Aug 2011 17:11:43 +0200 Subject: [PATCH 076/156] [FIX] hr: HR Officer group should imply HR Employee group Failure to have this dependency means that the drop-down for HR permissions on the user will always only show Employee even if the user also has Officer/Manager access bzr revid: odo@openerp.com-20110824151143-cysnlvetzrvqrfs2 --- addons/hr/security/hr_security.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index 1ec0e42c47e..9a85bf71016 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -4,6 +4,7 @@ Human Resources / HR Officer + Human Resources / HR Manager From c1d843e4602d468fae7e62671ebb8f116dfa6686 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Thu, 25 Aug 2011 00:18:06 +0200 Subject: [PATCH 077/156] [IMP] Purchase : add a docstring for the method create_procurement_purchase_order bzr revid: sebastien.beau@akretion.com.br-20110824221806-ue02asb0afk5mol7 --- addons/purchase/purchase.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 1b3d0eeb839..27824fc3c67 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -762,6 +762,13 @@ class procurement_order(osv.osv): return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value def create_procurement_purchase_order(self, cr, uid, procurement, po_vals, line, context=None): + """ Create the purchase order from the procurement + :params procurement: the procurement object generating the purchase order + :params dict po_vals: the values of the purchase order + :params dict line: the values of the purchase order line + :return: purchase order id + :rtype: int + """ po_vals.update({'order_line': [(0,0,line)]}) return self.pool.get('purchase.order').create(cr, uid, po_vals, context=context) From 6a59e91c7188510fbd6c4f1560f2aa7f7564b352 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 25 Aug 2011 01:06:21 +0200 Subject: [PATCH 078/156] [IMP] account company default overdue_msg bzr revid: al@openerp.com-20110824230621-fcxyklk4l8j2zo76 --- addons/account/company.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/company.py b/addons/account/company.py index 986e7b56d3f..bbbb8aa60c8 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -36,10 +36,10 @@ class res_company(osv.osv): } _defaults = { - 'overdue_msg': '''Please note that the following payments are now due. -If your payment has been sent, kindly forward your payment details. -If payment will be delayed further, please contact us to discuss. -Would your payment have been carried out after this mail was sent, please consider the present one as void. + 'overdue_msg': '''Our records indicate that the following payments are still due. If the amount +has already been paid, please disregard this notice. However, if you have any +queries regarding your account, please contact us. +Thank you in advance. ''' } From 039a6852d0099eec5f09580bb75929c6503e6b50 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 25 Aug 2011 02:29:36 +0200 Subject: [PATCH 079/156] [IMP] crm tooltip on saleteam working time bzr revid: al@openerp.com-20110825002936-8gpd07pmgraex07o --- addons/crm/crm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 95595eb7e63..9575aa9e102 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -689,7 +689,7 @@ class crm_case_section(osv.osv): 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this sales team"), 'parent_id': fields.many2one('crm.case.section', 'Parent Team'), 'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'), - 'resource_calendar_id': fields.many2one('resource.calendar', "Working Time"), + 'resource_calendar_id': fields.many2one('resource.calendar', "Working Time", help="Used to compute open days"), 'note': fields.text('Description'), 'working_hours': fields.float('Working Hours', digits=(16,2 )), 'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'), From dcc7b02198aee6b3dbc176953ec60b17ed863949 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 25 Aug 2011 06:34:43 +0200 Subject: [PATCH 080/156] [FIX] crm fix test/test_crm_stage_changes.yml bzr revid: al@openerp.com-20110825043443-82di3ktrr6h9h0hf --- addons/crm/test/test_crm_stage_changes.yml | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/addons/crm/test/test_crm_stage_changes.yml b/addons/crm/test/test_crm_stage_changes.yml index 7518a2bb869..c9c25bec604 100644 --- a/addons/crm/test/test_crm_stage_changes.yml +++ b/addons/crm/test/test_crm_stage_changes.yml @@ -11,17 +11,17 @@ probability: 0.0 section_ids: - crm.section_sales_department - sequence: 0.0 + sequence: 0 - - I create a lead 'OpenERP Presentation'. + I create a lead 'Test Lead1'. - !record {model: crm.lead, id: crm_lead_openerppresentation0}: categ_id: crm.categ_oppor4 day_close: 0.0 day_open: 0.0 - name: OpenERP Presentation + name: Test Lead1 planned_revenue: 0.0 - probability: 0.0 + probability: 10.0 section_id: crm.section_sales_department - I open the lead. @@ -60,11 +60,10 @@ - I create one more opportunity. - - !record {model: crm.lead, id: crm_lead_partnerdemo0}: - categ_id: crm.categ_oppor3 - day_close: 0.0 - day_open: 0.0 + !record {model: crm.lead, id: crm_lead_test2}: name: Partner Demo + type: opportunity + categ_id: crm.categ_oppor3 planned_revenue: 50000.0 probability: 100.0 section_id: crm.section_sales_department @@ -72,16 +71,16 @@ I open this opportunity. - !python {model: crm.lead}: | - self.case_open(cr, uid, [ref('crm_lead_partnerdemo0')]) + self.case_open(cr, uid, [ref('crm_lead_test2')]) - I mark this opportunity as won. - !python {model: crm.lead}: | - self.case_close(cr, uid, [ref('crm_lead_partnerdemo0')]) + self.case_mark_won(cr, uid, [ref('crm_lead_test2')]) - I check whether the stage is changed to 'Won' and probability is 100.0 or not. - !python {model: crm.lead}: | - opportunity = self.browse(cr, uid, ref('crm_lead_partnerdemo0')) - assert opportunity.stage_id.id == ref('crm.stage_lead1'), 'Stage is not changed!' + opportunity = self.browse(cr, uid, ref('crm_lead_test2')) + assert opportunity.stage_id.id == ref('crm.stage_lead5'), 'Stage is not changed!' assert opportunity.probability == 100.0, 'Probability is wrong!' From c8dcb4e685b6bc73699fc89071f2b78e72d62203 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 25 Aug 2011 06:54:55 +0200 Subject: [PATCH 081/156] [FIX] crm fix crm_claim bzr revid: al@openerp.com-20110825045455-95a8nt7ep6sonk3a --- addons/crm/crm.py | 2 +- addons/crm_claim/crm_claim.py | 79 +++++------------------------ addons/crm_claim/crm_claim_view.xml | 2 +- 3 files changed, 16 insertions(+), 67 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index fd8d2942337..d0abc98e518 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -350,7 +350,7 @@ class crm_case(crm_base): value = {} if hasattr(self,'onchange_stage_id'): value = self.onchange_stage_id(cr, uid, ids, stage_id)['value'] - value['stage_id'] = stage_id + value['stage_id'] = stage_id self.write(cr, uid, ids, value, context=context) def stage_change(self, cr, uid, ids, op, order, context=None): diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index 72170a70b15..401c43b0455 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -82,33 +82,6 @@ class crm_claim(crm.crm_case, osv.osv): \nIf the case needs to be reviewed then the state is set to \'Pending\'.'), 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]), } - - def stage_next(self, cr, uid, ids, context=None): - stage = super(crm_claim, self).stage_next(cr, uid, ids, context=context) - if stage: - stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context) - self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name) - return stage - - def stage_previous(self, cr, uid, ids, context=None): - stage = super(crm_claim, self).stage_previous(cr, uid, ids, context=context) - if stage: - stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context) - self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name) - return stage - - def _get_stage_id(self, cr, uid, context=None): - """Finds type of stage according to object. - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param context: A standard dictionary for contextual values - """ - if context is None: - context = {} - type = context and context.get('stage_type', '') - stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=',type),('sequence','>=',1)]) - return stage_ids and stage_ids[0] or False _defaults = { 'user_id': crm.crm_case._get_default_user, @@ -116,19 +89,14 @@ class crm_claim(crm.crm_case, osv.osv): 'partner_address_id': crm.crm_case._get_default_partner_address, 'email_from':crm.crm_case. _get_default_email, 'state': lambda *a: 'draft', - 'section_id':crm.crm_case. _get_section, + 'section_id': crm.crm_case._get_section, 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c), 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], - #'stage_id': _get_stage_id, } def onchange_partner_id(self, cr, uid, ids, part, email=False): """This function returns value of partner address based on partner - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of case IDs @param part: Partner's id @email: Partner's email ID """ @@ -145,10 +113,6 @@ class crm_claim(crm.crm_case, osv.osv): def onchange_partner_address_id(self, cr, uid, ids, add, email=False): """This function returns value of partner email based on Partner Address - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of case IDs @param add: Id of Partner's address @email: Partner's email ID """ @@ -156,28 +120,23 @@ class crm_claim(crm.crm_case, osv.osv): return {'value': {'email_from': False}} address = self.pool.get('res.partner.address').browse(cr, uid, add) return {'value': {'email_from': address.email, 'partner_phone': address.phone, 'partner_mobile': address.mobile}} - + def case_open(self, cr, uid, ids, *args): - """ - Opens Claim - """ + for l in self.browse(cr, uid, ids): + # When coming from draft override date and stage otherwise just set state + if l.state == 'draft': + message = _("The claim '%s' has been opened.") % l.name + self.log(cr, uid, l.id, message) + value = {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')} + self.write(cr, uid, [l.id], value) + stage_id = self.stage_find(cr, uid, l.section_id.id or False, [('sequence','>',0)]) + if stage_id: + self.stage_set(cr, uid, [l.id], stage_id) res = super(crm_claim, self).case_open(cr, uid, ids, *args) - claims = self.browse(cr, uid, ids) - - for i in xrange(0, len(ids)): - if not claims[i].stage_id : - stage_id = self._find_first_stage(cr, uid, 'claim', claims[i].section_id.id or False) - self.write(cr, uid, [ids[i]], {'stage_id' : stage_id}) - return res def message_new(self, cr, uid, msg, context=None): - """ - Automatically calls when new email message arrives - - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks + """ Automatically calls when new email message arrives """ mailgate_pool = self.pool.get('email.server.tools') @@ -217,9 +176,6 @@ class crm_claim(crm.crm_case, osv.osv): def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None): """ - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): @@ -253,21 +209,14 @@ class crm_claim(crm.crm_case, osv.osv): return res def msg_send(self, cr, uid, id, *args, **argv): - """ Send The Message - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of email’s IDs - @param *args: Return Tuple Value - @param **args: Return Dictionary of Keyword Value + @param ids: List of email’s IDs """ return True crm_claim() class res_partner(osv.osv): - _inherit = 'res.partner' _columns = { 'claims_ids': fields.one2many('crm.claim', 'partner_id', 'Claims'), diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index 6a9e114299f..72dcabf7c9a 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -82,7 +82,7 @@ +

%s.%s %s" % (controller.__class__.__name__, method.__name__, self.jsonrequest) response['id'] = self.jsonrequest.get('id') response["result"] = method(controller, self, **self.params) - except OpenERPUnboundException: + except backend.OpenERPUnboundException: error = { 'code': 100, 'message': "OpenERP Session Invalid", diff --git a/addons/base/common/nonliterals.py b/addons/base/common/nonliterals.py index 5b61f39fc83..937da06ad9e 100644 --- a/addons/base/common/nonliterals.py +++ b/addons/base/common/nonliterals.py @@ -7,8 +7,6 @@ can't be sent there themselves). import binascii import hashlib import simplejson.encoder -import time -import datetime __all__ = ['Domain', 'Context', 'NonLiteralEncoder, non_literal_decoder', 'CompoundDomain', 'CompoundContext'] From c1fcb132e90675295e4a7afc63d18472e8130f57 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 2 Sep 2011 08:35:55 +0200 Subject: [PATCH 133/156] [IMP] split optionparser initialization outside of main(), as well as cherrypy mounting bzr revid: xmo@openerp.com-20110902063555-6n19ly6369p82898 --- openerp-web.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/openerp-web.py b/openerp-web.py index 69e2c90db7c..e9a4682e4aa 100755 --- a/openerp-web.py +++ b/openerp-web.py @@ -4,6 +4,19 @@ import optparse,os,sys,tempfile import cherrypy import cherrypy.lib.static +optparser = optparse.OptionParser() +optparser.add_option("-p", "--port", dest="server.socket_port", default=8002, + help="listening port", type="int", metavar="NUMBER") +optparser.add_option("-s", "--session-path", dest="tools.sessions.storage_path", + default=os.path.join(tempfile.gettempdir(), "cpsessions"), + help="directory used for session storage", metavar="DIR") +optparser.add_option("--server-host", dest="openerp.server.host", + default='127.0.0.1', help="OpenERP server hostname", metavar="HOST") +optparser.add_option("--server-port", dest="openerp.server.port", default=8069, + help="OpenERP server port", type="int", metavar="NUMBER") +optparser.add_option("--db-filter", dest="openerp.dbfilter", default='.*', + help="Filter listed database", metavar="REGEXP") + path_root = os.path.dirname(os.path.abspath(__file__)) path_addons = os.path.join(path_root, 'addons') if path_addons not in sys.path: @@ -23,21 +36,12 @@ def main(argv): } # Parse config - op = optparse.OptionParser() - op.add_option("-p", "--port", dest="server.socket_port", default=8002, help="listening port", type="int", metavar="NUMBER") - op.add_option("-s", "--session-path", dest="tools.sessions.storage_path", default=os.path.join(tempfile.gettempdir(), "cpsessions"), help="directory used for session storage", metavar="DIR") - op.add_option("--server-host", dest="openerp.server.host", default='127.0.0.1', help="OpenERP server hostname", metavar="HOST") - op.add_option("--server-port", dest="openerp.server.port", default=8069, help="OpenERP server port", type="int", metavar="NUMBER") - op.add_option("--db-filter", dest="openerp.dbfilter", default='.*', help="Filter listed database", metavar="REGEXP") - (o, args) = op.parse_args(argv[1:]) + (o, args) = optparser.parse_args(argv[1:]) o = vars(o) for k in o.keys(): if o[k] is None: del(o[k]) - # Setup and run cherrypy - cherrypy.tree.mount(base.common.Root()) - cherrypy.config.update(config=DEFAULT_CONFIG) if os.path.exists(os.path.join(path_root,'openerp-web.cfg')): cherrypy.config.update(os.path.join(path_root,'openerp-web.cfg')) @@ -48,10 +52,11 @@ def main(argv): if not os.path.exists(cherrypy.config['tools.sessions.storage_path']): os.makedirs(cherrypy.config['tools.sessions.storage_path'], 0700) + return base.common.Root() + +if __name__ == "__main__": + cherrypy.tree.mount(main(sys.argv)) cherrypy.server.subscribe() cherrypy.engine.start() cherrypy.engine.block() -if __name__ == "__main__": - main(sys.argv) - From 55250f10065821ed8326ea384d2efcc0ba4aa575 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 2 Sep 2011 08:39:56 +0200 Subject: [PATCH 134/156] Take options parsing outside of main() function bzr revid: xmo@openerp.com-20110902063956-dlpnvj27ond11bqr --- openerp-web.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/openerp-web.py b/openerp-web.py index e9a4682e4aa..911b8fcafe8 100755 --- a/openerp-web.py +++ b/openerp-web.py @@ -24,7 +24,7 @@ if path_addons not in sys.path: import base -def main(argv): +def main(options): # change the timezone of the program to the OpenERP server's assumed timezone os.environ["TZ"] = "UTC" @@ -35,19 +35,12 @@ def main(argv): 'tools.sessions.timeout': 60 } - # Parse config - (o, args) = optparser.parse_args(argv[1:]) - o = vars(o) - for k in o.keys(): - if o[k] is None: - del(o[k]) - cherrypy.config.update(config=DEFAULT_CONFIG) if os.path.exists(os.path.join(path_root,'openerp-web.cfg')): cherrypy.config.update(os.path.join(path_root,'openerp-web.cfg')) if os.path.exists(os.path.expanduser('~/.openerp_webrc')): cherrypy.config.update(os.path.expanduser('~/.openerp_webrc')) - cherrypy.config.update(o) + cherrypy.config.update(options) if not os.path.exists(cherrypy.config['tools.sessions.storage_path']): os.makedirs(cherrypy.config['tools.sessions.storage_path'], 0700) @@ -55,7 +48,10 @@ def main(argv): return base.common.Root() if __name__ == "__main__": - cherrypy.tree.mount(main(sys.argv)) + (o, args) = optparser.parse_args(sys.argv[1:]) + o = dict((k, v) for k, v in vars(o).iteritems() if v is not None) + + cherrypy.tree.mount(main(o)) cherrypy.server.subscribe() cherrypy.engine.start() cherrypy.engine.block() From 6e739caf10667c2d10b2d0639589601acc6b6032 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 2 Sep 2011 09:11:52 +0200 Subject: [PATCH 135/156] [IMP] serve application via werkzeug's runner bzr revid: xmo@openerp.com-20110902071152-0oz8a526aeakindr --- openerp-web.py | 22 +++++++++++++--------- setup.py | 1 + 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/openerp-web.py b/openerp-web.py index 911b8fcafe8..56298715fb8 100755 --- a/openerp-web.py +++ b/openerp-web.py @@ -1,11 +1,16 @@ #!/usr/bin/env python -import optparse,os,sys,tempfile +import optparse +import os +import signal +import sys +import tempfile import cherrypy import cherrypy.lib.static +import werkzeug.serving optparser = optparse.OptionParser() -optparser.add_option("-p", "--port", dest="server.socket_port", default=8002, +optparser.add_option("-p", "--port", dest="socket_port", default=8002, help="listening port", type="int", metavar="NUMBER") optparser.add_option("-s", "--session-path", dest="tools.sessions.storage_path", default=os.path.join(tempfile.gettempdir(), "cpsessions"), @@ -45,14 +50,13 @@ def main(options): if not os.path.exists(cherrypy.config['tools.sessions.storage_path']): os.makedirs(cherrypy.config['tools.sessions.storage_path'], 0700) - return base.common.Root() + return cherrypy.tree.mount(base.common.Root()) if __name__ == "__main__": - (o, args) = optparser.parse_args(sys.argv[1:]) - o = dict((k, v) for k, v in vars(o).iteritems() if v is not None) + (options, args) = optparser.parse_args(sys.argv[1:]) + o = dict((k, v) for k, v in vars(options).iteritems() if v is not None) - cherrypy.tree.mount(main(o)) - cherrypy.server.subscribe() - cherrypy.engine.start() - cherrypy.engine.block() + werkzeug.serving.run_simple( + '0.0.0.0', options.socket_port, main(o), + use_reloader=True, threaded=True) diff --git a/setup.py b/setup.py index 91248a0ea73..55a5e92c8a5 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ setup( "simplejson >= 2.0.9", "python-dateutil >= 1.4.1", "pytz", + "werkzeug = 0.7", ], tests_require=[ 'unittest2', From 1167961df7cc796bbcf3552d117d47b99a84f509 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 2 Sep 2011 10:11:33 +0200 Subject: [PATCH 136/156] [IMP] better invoice line form view bzr revid: fp@tinyerp.com-20110902081133-blgja3oi7z5uhte6 --- addons/account/account_invoice_view.xml | 36 +++++++++++-------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index b7edf1ee52b..853b9e3f76d 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -51,26 +51,22 @@ form
- - - - - - - - - - - - - - - - - - - + + +
- + @@ -726,7 +726,7 @@