diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 43aaa2f58c1..a380a69dc03 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -99,7 +99,6 @@ for a particular financial year and for preparation of vouchers there is a modul 'project/wizard/project_account_analytic_line_view.xml', 'account_end_fy.xml', 'account_invoice_view.xml', - 'partner_view.xml', 'data/account_data.xml', 'data/data_account_type.xml', 'data/configurable_account_chart.xml', @@ -112,6 +111,7 @@ for a particular financial year and for preparation of vouchers there is a modul 'project/wizard/account_analytic_journal_report_view.xml', 'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml', 'project/wizard/account_analytic_chart_view.xml', + 'partner_view.xml', 'product_view.xml', 'account_assert_test.xml', 'process/statement_process.xml', diff --git a/addons/account/account.py b/addons/account/account.py index 3959799f1bb..d65c5d62c0a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1034,9 +1034,15 @@ class account_period(osv.osv): context = {} ids = [] if name: - ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit) + ids = self.search(cr, user, + [('code', 'ilike', name)] + args, + limit=limit, + context=context) if not ids: - ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit) + ids = self.search(cr, user, + [('name', operator, name)] + args, + limit=limit, + context=context) return self.name_get(cr, user, ids, context=context) def write(self, cr, uid, ids, vals, context=None): @@ -1059,10 +1065,14 @@ class account_period(osv.osv): raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.')) if period_date_start > period_date_stop: raise osv.except_osv(_('Error!'), _('Start period should precede then end period.')) + + # /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports + # on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen. + #for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search). if period_from.special: - return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) - return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)]) + return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)]) + return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)]) class account_journal_period(osv.osv): @@ -1670,7 +1680,7 @@ class account_move_reconcile(osv.osv): elif reconcile.line_partial_ids: first_partner = reconcile.line_partial_ids[0].partner_id.id move_lines = reconcile.line_partial_ids - if any([line.partner_id.id != first_partner for line in move_lines]): + if any([(line.account_id.type in ('receivable', 'payable') and line.partner_id.id != first_partner) for line in move_lines]): return False return True @@ -1854,6 +1864,12 @@ class account_tax_code(osv.osv): _order = 'code' +def get_precision_tax(): + def change_digit_tax(cr): + res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account') + return (16, res+3) + return change_digit_tax + class account_tax(osv.osv): """ A tax object. @@ -1874,12 +1890,6 @@ class account_tax(osv.osv): default.update({'name': name + _(' (Copy)')}) return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context) - def get_precision_tax(): - def change_digit_tax(cr): - res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account') - return (16, res+2) - return change_digit_tax - _name = 'account.tax' _description = 'Tax' _columns = { @@ -2795,7 +2805,7 @@ class account_tax_template(osv.osv): 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True), 'name': fields.char('Tax Name', size=64, required=True), 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."), - 'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."), + 'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."), 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True), 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."), 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."), diff --git a/addons/account/account_financial_report_data.xml b/addons/account/account_financial_report_data.xml index 6410a5e887c..e8ff33151c3 100644 --- a/addons/account/account_financial_report_data.xml +++ b/addons/account/account_financial_report_data.xml @@ -6,16 +6,19 @@ --> Profit and Loss + sum Income + detail_with_hierarchy account_type Expense + detail_with_hierarchy account_type diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml index 58e824a6250..b03babc63ac 100644 --- a/addons/account/account_installer.xml +++ b/addons/account/account_installer.xml @@ -20,10 +20,11 @@

+ - + diff --git a/addons/account_followup/i18n/ru.po b/addons/account_followup/i18n/ru.po index f6cb2cf0412..b57c8e4315e 100644 --- a/addons/account_followup/i18n/ru.po +++ b/addons/account_followup/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2011-11-11 15:21+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2013-05-31 10:28+0000\n" +"Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:11+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n" +"X-Generator: Launchpad (build 16660)\n" #. module: account_followup #: model:email.template,subject:account_followup.email_template_account_followup_default @@ -22,7 +22,7 @@ msgstr "" #: model:email.template,subject:account_followup.email_template_account_followup_level1 #: model:email.template,subject:account_followup.email_template_account_followup_level2 msgid "${user.company_id.name} Payment Reminder" -msgstr "" +msgstr "${user.company_id.name} напоминание о платеже" #. module: account_followup #: help:res.partner,latest_followup_level_id:0 @@ -43,12 +43,12 @@ msgstr "Дальнейшие действия" #. module: account_followup #: view:account_followup.followup.line:0 msgid "%(date)s" -msgstr "" +msgstr "%(date)s" #. module: account_followup #: field:res.partner,payment_next_action_date:0 msgid "Next Action Date" -msgstr "" +msgstr "Дата следующего действия" #. module: account_followup #: view:account_followup.followup.line:0 @@ -64,7 +64,7 @@ msgstr "" #. module: account_followup #: view:res.partner:0 msgid "⇾ Mark as Done" -msgstr "" +msgstr "⇾ отметить как сделанное" #. module: account_followup #: field:account_followup.followup.line,manual_action_note:0 @@ -94,7 +94,7 @@ msgstr "Тема эл.письма" #. module: account_followup #: view:account_followup.followup.line:0 msgid "%(user_signature)s" -msgstr "" +msgstr "%(user_signature)s" #. module: account_followup #: view:account_followup.followup.line:0 @@ -109,19 +109,19 @@ msgstr "" #. module: account_followup #: field:account_followup.print,email_body:0 msgid "Email Body" -msgstr "" +msgstr "Тело эл. письма" #. module: account_followup #: model:ir.actions.act_window,name:account_followup.action_account_followup_print msgid "Send Follow-Ups" -msgstr "" +msgstr "Послать напоминания" #. module: account_followup #: report:account_followup.followup.print:0 #: code:addons/account_followup/account_followup.py:263 #, python-format msgid "Amount" -msgstr "" +msgstr "Сумма" #. module: account_followup #: help:res.partner,payment_next_action:0 @@ -133,7 +133,7 @@ msgstr "" #. module: account_followup #: view:res.partner:0 msgid "No Responsible" -msgstr "" +msgstr "Нет ответственного" #. module: account_followup #: model:account_followup.followup.line,description:account_followup.demo_followup_line2 @@ -209,17 +209,17 @@ msgstr "Всего по дебету" #. module: account_followup #: field:res.partner,payment_next_action:0 msgid "Next Action" -msgstr "" +msgstr "Следующее действие" #. module: account_followup #: view:account_followup.followup.line:0 msgid ": Partner Name" -msgstr "" +msgstr ": Название партнера" #. module: account_followup #: field:account_followup.followup.line,manual_action_responsible_id:0 msgid "Assign a Responsible" -msgstr "" +msgstr "Назначить ответственного" #. module: account_followup #: view:account_followup.followup:0 @@ -305,7 +305,7 @@ msgstr "" #. module: account_followup #: view:account_followup.followup.line:0 msgid "%(partner_name)s" -msgstr "" +msgstr "%(partner_name)s" #. module: account_followup #: model:email.template,body_html:account_followup.email_template_account_followup_level1 @@ -377,7 +377,7 @@ msgstr "Определяет порядок вывода списка напом #: code:addons/account_followup/wizard/account_followup_print.py:166 #, python-format msgid " will be sent" -msgstr "" +msgstr " будет отправлен" #. module: account_followup #: view:account_followup.followup.line:0 @@ -388,7 +388,7 @@ msgstr "" #: view:account_followup.followup.line:0 #: field:account_followup.followup.line,send_letter:0 msgid "Send a Letter" -msgstr "" +msgstr "Отправить письмо" #. module: account_followup #: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form @@ -466,7 +466,7 @@ msgstr "Напечатанное сообщение" #: code:addons/account_followup/wizard/account_followup_print.py:155 #, python-format msgid "Anybody" -msgstr "" +msgstr "Кто угодно" #. module: account_followup #: help:account_followup.followup.line,send_email:0 @@ -528,7 +528,7 @@ msgstr "" #. module: account_followup #: view:res.partner:0 msgid "Search Partner" -msgstr "" +msgstr "Поиск партнера" #. module: account_followup #: model:ir.ui.menu,name:account_followup.account_followup_print_menu @@ -554,7 +554,7 @@ msgstr "" #. module: account_followup #: view:account_followup.print:0 msgid "or" -msgstr "" +msgstr "или" #. module: account_followup #: view:res.partner:0 diff --git a/addons/account_followup/report/account_followup_report.xml b/addons/account_followup/report/account_followup_report.xml index 6fee6a77ac1..b7c38e89f5e 100644 --- a/addons/account_followup/report/account_followup_report.xml +++ b/addons/account_followup/report/account_followup_report.xml @@ -6,7 +6,7 @@ account_followup.stat.tree account_followup.stat - + diff --git a/addons/account_followup/security/account_followup_security.xml b/addons/account_followup/security/account_followup_security.xml index 1586403d701..69c9a44a1b9 100644 --- a/addons/account_followup/security/account_followup_security.xml +++ b/addons/account_followup/security/account_followup_security.xml @@ -4,7 +4,7 @@ Account Follow-up multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml index 4bca00eaa6d..fbe29699e86 100644 --- a/addons/account_payment/security/account_payment_security.xml +++ b/addons/account_payment/security/account_payment_security.xml @@ -15,21 +15,21 @@ Payment Mode company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Payment order multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Payment line multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 08d36c45eff..03e25dfbc45 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -23,6 +23,7 @@ import time from lxml import etree from openerp.osv import fields, osv +from openerp.tools.translate import _ class payment_order_create(osv.osv_memory): """ @@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory): context.update({'line_ids': line_ids}) model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - return {'name': ('Entrie Lines'), + return {'name': _('Entry Lines'), 'context': context, 'view_type': 'form', 'view_mode': 'form', diff --git a/addons/account_test/account_test.py b/addons/account_test/account_test.py index 98e27380837..cc60108bf20 100644 --- a/addons/account_test/account_test.py +++ b/addons/account_test/account_test.py @@ -24,7 +24,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ############################################################################## diff --git a/addons/account_test/i18n/ru.po b/addons/account_test/i18n/ru.po new file mode 100644 index 00000000000..d36d83d2e99 --- /dev/null +++ b/addons/account_test/i18n/ru.po @@ -0,0 +1,241 @@ +# Russian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-06-05 07:09+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n" +"X-Generator: Launchpad (build 16667)\n" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "" +"Code should always set a variable named `result` with the result of your " +"test, that can be a list or\n" +"a dictionary. If `result` is an empty list, it means that the test was " +"succesful. Otherwise it will\n" +"try to translate and print what is inside `result`.\n" +"\n" +"If the result of your test is a dictionary, you can set a variable named " +"`column_order` to choose in\n" +"what order you want to print `result`'s content.\n" +"\n" +"Should you need them, you can also use the following variables into your " +"code:\n" +" * cr: cursor to the database\n" +" * uid: ID of the current user\n" +"\n" +"In any ways, the code must be legal python statements with correct " +"indentation (if needed).\n" +"\n" +"Example: \n" +" sql = '''SELECT id, name, ref, date\n" +" FROM account_move_line \n" +" WHERE account_id IN (SELECT id FROM account_account WHERE type " +"= 'view')\n" +" '''\n" +" cr.execute(sql)\n" +" result = cr.dictfetchall()" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_02 +msgid "Test 2: Opening a fiscal year" +msgstr "Проверка 2: Открытие фискального года" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_05 +msgid "" +"Check that reconciled invoice for Sales/Purchases has reconciled entries for " +"Payable and Receivable Accounts" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_03 +msgid "" +"Check if movement lines are balanced and have the same date and period" +msgstr "" + +#. module: account_test +#: field:accounting.assert.test,name:0 +msgid "Test Name" +msgstr "" + +#. module: account_test +#: report:account.test.assert.print:0 +msgid "Accouting tests on" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_01 +msgid "Test 1: General balance" +msgstr "Проверка 1: Общий баланс" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_06 +msgid "Check that paid/reconciled invoices are not in 'Open' state" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_05_2 +msgid "" +"Check that reconciled account moves, that define Payable and Receivable " +"accounts, are belonging to reconciled invoices" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Tests" +msgstr "Проверки" + +#. module: account_test +#: field:accounting.assert.test,desc:0 +msgid "Test Description" +msgstr "Описание проверки" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Description" +msgstr "Описание" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_06_1 +msgid "Check that there's no move for any account with « View » account type" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_08 +msgid "Test 9 : Accounts and partners on account moves" +msgstr "" + +#. module: account_test +#: model:ir.actions.act_window,name:account_test.action_accounting_assert +#: model:ir.actions.report.xml,name:account_test.account_assert_test_report +#: model:ir.ui.menu,name:account_test.menu_action_license +msgid "Accounting Tests" +msgstr "" + +#. module: account_test +#: code:addons/account_test/report/account_test_report.py:74 +#, python-format +msgid "The test was passed successfully" +msgstr "Проверка прошла успешно" + +#. module: account_test +#: field:accounting.assert.test,active:0 +msgid "Active" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_06 +msgid "Test 6 : Invoices status" +msgstr "" + +#. module: account_test +#: model:ir.model,name:account_test.model_accounting_assert_test +msgid "accounting.assert.test" +msgstr "accounting.assert.test" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_05 +msgid "" +"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices" +msgstr "" + +#. module: account_test +#: field:accounting.assert.test,code_exec:0 +msgid "Python code" +msgstr "Код на Python" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_07 +msgid "" +"Check on bank statement that the Closing Balance = Starting Balance + sum of " +"statement lines" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_07 +msgid "Test 8 : Closing balance on bank statements" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_03 +msgid "Test 3: Movement lines" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_05_2 +msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Expression" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_04 +msgid "Test 4: Totally reconciled mouvements" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_04 +msgid "Check if the totally reconciled movements are balanced" +msgstr "" + +#. module: account_test +#: field:accounting.assert.test,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_02 +msgid "" +"Check if the balance of the new opened fiscal year matches with last year's " +"balance" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Python Code" +msgstr "Код на Python" + +#. module: account_test +#: model:ir.actions.act_window,help:account_test.action_accounting_assert +msgid "" +"

\n" +" Click to create Accounting Test.\n" +"

\n" +" " +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_01 +msgid "Check the balance: Debit sum = Credit sum" +msgstr "Проверяет баланс: сумма дебита = сумма кредита" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_08 +msgid "Check that general accounts and partners on account moves are active" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_06_1 +msgid "Test 7: « View  » account type" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Code Help" +msgstr "" diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 345c3378aa0..a043b15a518 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -67,6 +67,7 @@ This module manages: 'test/sales_payment.yml', 'test/account_voucher_report.yml', 'test/case1_usd_usd.yml', + 'test/case1_usd_usd_payment_rate.yml', 'test/case2_usd_eur_debtor_in_eur.yml', 'test/case2_usd_eur_debtor_in_usd.yml', 'test/case3_eur_eur.yml', diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index b176c3b8fd9..850162ccf84 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -26,6 +26,19 @@ from openerp.osv import fields, osv import openerp.addons.decimal_precision as dp from openerp.tools.translate import _ from openerp.tools import float_compare +from openerp.report import report_sxw + +class res_currency(osv.osv): + _inherit = "res.currency" + + def _get_current_rate(self, cr, uid, ids, name, arg, context=None): + if context is None: + context = {} + res = super(res_currency, self)._get_current_rate(cr, uid, ids, name, arg, context=context) + if context.get('voucher_special_currency') in ids and context.get('voucher_special_currency_rate'): + res[context.get('voucher_special_currency')] = context.get('voucher_special_currency_rate') + return res + class res_company(osv.osv): _inherit = "res.company" @@ -153,7 +166,7 @@ class account_voucher(osv.osv): journal = journal_pool.browse(cr, uid, journal_id, context=context) if journal.currency: return journal.currency.id - return False + return self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id def _get_partner(self, cr, uid, context=None): if context is None: context = {} @@ -222,26 +235,26 @@ class account_voucher(osv.osv): def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_currency, type, context=None): context = context or {} if not line_dr_ids and not line_cr_ids: - return {'value':{}} + return {'value':{'writeoff_amount': 0.0}} 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) - #compute the field is_multi_currency that is used to hide/display options linked to secondary currency on the voucher is_multi_currency = False - if voucher_currency: - # if the voucher currency is not False, it means it is different than the company currency and we need to display the options - is_multi_currency = True - else: - #loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to define the options - for voucher_line in line_dr_ids+line_cr_ids: - company_currency = False - company_currency = voucher_line.get('move_line_id', False) and self.pool.get('account.move.line').browse(cr, uid, voucher_line.get('move_line_id'), context=context).company_id.currency_id.id - if voucher_line.get('currency_id', company_currency) != company_currency: - is_multi_currency = True - break + #loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to see the options + for voucher_line in line_dr_ids+line_cr_ids: + line_id = voucher_line.get('id') and self.pool.get('account.voucher.line').browse(cr, uid, voucher_line['id'], context=context).move_line_id.id or voucher_line.get('move_line_id') + if line_id and self.pool.get('account.move.line').browse(cr, uid, line_id, context=context).currency_id: + is_multi_currency = True + break return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, type), 'is_multi_currency': is_multi_currency}} + def _get_journal_currency(self, cr, uid, ids, name, args, context=None): + res = {} + for voucher in self.browse(cr, uid, ids, context=context): + res[voucher.id] = voucher.journal_id.currency and voucher.journal_id.currency.id or voucher.company_id.currency_id.id + return res + def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): if not ids: return {} currency_obj = self.pool.get('res.currency') @@ -258,20 +271,48 @@ class account_voucher(osv.osv): return res def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None): - if not ids: return {} + if context is None: + context = {} + res = {} + ctx = context.copy() + for v in self.browse(cr, uid, ids, context=context): + ctx.update({'date': v.date}) + #make a new call to browse in order to have the right date in the context, to get the right currency rate + voucher = self.browse(cr, uid, v.id, context=ctx) + ctx.update({ + 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False, + 'voucher_special_currency_rate': voucher.currency_id.rate * voucher.payment_rate,}) + res[voucher.id] = self.pool.get('res.currency').compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, voucher.amount, context=ctx) + return res + + def _get_currency_help_label(self, cr, uid, currency_id, payment_rate, payment_rate_currency_id, context=None): + """ + This function builds a string to help the users to understand the behavior of the payment rate fields they can specify on the voucher. + This string is only used to improve the usability in the voucher form view and has no other effect. + + :param currency_id: the voucher currency + :type currency_id: integer + :param payment_rate: the value of the payment_rate field of the voucher + :type payment_rate: float + :param payment_rate_currency_id: the value of the payment_rate_currency_id field of the voucher + :type payment_rate_currency_id: integer + :return: translated string giving a tip on what's the effect of the current payment rate specified + :rtype: str + """ + rml_parser = report_sxw.rml_parse(cr, uid, 'currency_help_label', context=context) + currency_pool = self.pool.get('res.currency') + currency_str = payment_rate_str = '' + if currency_id: + currency_str = rml_parser.formatLang(1, currency_obj=currency_pool.browse(cr, uid, currency_id, context=context)) + if payment_rate_currency_id: + payment_rate_str = rml_parser.formatLang(payment_rate, currency_obj=currency_pool.browse(cr, uid, payment_rate_currency_id, context=context)) + currency_help_label = _('At the operation date, the exchange rate was\n%s = %s') % (currency_str, payment_rate_str) + return currency_help_label + + def _fnct_currency_help_label(self, cr, uid, ids, name, args, context=None): res = {} - rate = 1.0 for voucher in self.browse(cr, uid, ids, context=context): - if voucher.currency_id: - if voucher.company_id.currency_id.id == voucher.payment_rate_currency_id.id: - rate = 1 / voucher.payment_rate - else: - ctx = context.copy() - ctx.update({'date': voucher.date}) - voucher_rate = self.browse(cr, uid, voucher.id, context=ctx).currency_id.rate - company_currency_rate = voucher.company_id.currency_id.rate - rate = voucher_rate * company_currency_rate - res[voucher.id] = voucher.amount / rate + res[voucher.id] = self._get_currency_help_label(cr, uid, voucher.currency_id.id, voucher.payment_rate, voucher.payment_rate_currency_id.id, context=context) return res _name = 'account.voucher' @@ -304,8 +345,7 @@ 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', readonly=True), + 'currency_id': fields.function(_get_journal_currency, type='many2one', relation='res.currency', string='Currency', readonly=True, required=True), 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'state':fields.selection( [('draft','Draft'), @@ -346,6 +386,7 @@ class account_voucher(osv.osv): help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'), 'paid_amount_in_company_currency': fields.function(_paid_amount_in_company_currency, string='Paid Amount in Company Currency', type='float', readonly=True), 'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'), + 'currency_help_label': fields.function(_fnct_currency_help_label, type='text', string="Helping Sentence", help="This sentence helps you to know how to specify the payment rate by giving you the direct effect it has"), } _defaults = { 'active': True, @@ -422,6 +463,8 @@ class account_voucher(osv.osv): partner_pool = self.pool.get('res.partner') position_pool = self.pool.get('account.fiscal.position') line_pool = self.pool.get('account.voucher.line') + if not line_ids: + line_ids = [] res = { 'tax_amount': False, 'amount': False, @@ -516,23 +559,26 @@ class account_voucher(osv.osv): return default def onchange_rate(self, cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=None): - res = {'value': {'paid_amount_in_company_currency': amount}} - company_currency = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id - if rate and amount and currency_id:# and currency_id == payment_rate_currency_id: - voucher_rate = self.pool.get('res.currency').browse(cr, uid, currency_id, context).rate - if company_currency.id == payment_rate_currency_id: - company_rate = rate - else: - company_rate = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id.rate - res['value']['paid_amount_in_company_currency'] = amount / voucher_rate * company_rate + res = {'value': {'paid_amount_in_company_currency': amount, 'currency_help_label': self._get_currency_help_label(cr, uid, currency_id, rate, payment_rate_currency_id, context=context)}} + if rate and amount and currency_id: + company_currency = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id + #context should contain the date, the payment currency and the payment rate specified on the voucher + amount_in_company_currency = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency.id, amount, context=context) + res['value']['paid_amount_in_company_currency'] = amount_in_company_currency return res def onchange_amount(self, cr, uid, ids, amount, rate, partner_id, journal_id, currency_id, ttype, date, payment_rate_currency_id, company_id, context=None): if context is None: context = {} - res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context) ctx = context.copy() ctx.update({'date': date}) + #read the voucher rate with the right date in the context + currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id + voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate'] + ctx.update({ + 'voucher_special_currency': payment_rate_currency_id, + 'voucher_special_currency_rate': rate * voucher_rate}) + res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=ctx) vals = self.onchange_rate(cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx) for key in vals.keys(): res[key].update(vals[key]) @@ -546,6 +592,7 @@ class account_voucher(osv.osv): journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context) company_id = journal.company_id.id payment_rate = 1.0 + currency_id = currency_id or journal.company_id.currency_id.id payment_rate_currency_id = currency_id ctx = context.copy() ctx.update({'date': date}) @@ -561,24 +608,62 @@ class account_voucher(osv.osv): # is not in the voucher currency payment_rate_currency_id = voucher_line['currency_id'] tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate - voucher_currency_id = currency_id or journal.company_id.currency_id.id - payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate + payment_rate = tmp / currency_obj.browse(cr, uid, currency_id, context=ctx).rate break + vals['value'].update({ + 'payment_rate': payment_rate, + 'currency_id': currency_id, + 'payment_rate_currency_id': payment_rate_currency_id + }) + #read the voucher rate with the right date in the context + voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate'] + ctx.update({ + 'voucher_special_currency_rate': payment_rate * voucher_rate, + 'voucher_special_currency': payment_rate_currency_id}) res = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx) for key in res.keys(): vals[key].update(res[key]) - vals['value'].update({'payment_rate': payment_rate}) - if payment_rate_currency_id: - vals['value'].update({'payment_rate_currency_id': payment_rate_currency_id}) return vals + def basic_onchange_partner(self, cr, uid, ids, partner_id, journal_id, ttype, context=None): + partner_pool = self.pool.get('res.partner') + journal_pool = self.pool.get('account.journal') + res = {'value': {'account_id': False}} + if not partner_id or not journal_id: + return res + + journal = journal_pool.browse(cr, uid, journal_id, context=context) + partner = partner_pool.browse(cr, uid, partner_id, context=context) + account_id = False + if journal.type in ('sale','sale_refund'): + account_id = partner.property_account_receivable.id + elif journal.type in ('purchase', 'purchase_refund','expense'): + account_id = partner.property_account_payable.id + else: + account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id + + res['value']['account_id'] = account_id + return res + def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=None): if not journal_id: return {} - res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context) - vals = self.recompute_payment_rate(cr, uid, ids, res, currency_id, date, ttype, journal_id, amount, context=context) + if context is None: + context = {} + #TODO: comment me and use me directly in the sales/purchases views + res = self.basic_onchange_partner(cr, uid, ids, partner_id, journal_id, ttype, context=context) + if ttype in ['sale', 'purchase']: + return res + ctx = context.copy() + # not passing the payment_rate currency and the payment_rate in the context but it's ok because they are reset in recompute_payment_rate + ctx.update({'date': date}) + vals = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=ctx) + vals2 = self.recompute_payment_rate(cr, uid, ids, vals, currency_id, date, ttype, journal_id, amount, context=context) for key in vals.keys(): res[key].update(vals[key]) + for key in vals2.keys(): + res[key].update(vals2[key]) + #TODO: can probably be removed now #TODO: onchange_partner_id() should not returns [pre_line, line_dr_ids, payment_rate...] for type sale, and not # [pre_line, line_cr_ids, payment_rate...] for type purchase. # We should definitively split account.voucher object in two and make distinct on_change functions. In the @@ -621,8 +706,6 @@ class account_voucher(osv.osv): if context is None: context = {} context_multi_currency = context.copy() - if date: - context_multi_currency.update({'date': date}) currency_pool = self.pool.get('res.currency') move_line_pool = self.pool.get('account.move.line') @@ -646,18 +729,6 @@ class account_voucher(osv.osv): journal = journal_pool.browse(cr, uid, journal_id, context=context) partner = partner_pool.browse(cr, uid, partner_id, context=context) currency_id = currency_id or journal.company_id.currency_id.id - account_id = False - if journal.type in ('sale','sale_refund'): - account_id = partner.property_account_receivable.id - elif journal.type in ('purchase', 'purchase_refund','expense'): - account_id = partner.property_account_payable.id - else: - account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id - - default['value']['account_id'] = account_id - - if journal.type not in ('cash', 'bank'): - return default total_credit = 0.0 total_debit = 0.0 @@ -715,12 +786,13 @@ class account_voucher(osv.osv): if _remove_noise_in_o2m(): continue - if line.currency_id and currency_id==line.currency_id.id: + if line.currency_id and currency_id == line.currency_id.id: amount_original = abs(line.amount_currency) amount_unreconciled = abs(line.amount_residual_currency) else: - amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0) - amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual)) + #always use the amount booked in the company currency as the basis of the conversion into the voucher currency + amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0, context=context_multi_currency) + amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual), context=context_multi_currency) line_currency_id = line.currency_id and line.currency_id.id or company_currency rs = { 'name':line.move_id.name, @@ -766,10 +838,15 @@ class account_voucher(osv.osv): if context is None: context = {} res = {'value': {}} - #set the default payment rate of the voucher and compute the paid amount in company currency - if currency_id and currency_id == payment_rate_currency_id: + if currency_id: + #set the default payment rate of the voucher and compute the paid amount in company currency ctx = context.copy() ctx.update({'date': date}) + #read the voucher rate with the right date in the context + voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate'] + ctx.update({ + 'voucher_special_currency_rate': payment_rate * voucher_rate, + 'voucher_special_currency': payment_rate_currency_id}) vals = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx) for key in vals.keys(): res[key].update(vals[key]) @@ -789,7 +866,8 @@ class account_voucher(osv.osv): period_pool = self.pool.get('account.period') currency_obj = self.pool.get('res.currency') ctx = context.copy() - ctx.update({'company_id': company_id}) + ctx.update({'company_id': company_id, 'account_period_prefer_normal': True}) + voucher_currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id pids = period_pool.find(cr, uid, date, context=ctx) if pids: res['value'].update({'period_id':pids[0]}) @@ -798,9 +876,8 @@ class account_voucher(osv.osv): payment_rate = 1.0 if payment_rate_currency_id != currency_id: tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate - voucher_currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate - vals = self.onchange_payment_rate_currency(cr, uid, ids, currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=context) + vals = self.onchange_payment_rate_currency(cr, uid, ids, voucher_currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=context) vals['value'].update({'payment_rate': payment_rate}) for key in vals.keys(): res[key].update(vals[key]) @@ -823,7 +900,15 @@ class account_voucher(osv.osv): currency_id = False if journal.currency: currency_id = journal.currency.id + else: + currency_id = journal.company_id.currency_id.id vals['value'].update({'currency_id': currency_id}) + #in case we want to register the payment directly from an invoice, it's confusing to allow to switch the journal + #without seeing that the amount is expressed in the journal currency, and not in the invoice currency. So to avoid + #this common mistake, we simply reset the amount to 0 if the currency is not the invoice currency. + if context.get('payment_expected_currency') and currency_id != context.get('payment_expected_currency'): + vals['value']['amount'] = 0 + amount = 0 res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context) for key in res.keys(): vals[key].update(res[key]) @@ -905,8 +990,8 @@ class account_voucher(osv.osv): current_currency = self._get_current_currency(cr, uid, voucher_id, context) if current_currency <> company_currency: context_multi_currency = context.copy() - voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context) - context_multi_currency.update({'date': voucher_brw.date}) + voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context) + context_multi_currency.update({'date': voucher.date}) return context_multi_currency return context @@ -921,33 +1006,33 @@ class account_voucher(osv.osv): :return: mapping between fieldname and value of account move line to create :rtype: dict ''' - voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) + voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) debit = credit = 0.0 # TODO: is there any other alternative then the voucher type ?? # ANSWER: We can have payment and receipt "In Advance". # TODO: Make this logic available. # -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_brw.type in ('purchase', 'payment'): - credit = voucher_brw.paid_amount_in_company_currency - elif voucher_brw.type in ('sale', 'receipt'): - debit = voucher_brw.paid_amount_in_company_currency + if voucher.type in ('purchase', 'payment'): + credit = voucher.paid_amount_in_company_currency + elif voucher.type in ('sale', 'receipt'): + debit = voucher.paid_amount_in_company_currency if debit < 0: credit = -debit; debit = 0.0 if credit < 0: debit = -credit; credit = 0.0 sign = debit - credit < 0 and -1 or 1 #set the first line of the voucher move_line = { - 'name': voucher_brw.name or '/', + 'name': voucher.name or '/', 'debit': debit, 'credit': credit, - 'account_id': voucher_brw.account_id.id, + 'account_id': voucher.account_id.id, 'move_id': move_id, - 'journal_id': voucher_brw.journal_id.id, - 'period_id': voucher_brw.period_id.id, - 'partner_id': voucher_brw.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 * voucher_brw.amount or 0.0, - 'date': voucher_brw.date, - 'date_maturity': voucher_brw.date_due + 'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0, + 'date': voucher.date, + 'date_maturity': voucher.date_due } return move_line @@ -960,31 +1045,31 @@ class account_voucher(osv.osv): :rtype: dict ''' seq_obj = self.pool.get('ir.sequence') - voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) - if voucher_brw.number: - name = voucher_brw.number - elif voucher_brw.journal_id.sequence_id: - if not voucher_brw.journal_id.sequence_id.active: + voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) + if voucher.number: + name = voucher.number + elif voucher.journal_id.sequence_id: + if not voucher.journal_id.sequence_id.active: raise osv.except_osv(_('Configuration Error !'), _('Please activate the sequence of selected journal !')) c = dict(context) - c.update({'fiscalyear_id': voucher_brw.period_id.fiscalyear_id.id}) - name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=c) + c.update({'fiscalyear_id': voucher.period_id.fiscalyear_id.id}) + name = seq_obj.next_by_id(cr, uid, voucher.journal_id.sequence_id.id, context=c) else: raise osv.except_osv(_('Error!'), _('Please define a sequence on the journal.')) - if not voucher_brw.reference: + if not voucher.reference: ref = name.replace('/','') else: - ref = voucher_brw.reference + ref = voucher.reference move = { 'name': name, - 'journal_id': voucher_brw.journal_id.id, - 'narration': voucher_brw.narration, - 'date': voucher_brw.date, + 'journal_id': voucher.journal_id.id, + 'narration': voucher.narration, + 'date': voucher.date, 'ref': ref, - 'period_id': voucher_brw.period_id.id, + 'period_id': voucher.period_id.id, } return move @@ -1011,7 +1096,10 @@ class account_voucher(osv.osv): raise osv.except_osv(_('Insufficient Configuration!'),_("You should configure the 'Gain Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates.")) # Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise # the receivable/payable account may have a secondary currency, which render this field mandatory - account_currency_id = company_currency <> current_currency and current_currency or False + if line.account_id.currency_id: + account_currency_id = line.account_id.currency_id.id + else: + account_currency_id = company_currency <> current_currency and current_currency or False move_line = { 'journal_id': line.voucher_id.journal_id.id, 'period_id': line.voucher_id.period_id.id, @@ -1054,16 +1142,11 @@ class account_voucher(osv.osv): :return: the amount in the currency of the voucher's company :rtype: float ''' + if context is None: + context = {} currency_obj = self.pool.get('res.currency') voucher = self.browse(cr, uid, voucher_id, context=context) - res = amount - if voucher.payment_rate_currency_id.id == voucher.company_id.currency_id.id: - # the rate specified on the voucher is for the company currency - res = currency_obj.round(cr, uid, voucher.company_id.currency_id, (amount * voucher.payment_rate)) - else: - # the rate specified on the voucher is not relevant, we use all the rates in the system - res = currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context) - return res + return currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context) def voucher_move_line_create(self, cr, uid, voucher_id, line_total, move_id, company_currency, current_currency, context=None): ''' @@ -1087,39 +1170,45 @@ class account_voucher(osv.osv): tot_line = line_total rec_lst_ids = [] - voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context) + date = self.read(cr, uid, voucher_id, ['date'], context=context)['date'] ctx = context.copy() - ctx.update({'date': voucher_brw.date}) + ctx.update({'date': date}) + voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context=ctx) + voucher_currency = voucher.journal_id.currency or voucher.company_id.currency_id + ctx.update({ + 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate , + 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,}) prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') - for line in voucher_brw.line_ids: + for line in voucher.line_ids: #create one move line per voucher line where amount is not 0.0 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value) if not line.amount and not (line.move_line_id and not float_compare(line.move_line_id.debit, line.move_line_id.credit, precision_rounding=prec) and not float_compare(line.move_line_id.debit, 0.0, precision_rounding=prec)): continue # convert the amount set on the voucher line into the currency of the voucher's company - amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher_brw.id, context=ctx) + # this calls res_curreny.compute() with the right context, so that it will take either the rate on the voucher if it is relevant or will use the default behaviour + amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher.id, context=ctx) # if the amount encoded in voucher is equal to the amount unreconciled, we need to compute the # currency rate difference if line.amount == line.amount_unreconciled: if not line.move_line_id: raise osv.except_osv(_('Wrong voucher line'),_("The invoice you are willing to pay is not valid anymore.")) - sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1 + sign = voucher.type in ('payment', 'purchase') and -1 or 1 currency_rate_difference = sign * (line.move_line_id.amount_residual - amount) else: currency_rate_difference = 0.0 move_line = { - 'journal_id': voucher_brw.journal_id.id, - 'period_id': voucher_brw.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': voucher_brw.partner_id.id, + 'partner_id': voucher.partner_id.id, 'currency_id': line.move_line_id and (company_currency <> line.move_line_id.currency_id.id and line.move_line_id.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, 'debit': 0.0, - 'date': voucher_brw.date + 'date': voucher.date } if amount < 0: amount = -amount @@ -1135,9 +1224,9 @@ class account_voucher(osv.osv): tot_line -= amount move_line['credit'] = amount - if voucher_brw.tax_id and voucher_brw.type in ('sale', 'purchase'): + if voucher.tax_id and voucher.type in ('sale', 'purchase'): move_line.update({ - 'account_tax_id': voucher_brw.tax_id.id, + 'account_tax_id': voucher.tax_id.id, }) if move_line.get('account_tax_id', False): @@ -1149,7 +1238,6 @@ class account_voucher(osv.osv): foreign_currency_diff = 0.0 amount_currency = False if line.move_line_id: - voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id # We want to set it on the account move line as soon as the original line had a foreign currency if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency: # we compute the amount in that foreign currency. @@ -1157,22 +1245,19 @@ class account_voucher(osv.osv): # if the voucher and the voucher line share the same currency, there is no computation to do sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1 amount_currency = sign * (line.amount) - elif line.move_line_id.currency_id.id == voucher_brw.payment_rate_currency_id.id: - # if the rate is specified on the voucher, we must use it - voucher_rate = currency_obj.browse(cr, uid, voucher_currency, context=ctx).rate - amount_currency = (move_line['debit'] - move_line['credit']) * voucher_brw.payment_rate * voucher_rate else: - # otherwise we use the rates of the system (giving the voucher date in the context) + # if the rate is specified on the voucher, it will be used thanks to the special keys in the context + # otherwise we use the rates of the system amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx) - if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency: - sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1 + if line.amount == line.amount_unreconciled: + sign = voucher.type in ('payment', 'purchase') and -1 or 1 foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency move_line['amount_currency'] = amount_currency voucher_line = move_line_obj.create(cr, uid, move_line) rec_ids = [voucher_line, line.move_line_id.id] - if not currency_obj.is_zero(cr, uid, voucher_brw.company_id.currency_id, currency_rate_difference): + if not currency_obj.is_zero(cr, uid, voucher.company_id.currency_id, currency_rate_difference): # Change difference entry in company currency exch_lines = self._get_exchange_lines(cr, uid, line, move_id, currency_rate_difference, company_currency, current_currency, context=context) new_id = move_line_obj.create(cr, uid, exch_lines[0],context) @@ -1219,32 +1304,32 @@ class account_voucher(osv.osv): currency_obj = self.pool.get('res.currency') move_line = {} - voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) - current_currency_obj = voucher_brw.currency_id or voucher_brw.journal_id.company_id.currency_id + voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) + current_currency_obj = voucher.currency_id or voucher.journal_id.company_id.currency_id if not currency_obj.is_zero(cr, uid, current_currency_obj, line_total): diff = line_total account_id = False write_off_name = '' - if voucher_brw.payment_option == 'with_writeoff': - account_id = voucher_brw.writeoff_acc_id.id - write_off_name = voucher_brw.comment - elif voucher_brw.type in ('sale', 'receipt'): - account_id = voucher_brw.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 = voucher_brw.partner_id.property_account_payable.id - sign = voucher_brw.type == 'payment' and -1 or 1 + account_id = voucher.partner_id.property_account_payable.id + sign = voucher.type == 'payment' and -1 or 1 move_line = { 'name': write_off_name or name, 'account_id': account_id, 'move_id': move_id, - 'partner_id': voucher_brw.partner_id.id, - 'date': voucher_brw.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 (sign * -1 * voucher_brw.writeoff_amount) or False, + 'amount_currency': company_currency <> current_currency and (sign * -1 * voucher.writeoff_amount) or False, 'currency_id': company_currency <> current_currency and current_currency or False, - 'analytic_account_id': voucher_brw.analytic_id and voucher_brw.analytic_id.id or False, + 'analytic_account_id': voucher.analytic_id and voucher.analytic_id.id or False, } return move_line @@ -1345,13 +1430,17 @@ class account_voucher_line(osv.osv): _order = "move_line_id" # If the payment is in the same currency than the invoice, we keep the same amount - # Otherwise, we compute from company currency to payment currency + # Otherwise, we compute from invoice currency to payment currency def _compute_balance(self, cr, uid, ids, name, args, context=None): currency_pool = self.pool.get('res.currency') rs_data = {} for line in self.browse(cr, uid, ids, context=context): ctx = context.copy() ctx.update({'date': line.voucher_id.date}) + voucher_rate = self.pool.get('res.currency').read(cr, uid, line.voucher_id.currency_id.id, ['rate'], context=ctx)['rate'] + ctx.update({ + 'voucher_special_currency': line.voucher_id.payment_rate_currency_id and line.voucher_id.payment_rate_currency_id.id or False, + 'voucher_special_currency_rate': line.voucher_id.payment_rate * voucher_rate}) res = {} company_currency = line.voucher_id.journal_id.company_id.currency_id.id voucher_currency = line.voucher_id.currency_id and line.voucher_id.currency_id.id or company_currency @@ -1361,13 +1450,11 @@ class account_voucher_line(osv.osv): res['amount_original'] = 0.0 res['amount_unreconciled'] = 0.0 elif move_line.currency_id and voucher_currency==move_line.currency_id.id: - res['amount_original'] = currency_pool.compute(cr, uid, move_line.currency_id.id, voucher_currency, abs(move_line.amount_currency), context=ctx) - 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) - 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) - res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx) + res['amount_original'] = abs(move_line.amount_currency) + res['amount_unreconciled'] = abs(move_line.amount_residual_currency) else: - res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit, context=ctx) + #always use the amount booked in the company currency as the basis of the conversion into the voucher currency + res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit or move_line.debit or 0.0, context=ctx) res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx) rs_data[line.id] = res diff --git a/addons/account_voucher/html/account_illu_01.png b/addons/account_voucher/html/account_illu_01.png new file mode 100644 index 00000000000..2e0dbf4aac2 Binary files /dev/null and b/addons/account_voucher/html/account_illu_01.png differ diff --git a/addons/account_voucher/html/account_sc_00.png b/addons/account_voucher/html/account_sc_00.png new file mode 100644 index 00000000000..63332b46575 Binary files /dev/null and b/addons/account_voucher/html/account_sc_00.png differ diff --git a/addons/account_voucher/html/account_sc_02.png b/addons/account_voucher/html/account_sc_02.png new file mode 100644 index 00000000000..709e444ba0d Binary files /dev/null and b/addons/account_voucher/html/account_sc_02.png differ diff --git a/addons/account_voucher/html/account_sc_03.png b/addons/account_voucher/html/account_sc_03.png new file mode 100644 index 00000000000..a3e3afc34c0 Binary files /dev/null and b/addons/account_voucher/html/account_sc_03.png differ diff --git a/addons/account_voucher/html/account_sc_04.png b/addons/account_voucher/html/account_sc_04.png new file mode 100644 index 00000000000..458c8280c26 Binary files /dev/null and b/addons/account_voucher/html/account_sc_04.png differ diff --git a/addons/account_voucher/html/account_sc_06.png b/addons/account_voucher/html/account_sc_06.png new file mode 100644 index 00000000000..9605506c6a5 Binary files /dev/null and b/addons/account_voucher/html/account_sc_06.png differ diff --git a/addons/account_voucher/html/bazile.png b/addons/account_voucher/html/bazile.png new file mode 100644 index 00000000000..30f37e70b4a Binary files /dev/null and b/addons/account_voucher/html/bazile.png differ diff --git a/addons/account_voucher/html/index.html b/addons/account_voucher/html/index.html new file mode 100644 index 00000000000..d59c110dde5 --- /dev/null +++ b/addons/account_voucher/html/index.html @@ -0,0 +1,140 @@ +
+
+

Invoicing Made Easy

+

Send professional invoices & get paid online

+
+
+ + Online Demo + + +
+
+
+

+ Create and send professional looking invoices & get paid + online. It automatically integrates with other apps to bill + automatically based on your activities. +

+ +
+
+
+ +
+

Send Invoices With No Effort

+
+
+

+ Send invoices directly to your clients in just a click. The + invoice is automatically attached to the email as a PDF file. +

+
+
+ +
+
+
+ + +
+

Get Paid Faster

+

Electronic invoicing and automated follow-ups

+
+
+ +
+
+

+Get paid online with paypal or other payment processing service. Get rid of +the stress of having to constantly remind your debtors. Simply set-up and +automate follow-ups to get paid quickly. +

+
+
+
+ + +
+
+

Connect Your Bank Accounts

+
+

+Import your bank statements and reconcile them in just a few clicks. Prepare +payment orders based on your supplier invoices and payment terms. +

+
+
+ +
+ +
+
+ +
+
+

Analyse Your Sales & Costs

+
+ +
+
+

+Get direct access to key information with dynamic and customizable dashboards. +Analyse your invoicing by product, customer, salesperson, etc. +

+
+
+
+ +
+
+

Integration With Other Apps

+
+

+Bill automatically based on sales orders, delivery orders, contracts or on time and +material. Define recurrencies to produce recurring invoice automatically. +

+
+
+ +
+
+
+ +
+
+
+

Many companies already enjoy it

+

Hear what they have to say !

+
+
+
+ + OpenERP allowed us to automate sending 10.000 invoices per month. + + + +
Yves Morel
+
Director of Bazile Telecom.
+
+
+
+
+
+ + We have found invoicing module of OpenERP to be user + friendly and highly customizable. + + + +
Col. Sunil Prem.
+ +
+
+
+
+
+
+
diff --git a/addons/account_voucher/html/testimonial_sunil.jpg b/addons/account_voucher/html/testimonial_sunil.jpg new file mode 100644 index 00000000000..f2ad6929a2b Binary files /dev/null and b/addons/account_voucher/html/testimonial_sunil.jpg differ diff --git a/addons/account_voucher/i18n/ru.po b/addons/account_voucher/i18n/ru.po index 63cad344ed0..ef38a07e478 100644 --- a/addons/account_voucher/i18n/ru.po +++ b/addons/account_voucher/i18n/ru.po @@ -7,24 +7,24 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-05-10 17:46+0000\n" +"PO-Revision-Date: 2013-05-29 13:17+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:33+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-30 05:45+0000\n" +"X-Generator: Launchpad (build 16652)\n" #. module: account_voucher #: field:account.bank.statement.line,voucher_id:0 msgid "Reconciliation" -msgstr "" +msgstr "Сверка" #. module: account_voucher #: model:ir.model,name:account_voucher.model_account_config_settings msgid "account.config.settings" -msgstr "" +msgstr "account.config.settings" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:369 @@ -45,7 +45,7 @@ msgstr "Общая сумма" #. module: account_voucher #: view:account.voucher:0 msgid "Open Customer Journal Entries" -msgstr "" +msgstr "Открыть записи журнала по заказчику" #. module: account_voucher #: view:account.voucher:0 @@ -63,7 +63,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "(Update)" -msgstr "" +msgstr "(Обновить)" #. module: account_voucher #: view:account.voucher:0 @@ -90,7 +90,7 @@ msgstr "Март" #. module: account_voucher #: field:account.voucher,message_unread:0 msgid "Unread Messages" -msgstr "" +msgstr "Непрочитанные" #. module: account_voucher #: view:account.voucher:0 @@ -115,13 +115,13 @@ msgstr "Номер транзакции." #. module: account_voucher #: view:sale.receipt.report:0 msgid "Group by year of Invoice Date" -msgstr "" +msgstr "Группировать по году в дате счета" #. module: account_voucher #: view:sale.receipt.report:0 #: field:sale.receipt.report,user_id:0 msgid "Salesperson" -msgstr "" +msgstr "Продавец" #. module: account_voucher #: view:account.voucher:0 @@ -135,6 +135,8 @@ msgid "" "You can not change the journal as you already reconciled some statement " "lines!" msgstr "" +"Вы не можете изменить журнал, так как вы уже сверили некоторые позиции " +"документа!" #. module: account_voucher #: view:account.voucher:0 @@ -145,7 +147,7 @@ msgstr "Утвердить" #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment msgid "Supplier Payments" -msgstr "" +msgstr "Оплаты поставщикам" #. module: account_voucher #: model:ir.actions.act_window,help:account_voucher.action_purchase_receipt @@ -167,7 +169,7 @@ msgstr "Искать ваучеры" #. module: account_voucher #: field:account.voucher,writeoff_acc_id:0 msgid "Counterpart Account" -msgstr "" +msgstr "Корреспондирующий счет" #. module: account_voucher #: field:account.voucher,account_id:0 @@ -189,7 +191,7 @@ msgstr "OK" #. module: account_voucher #: field:account.voucher.line,reconcile:0 msgid "Full Reconcile" -msgstr "" +msgstr "Полная сверка" #. module: account_voucher #: field:account.voucher,date_due:0 @@ -207,7 +209,7 @@ msgstr "Примечания" #. module: account_voucher #: field:account.voucher,message_ids:0 msgid "Messages" -msgstr "" +msgstr "Сообщения" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_purchase_receipt @@ -225,7 +227,7 @@ msgstr "Элемент журнала" #: code:addons/account_voucher/account_voucher.py:981 #, python-format msgid "Error!" -msgstr "" +msgstr "Ошибка!" #. module: account_voucher #: field:account.voucher.line,amount:0 @@ -235,7 +237,7 @@ msgstr "Суммма" #. module: account_voucher #: view:account.voucher:0 msgid "Payment Options" -msgstr "" +msgstr "Варианты оплаты" #. module: account_voucher #: view:account.voucher:0 @@ -254,6 +256,8 @@ msgstr "Отменено" msgid "" "You have to configure account base code and account tax code on the '%s' tax!" msgstr "" +"Вы должны настроить код базового счета и код налогового счета для налога " +"'%s'!" #. module: account_voucher #: model:ir.actions.act_window,help:account_voucher.action_sale_receipt @@ -271,7 +275,7 @@ msgstr "" #. module: account_voucher #: help:account.voucher,message_unread:0 msgid "If checked new messages require your attention." -msgstr "" +msgstr "Если отмечено, новые сообщения требуют вашего внимания." #. module: account_voucher #: model:ir.model,name:account_voucher.model_account_bank_statement_line @@ -294,12 +298,12 @@ msgstr "Налог" #: code:addons/account_voucher/account_voucher.py:879 #, python-format msgid "Invalid Action!" -msgstr "" +msgstr "Неверное действие!" #. module: account_voucher #: field:account.voucher,comment:0 msgid "Counterpart Comment" -msgstr "" +msgstr "Корреспондирующий коментарий" #. module: account_voucher #: field:account.voucher.line,account_analytic_id:0 @@ -312,6 +316,8 @@ msgid "" "Holds the Chatter summary (number of messages, ...). This summary is " "directly in html format in order to be inserted in kanban views." msgstr "" +"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате " +"html для возможности использования в канбан виде" #. module: account_voucher #: view:account.voucher:0 @@ -326,7 +332,7 @@ msgstr "Информация о платеже" #. module: account_voucher #: view:account.voucher:0 msgid "(update)" -msgstr "" +msgstr "(обновить)" #. module: account_voucher #: view:account.voucher:0 @@ -395,7 +401,7 @@ msgstr "Ваучер поставщика" #. module: account_voucher #: field:account.voucher,message_follower_ids:0 msgid "Followers" -msgstr "" +msgstr "Подписчики" #. module: account_voucher #: selection:account.voucher.line,type:0 @@ -406,7 +412,7 @@ msgstr "Дебет" #: code:addons/account_voucher/account_voucher.py:1547 #, python-format msgid "Unable to change journal !" -msgstr "" +msgstr "Невозможно изменить журнал!" #. module: account_voucher #: view:sale.receipt.report:0 @@ -446,7 +452,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "Open Supplier Journal Entries" -msgstr "" +msgstr "Открыть журнал проводок по поставщику" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_review_voucher_list @@ -461,7 +467,7 @@ msgstr "Памятка" #. module: account_voucher #: view:account.voucher:0 msgid "Are you sure to unreconcile and cancel this record ?" -msgstr "" +msgstr "Вы уверены, что надо отменить сверку и саму запись ?" #. module: account_voucher #: field:account.voucher,is_multi_currency:0 @@ -494,13 +500,13 @@ msgstr "" #. module: account_voucher #: field:account.voucher,writeoff_amount:0 msgid "Difference Amount" -msgstr "" +msgstr "Сумма разницы" #. module: account_voucher #: view:sale.receipt.report:0 #: field:sale.receipt.report,due_delay:0 msgid "Avg. Due Delay" -msgstr "" +msgstr "Средн. задержка" #. module: account_voucher #: code:addons/account_voucher/invoice.py:34 @@ -554,7 +560,7 @@ msgstr "Оплаченная сумма" #. module: account_voucher #: field:account.voucher,payment_option:0 msgid "Payment Difference" -msgstr "" +msgstr "Оплата разницы" #. module: account_voucher #: view:account.voucher:0 @@ -568,7 +574,7 @@ msgstr "Для проверки" #: code:addons/account_voucher/account_voucher.py:1194 #, python-format msgid "change" -msgstr "" +msgstr "изменить" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:1014 @@ -599,7 +605,7 @@ msgstr "" #. module: account_voucher #: view:account.invoice:0 msgid "Register Payment" -msgstr "" +msgstr "Регистрация оплаты" #. module: account_voucher #: field:account.statement.from.invoice.lines,line_ids:0 @@ -614,7 +620,7 @@ msgstr "декабрём" #. module: account_voucher #: view:sale.receipt.report:0 msgid "Group by month of Invoice Date" -msgstr "" +msgstr "Группировать по месяцу даты счета" #. module: account_voucher #: view:sale.receipt.report:0 @@ -647,7 +653,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "Are you sure to unreconcile this record?" -msgstr "" +msgstr "Вы уверены в отмене сверки" #. module: account_voucher #: field:account.voucher,company_id:0 @@ -665,13 +671,13 @@ msgstr "" #. module: account_voucher #: selection:account.voucher,payment_option:0 msgid "Reconcile Payment Balance" -msgstr "" +msgstr "Сверка платежного баланса" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:975 #, python-format msgid "Configuration Error !" -msgstr "" +msgstr "Ошибка конфигурации !" #. module: account_voucher #: view:account.voucher:0 @@ -695,18 +701,18 @@ msgstr "" #: field:account.voucher,state:0 #: view:sale.receipt.report:0 msgid "Status" -msgstr "" +msgstr "Статус" #. module: account_voucher #: view:account.voucher:0 msgid "Allocation" -msgstr "" +msgstr "Распределение" #. module: account_voucher #: view:account.statement.from.invoice.lines:0 #: view:account.voucher:0 msgid "or" -msgstr "" +msgstr "или" #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -716,7 +722,7 @@ msgstr "Август" #. module: account_voucher #: view:account.voucher:0 msgid "Validate Payment" -msgstr "" +msgstr "Утвердить оплату" #. module: account_voucher #: help:account.voucher,audit:0 @@ -724,6 +730,8 @@ msgid "" "Check this box if you are unsure of that journal entry and if you want to " "note it as 'to be reviewed' by an accounting expert." msgstr "" +"Отметьте, если вы не уверены в этой проводке журнала и хотите отметить её " +"\"для проверки\" опытному бухгалтеру." #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -734,7 +742,7 @@ msgstr "Октябрь" #: code:addons/account_voucher/account_voucher.py:976 #, python-format msgid "Please activate the sequence of selected journal !" -msgstr "" +msgstr "Пожалуйста, включите нумерацию выбранного журнала!" #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -749,7 +757,7 @@ msgstr "" #. module: account_voucher #: field:account.voucher,paid:0 msgid "Paid" -msgstr "" +msgstr "Оплачено" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_sale_receipt @@ -760,7 +768,7 @@ msgstr "" #. module: account_voucher #: field:account.voucher,message_is_follower:0 msgid "Is a Follower" -msgstr "" +msgstr "Подписан" #. module: account_voucher #: field:account.voucher,analytic_id:0 @@ -787,7 +795,7 @@ msgstr "Расширенные фильтры..." #. module: account_voucher #: field:account.voucher,paid_amount_in_company_currency:0 msgid "Paid Amount in Company Currency" -msgstr "" +msgstr "Оплаченная сумма в валюте компании" #. module: account_voucher #: field:account.bank.statement.line,amount_reconciled:0 @@ -814,7 +822,7 @@ msgstr "Предыдущие платежи ?" #: code:addons/account_voucher/account_voucher.py:1112 #, python-format msgid "The invoice you are willing to pay is not valid anymore." -msgstr "" +msgstr "Счет, который вы готовы платить, уже не актуален ." #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -830,30 +838,30 @@ msgstr "Журнал ваучеров" #. module: account_voucher #: model:ir.model,name:account_voucher.model_res_company msgid "Companies" -msgstr "" +msgstr "Компании" #. module: account_voucher #: field:account.voucher,message_summary:0 msgid "Summary" -msgstr "" +msgstr "Итог" #. module: account_voucher #: field:account.voucher,active:0 msgid "Active" -msgstr "" +msgstr "Активно" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:982 #, python-format msgid "Please define a sequence on the journal." -msgstr "" +msgstr "Пожалуйста, определите нумерацию журнала." #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.act_pay_voucher #: model:ir.actions.act_window,name:account_voucher.action_vendor_receipt #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_receipt msgid "Customer Payments" -msgstr "" +msgstr "Платежи клиентов" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_sale_receipt_report_all @@ -865,7 +873,7 @@ msgstr "" #. module: account_voucher #: view:sale.receipt.report:0 msgid "Group by Invoice Date" -msgstr "" +msgstr "Группировать по дате счета" #. module: account_voucher #: view:account.voucher:0 diff --git a/addons/account_voucher/invoice.py b/addons/account_voucher/invoice.py index 03a3e5fab67..c11f9d532e9 100644 --- a/addons/account_voucher/invoice.py +++ b/addons/account_voucher/invoice.py @@ -41,6 +41,7 @@ class invoice(osv.osv): 'target': 'new', 'domain': '[]', 'context': { + 'payment_expected_currency': inv.currency_id.id, 'default_partner_id': self.pool.get('res.partner')._find_accounting_partner(inv.partner_id).id, 'default_amount': inv.type in ('out_refund', 'in_refund') and -inv.residual or inv.residual, 'default_reference': inv.name, diff --git a/addons/account_voucher/security/account_voucher_security.xml b/addons/account_voucher/security/account_voucher_security.xml index 04540fd8aa0..daa5934b256 100644 --- a/addons/account_voucher/security/account_voucher_security.xml +++ b/addons/account_voucher/security/account_voucher_security.xml @@ -3,13 +3,13 @@ Voucher multi-company - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Voucher Line multi-company - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/account_voucher/test/account_voucher.yml b/addons/account_voucher/test/account_voucher.yml index c9270dc695c..2cd612affc7 100644 --- a/addons/account_voucher/test/account_voucher.yml +++ b/addons/account_voucher/test/account_voucher.yml @@ -6,7 +6,7 @@ account_id: account.cash amount: 1000.0 company_id: base.main_company - journal_id: account.bank_journal + journal_id: account.sales_journal name: Voucher for Axelor narration: Basic Pc line_cr_ids: diff --git a/addons/account_voucher/test/case1_usd_usd_payment_rate.yml b/addons/account_voucher/test/case1_usd_usd_payment_rate.yml new file mode 100644 index 00000000000..037fc1497ec --- /dev/null +++ b/addons/account_voucher/test/case1_usd_usd_payment_rate.yml @@ -0,0 +1,247 @@ +- + In order to check the Account_voucher module with multi-currency in OpenERP, + I create 2 Invoices in USD and make 1 Payment in USD based on the currency rating given by the bank which is slightly different that the one encoded in OpenERP +- + I set the income and expense currency accounts on the main company +- + !python {model: res.company}: | + from datetime import datetime + vals = { + 'income_currency_exchange_account_id': ref('account.o_expense'), + 'expense_currency_exchange_account_id': ref('account.o_expense')} + self.write(cr, uid, ref('base.main_company'), vals) +- + I create currency USD in OpenERP for January of 1.333333 Rate +- + !python {model: res.currency.rate}: | + from datetime import datetime + curr_id = self.pool.get('res.currency').search(cr, uid, [('name', '=', 'USD')])[0] + 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 currency USD in OpenERP for February of 1.250000 Rate +- + !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 currency USD in OpenERP for March of 1.111111 Rate +- + !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 currency USD in OpenERP for April of 1.052632 Rate +- + !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 cash account with currency USD +- + !record {model: account.account, id: account_cash_usd_id}: + currency_id: base.USD + name: "cash account in usd" + code: "Xcash usd" + type: 'liquidity' + user_type: "account.data_account_type_cash" + +- + 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_usd_id + default_credit_account_id: account_cash_usd_id + currency: base.USD + company_id: base.main_company + +- + I create a new partner Kate Mc Kay +- + !record {model: res.partner, id: res_partner_mc_kay}: + name: "Mc Kay Kate" + property_account_receivable: account.a_recv + property_account_payable: account.a_pay +- + I create the first invoice on 1st January for 200 USD +- + !record {model: account.invoice, id: account_invoice_jan_payment_rate}: + account_id: account.a_recv + 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: '[PCSC234] PC Assemble SC234' + price_unit: 200.0 + quantity: 1.0 + product_id: product.product_product_3 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_mc_kay + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_jan_payment_rate} +- + 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_payment_rate")) + 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 not correct for debtors account" +- + I create the second invoice on 1st February for 100 USD +- + !record {model: account.invoice, id: account_invoice_feb_payment_rate}: + account_id: account.a_recv + 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: '[PCSC234] PC Assemble SC234' + price_unit: 100.0 + quantity: 1.0 + product_id: product.product_product_3 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: res_partner_mc_kay + reference_type: none +- + I Validate invoice by clicking on Validate button +- + !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_feb_payment_rate} +- + 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_payment_rate")) + 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 not correct for debtors account" + +- + I set the context that will be used for the encoding of all the vouchers of this file +- + !context + 'type': 'receipt' +- + On the first March, I create the first voucher of payment with values 240 USD, journal USD, and specifying that $1 = 0.8€ +- + !record {model: account.voucher, id: account_voucher_1_case1_payment_rate, view: view_vendor_receipt_form}: + account_id: account.cash + amount: 240.0 + company_id: base.main_company + journal_id: bank_journal_USD + name: 'Payment: Case 1 USD/USD payment rate' + partner_id: res_partner_mc_kay + period_id: account.period_3 + date: !eval time.strftime("%Y-03-01") + payment_option: 'with_writeoff' + writeoff_acc_id: account.a_expense + comment: 'Write Off' + payment_rate: 0.8 + payment_rate_currency_id: base.EUR + +- + I fill amounts 180 for the invoice of 200$ and 70 for the invoice of 100$> +- + !python {model: account.voucher}: | + vals = {} + voucher_id = self.browse(cr, uid, ref('account_voucher_1_case1_payment_rate')) + data = [] + for item in voucher_id.line_cr_ids: + if item.amount_unreconciled == 200.00: + data += [(item.id, 180.0)] + else: + data += [(item.id, 70.0)] + for line_id, amount in data: + self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount}) + assert (voucher_id.state=='draft'), "Voucher is not in draft state" +- + I check that writeoff amount computed is -10.0 +- + !python {model: account.voucher}: | + voucher = ref('account_voucher_1_case1_payment_rate') + voucher_id = self.browse(cr, uid, voucher) + assert (voucher_id.writeoff_amount == -10.0), "Writeoff amount is not -10.0" +- + I confirm the voucher +- + !python {model: account.voucher}: | + voucher = ref('account_voucher_1_case1_payment_rate') + self.signal_proforma_voucher(cr, uid, [voucher]) +- + I check that the move of my first voucher is valid +- + !python {model: account.voucher}: | + voucher = ref('account_voucher_1_case1_payment_rate') + voucher_id = self.browse(cr, uid, voucher) + 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 that their credit columns are respectively 144 and 56 +- + I check that my write-off is correct. 8 debit and 10 amount_currency +- + !python {model: account.voucher}: | + voucher = ref('account_voucher_1_case1_payment_rate') + voucher_id = self.browse(cr, uid, voucher) + 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.00: + assert move_line.credit == 144.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.amount_currency == 10.00: + assert move_line.debit == 8.00, "Writeoff amount is wrong: Got a debit of %s (expected 8,00€)" % (move_line.debit) + elif move_line.amount_currency == 240.00: + assert move_line.debit == 192.00, "Bank entry is wrong." + else: + assert False, "Unrecognized journal entry" +- + I check the residual amount of Invoice1, should be 20 in amount_currency and 6 in amount_residual +- + !python {model: account.invoice}: | + invoice_id = self.browse(cr, uid, ref("account_invoice_jan_payment_rate")) + 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 == 6.0) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 20.0) , "Residual amount in currency 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_payment_rate")) + 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 == 24.0) , "Residual amount is not correct for second Invoice" + assert (move_line.amount_residual_currency == 30.0) , "Residual amount in currency is not correct for second Invoice" diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml index 02dd82f5c14..f523e312933 100644 --- a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml @@ -201,7 +201,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]) - assert (move_line.amount_residual_currency == 55.56 and move_line.amount_residual == 20) , "Residual amount is not correct for first Invoice" + assert (move_line.amount_residual_currency == 55.56 and move_line.amount_residual == 20) , "Residual amount is not correct for first Invoice. Got %s USD (%s EUR)" %(move_line.amount_residual_currency, move_line.amount_residual) - I check the residual amuont of Invoice2, should be 22.22 in residual currency and 10 in amount_residual - diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index a0ef13d96aa..90c36e371bf 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -161,7 +161,7 @@ - I check that the debtor account has 1 new line with -298.78 as amount_currency columns and 149.39 of credit and currency is CAD. - - I check that my currency rate difference is correct. 0 in debit with no amount_currency + I check that my currency rate difference is correct. 0 in debit with 98.78 CAD as amount_currency - I check that my writeoff is correct. 11.05 credit and -13.26 amount_currency - @@ -176,7 +176,8 @@ elif move_line.amount_currency == -298.78: assert move_line.credit == 149.39, "Debtor account has wrong entry." elif move_line.debit == 0.00 and move_line.credit == 0.00: - assert move_line.amount_currency == 0.00, "Incorrect Currency Difference." + assert move_line.amount_currency == 98.78, "Incorrect Currency Difference, got %s as amount_currency (expected 98.78)." % (move_line.amount_currency) + assert move_line.currency_id.id == ref('base.CAD'), "Incorrect Currency Difference, got %s (expected 'CAD')" % (move_line.currency_id.name) elif move_line.credit == 10.61: assert move_line.amount_currency == -13.26, "Writeoff amount is wrong." else: diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 94f0c718980..8dce677fd9a 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -41,7 +41,7 @@ currency: base.USD company_id: base.main_company - - I create an invoice + On the first of January, I create an invoice of 1000€ - !record {model: account.invoice, id: account_invoice_eur_usd}: account_id: account.a_recv @@ -79,7 +79,7 @@ !context 'type': 'receipt' - - I create the voucher of payment with values 1350 USD, journal USD, + On the first of February, I create the voucher of payment with values 1350 USD, journal USD, - !record {model: account.voucher, id: account_voucher_eur_usd_case, view: view_vendor_receipt_form}: account_id: account.cash diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 109c2f9aec9..dea94d59f4e 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -46,6 +46,9 @@
+ + + account.voucher.payment.low.priority.form account.voucher @@ -107,7 +110,7 @@ - + @@ -119,6 +122,7 @@ + account.voucher.payment.form account.voucher @@ -157,7 +161,7 @@ + account.voucher.receipt.form account.voucher @@ -467,10 +482,14 @@ - + - - + diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index 6a84a09d5e6..dc732129803 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -145,6 +145,13 @@ + + + + + + +
@@ -237,6 +244,7 @@ on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)" groups="account.group_account_user"/> + diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml index 70688275de2..bf103ca8988 100644 --- a/addons/analytic/security/analytic_security.xml +++ b/addons/analytic/security/analytic_security.xml @@ -4,14 +4,14 @@ Analytic multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Analytic line multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 025f1f79f70..0477efa5b1f 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -543,6 +543,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): fixes = group(fixes, ('model_name', 'field_name')) for line in data: + queries = [] table_name = self.pool[line['model_id']]._table if line['model_id'] in self.pool else None # check if custom sql exists: diff --git a/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.eot b/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.eot old mode 100755 new mode 100644 diff --git a/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.svg b/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.svg old mode 100755 new mode 100644 diff --git a/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.ttf b/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.ttf old mode 100755 new mode 100644 diff --git a/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.woff b/addons/auth_oauth/static/lib/zocial/css/zocial-regular-webfont.woff old mode 100755 new mode 100644 diff --git a/addons/auth_openid/i18n/ru.po b/addons/auth_openid/i18n/ru.po index 6041300fe60..68b36626056 100644 --- a/addons/auth_openid/i18n/ru.po +++ b/addons/auth_openid/i18n/ru.po @@ -8,21 +8,21 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-03-23 11:37+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-05-28 06:19+0000\n" +"Last-Translator: Глория Хрусталёва \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-24 04:45+0000\n" -"X-Generator: Launchpad (build 16540)\n" +"X-Launchpad-Export-Date: 2013-05-29 05:37+0000\n" +"X-Generator: Launchpad (build 16640)\n" #. module: auth_openid #. openerp-web #: code:addons/auth_openid/static/src/xml/auth_openid.xml:24 #, python-format msgid "Username" -msgstr "" +msgstr "Имя пользователя" #. module: auth_openid #. openerp-web @@ -30,7 +30,7 @@ msgstr "" #: view:res.users:0 #, python-format msgid "OpenID" -msgstr "" +msgstr "OpenID" #. module: auth_openid #. openerp-web @@ -46,14 +46,14 @@ msgstr "" #: code:addons/auth_openid/static/src/xml/auth_openid.xml:10 #, python-format msgid "Google" -msgstr "" +msgstr "Google" #. module: auth_openid #. openerp-web #: code:addons/auth_openid/static/src/xml/auth_openid.xml:11 #, python-format msgid "Launchpad" -msgstr "" +msgstr "Launchpad" #. module: auth_openid #: help:res.users,openid_email:0 @@ -82,7 +82,7 @@ msgstr "" #: code:addons/auth_openid/static/src/xml/auth_openid.xml:8 #, python-format msgid "Password" -msgstr "" +msgstr "Пароль" #. module: auth_openid #. openerp-web @@ -94,4 +94,4 @@ msgstr "" #. module: auth_openid #: model:ir.model,name:auth_openid.model_res_users msgid "Users" -msgstr "" +msgstr "Пользователи" diff --git a/addons/auth_openid/res_users.py b/addons/auth_openid/res_users.py index 47e119f2a1e..897dea07982 100644 --- a/addons/auth_openid/res_users.py +++ b/addons/auth_openid/res_users.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python ############################################################################## # # OpenERP, Open Source Management Solution diff --git a/addons/auth_openid/utils.py b/addons/auth_openid/utils.py index 806198f99c2..0474e23fe4b 100644 --- a/addons/auth_openid/utils.py +++ b/addons/auth_openid/utils.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python ############################################################################## # # OpenERP, Open Source Management Solution diff --git a/addons/auth_signup/i18n/ru.po b/addons/auth_signup/i18n/ru.po index bddc6cde1ba..639a1e9bc3c 100644 --- a/addons/auth_signup/i18n/ru.po +++ b/addons/auth_signup/i18n/ru.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-12-11 06:59+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-05-27 12:12+0000\n" +"Last-Translator: Глория Хрусталёва \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:52+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-28 05:17+0000\n" +"X-Generator: Launchpad (build 16640)\n" #. module: auth_signup #: field:res.partner,signup_type:0 @@ -25,25 +25,25 @@ msgstr "" #. module: auth_signup #: field:base.config.settings,auth_signup_uninvited:0 msgid "Allow external users to sign up" -msgstr "" +msgstr "Разрешить регистрацию внешним пользователям" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:16 #, python-format msgid "Confirm Password" -msgstr "" +msgstr "Подтвердите пароль" #. module: auth_signup #: help:base.config.settings,auth_signup_uninvited:0 msgid "If unchecked, only invited users may sign up." msgstr "" -"Если отмечено, только приглашенные пользователи могут зарегистрироваться" +"Если не отмечено, только приглашенные пользователи могут зарегистрироваться" #. module: auth_signup #: model:ir.model,name:auth_signup.model_base_config_settings msgid "base.config.settings" -msgstr "" +msgstr "base.config.settings" #. module: auth_signup #: code:addons/auth_signup/res_users.py:265 @@ -57,17 +57,17 @@ msgstr "Невозможно отправить письмо: у пользов #: code:addons/auth_signup/static/src/xml/auth_signup.xml:28 #, python-format msgid "Reset password" -msgstr "" +msgstr "Сброс пароля" #. module: auth_signup #: field:base.config.settings,auth_signup_template_user_id:0 msgid "Template user for new users created through signup" -msgstr "" +msgstr "Шаблон новых пользователей, созданных в процессе регистрации" #. module: auth_signup #: model:email.template,subject:auth_signup.reset_password_email msgid "Password reset" -msgstr "" +msgstr "Сброс пароля" #. module: auth_signup #. openerp-web @@ -88,12 +88,12 @@ msgstr "" #: code:addons/auth_signup/static/src/xml/auth_signup.xml:26 #, python-format msgid "Sign Up" -msgstr "" +msgstr "Регистрация" #. module: auth_signup #: selection:res.users,state:0 msgid "New" -msgstr "" +msgstr "Новый" #. module: auth_signup #: code:addons/auth_signup/res_users.py:258 @@ -104,7 +104,7 @@ msgstr "" #. module: auth_signup #: field:res.users,state:0 msgid "Status" -msgstr "" +msgstr "Статус" #. module: auth_signup #: model:email.template,body_html:auth_signup.reset_password_email @@ -118,18 +118,27 @@ msgid "" "\n" "

Note: If you do not expect this, you can safely ignore this email.

" msgstr "" +"\n" +"

Был запрошен сброс пароля для аккаунта OpenERP связанного с этим адресом " +"эл.почты

\n" +"\n" +"

Вы можете сменить пароль, проследовав по ссылке.

\n" +"\n" +"

Примечание: если вы не запрашивали сброс пароля, просто проигнорируйте " +"данное письмо

" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/js/auth_signup.js:111 #, python-format msgid "Please enter a name." -msgstr "" +msgstr "Пожалуйста, введите имя" #. module: auth_signup #: model:ir.model,name:auth_signup.model_res_users msgid "Users" -msgstr "" +msgstr "Пользователи" #. module: auth_signup #: field:res.partner,signup_url:0 @@ -146,7 +155,7 @@ msgstr "Пожалуйста, введите имя пользователя." #. module: auth_signup #: selection:res.users,state:0 msgid "Active" -msgstr "" +msgstr "Активен" #. module: auth_signup #: code:addons/auth_signup/res_users.py:269 @@ -155,39 +164,41 @@ msgid "" "Cannot send email: no outgoing email server configured.\n" "You can configure it under Settings/General Settings." msgstr "" +"Невозможно отправить email: не настроены сервера исходящей почты.\n" +"Вы можете настроить их в меню Настройки/Общие настройки" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:12 #, python-format msgid "Username" -msgstr "" +msgstr "Имя пользователя" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:8 #, python-format msgid "Name" -msgstr "" +msgstr "Имя" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/js/auth_signup.js:170 #, python-format msgid "Please enter a username or email address." -msgstr "" +msgstr "Пожалуйста, введите имя пользователя или адрес эл. почты." #. module: auth_signup #: selection:res.users,state:0 msgid "Resetting Password" -msgstr "" +msgstr "Переустановка пароля" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:13 #, python-format msgid "Username (Email)" -msgstr "" +msgstr "Имя пользователя (Email)" #. module: auth_signup #: field:res.partner,signup_expiration:0 @@ -198,13 +209,15 @@ msgstr "" #: help:base.config.settings,auth_signup_reset_password:0 msgid "This allows users to trigger a password reset from the Login page." msgstr "" +"Это позволяет пользователям запросить сброс пароля со страницы входа в " +"систему." #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:22 #, python-format msgid "Log in" -msgstr "" +msgstr "Вход" #. module: auth_signup #: field:res.partner,signup_valid:0 @@ -222,7 +235,7 @@ msgstr "" #: code:addons/auth_signup/static/src/js/auth_signup.js:170 #, python-format msgid "Login" -msgstr "" +msgstr "Вход" #. module: auth_signup #. openerp-web @@ -236,7 +249,7 @@ msgstr "" #: code:addons/auth_signup/static/src/js/auth_signup.js:120 #, python-format msgid "Passwords do not match; please retype them." -msgstr "" +msgstr "Пароли не совпадают; пожалуйста, введите их заново." #. module: auth_signup #. openerp-web @@ -244,7 +257,7 @@ msgstr "" #: code:addons/auth_signup/static/src/js/auth_signup.js:167 #, python-format msgid "No database selected !" -msgstr "" +msgstr "Не выбрана база данных!" #. module: auth_signup #: view:res.users:0 @@ -254,14 +267,14 @@ msgstr "" #. module: auth_signup #: field:base.config.settings,auth_signup_reset_password:0 msgid "Enable password reset from Login page" -msgstr "" +msgstr "Включить сброс пароля со страницы входа" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:27 #, python-format msgid "Back to Login" -msgstr "" +msgstr "Вернуться к странице входа" #. module: auth_signup #. openerp-web @@ -273,7 +286,7 @@ msgstr "" #. module: auth_signup #: model:ir.model,name:auth_signup.model_res_partner msgid "Partner" -msgstr "" +msgstr "Партнер" #. module: auth_signup #: field:res.partner,signup_token:0 diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index f4a985280ac..891837f8813 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -23,6 +23,7 @@ import random from urllib import urlencode from urlparse import urljoin +from openerp.addons.base.ir.ir_mail_server import MailDeliveryException from openerp.osv import osv, fields from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT from openerp.tools.safe_eval import safe_eval @@ -55,19 +56,22 @@ class res_partner(osv.Model): def _get_signup_url_for_action(self, cr, uid, ids, action='login', view_type=None, menu_id=None, res_id=None, model=None, context=None): """ generate a signup url for the given partner ids and action, possibly overriding the url state components (menu_id, id, view_type) """ + if context is None: + context= {} res = dict.fromkeys(ids, False) base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') for partner in self.browse(cr, uid, ids, context): # when required, make sure the partner has a valid signup token - if context and context.get('signup_valid') and not partner.user_ids: + if context.get('signup_valid') and not partner.user_ids: self.signup_prepare(cr, uid, [partner.id], context=context) partner.refresh() # the parameters to encode for the query and fragment part of url query = {'db': cr.dbname} - fragment = {'action': action, 'type': partner.signup_type} + signup_type = context.get('signup_force_type_in_url', partner.signup_type or '') + fragment = {'action': action, 'type': signup_type} - if partner.signup_token: + if partner.signup_token and signup_type: fragment['token'] = partner.signup_token elif partner.user_ids: fragment['db'] = cr.dbname @@ -103,6 +107,9 @@ class res_partner(osv.Model): def action_signup_prepare(self, cr, uid, ids, context=None): return self.signup_prepare(cr, uid, ids, context=context) + def signup_cancel(self, cr, uid, ids, context=None): + return self.write(cr, uid, ids, {'signup_token': False, 'signup_type': False, 'signup_expiration': False}, context=context) + def signup_prepare(self, cr, uid, ids, signup_type="signup", expiration=False, context=None): """ generate a new token for the partners with the given validity, if necessary :param expiration: the expiration datetime of the token (string, optional) @@ -202,7 +209,7 @@ class res_users(osv.Model): }) if partner.company_id: values['company_id'] = partner.company_id.id - values['company_ids'] = [(6,0,[partner.company_id.id])] + values['company_ids'] = [(6, 0, [partner.company_id.id])] self._signup_create_user(cr, uid, values, context=context) else: # no token, sign up an external user @@ -259,25 +266,26 @@ class res_users(osv.Model): pass if not bool(template): template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email') - mail_obj = self.pool.get('mail.mail') assert template._name == 'email.template' for user in self.browse(cr, uid, ids, context): if not user.email: raise osv.except_osv(_("Cannot send email: user has no email address."), user.name) - mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, True, context=context) - mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context) - - if mail_state and mail_state['state'] == 'exception': - raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context) - else: - return True + try: + self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, force_send=True, raise_exception=True, context=context) + except Exception: + raise def create(self, cr, uid, values, context=None): + if context is None: + context = {} # overridden to automatically invite user to sign up user_id = super(res_users, self).create(cr, uid, values, context=context) user = self.browse(cr, uid, user_id, context=context) - if context and context.get('reset_password') and user.email: - ctx = dict(context, create_user=True) - self.action_reset_password(cr, uid, [user.id], context=ctx) + if user.email and not context.get('no_reset_password'): + context.update({'create_user': True}) + try: + self.action_reset_password(cr, uid, [user.id], context=context) + except MailDeliveryException: + self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context) return user_id diff --git a/addons/auth_signup/res_users_view.xml b/addons/auth_signup/res_users_view.xml index 28f66eb101d..60c419db737 100644 --- a/addons/auth_signup/res_users_view.xml +++ b/addons/auth_signup/res_users_view.xml @@ -31,9 +31,11 @@
@@ -343,7 +344,7 @@ help="Leads that are assigned to me"/> + help="Leads that are assigned to any sales teams I am member of" groups="base.group_multi_salesteams"/> - + @@ -362,7 +363,7 @@ - + @@ -556,7 +557,7 @@ -
- + @@ -608,5 +609,22 @@
+ + Mark As Lost + + code + + if context.get('active_model') == 'crm.lead' and context.get('active_ids'): + self.case_cancel(cr, uid, context['active_ids'], context=context) + + + + + + + Mark As Lost + + + diff --git a/addons/crm/crm_phonecall_demo.xml b/addons/crm/crm_phonecall_demo.xml index f441c29a7e6..4002e18815e 100644 --- a/addons/crm/crm_phonecall_demo.xml +++ b/addons/crm/crm_phonecall_demo.xml @@ -37,7 +37,7 @@ Ask for convenient time of meeting open +1 786 525 0724 - + @@ -50,7 +50,7 @@ done (077) 582-4035 (077) 341-3591 - + @@ -74,7 +74,7 @@ Proposal for discount offer open +34 230 953 485 - + diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 63385fa3e17..a84ae553b4a 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -101,7 +101,7 @@ - + diff --git a/addons/crm/html/Stephan-Keller.jpg b/addons/crm/html/Stephan-Keller.jpg new file mode 100644 index 00000000000..57464ea0b2b Binary files /dev/null and b/addons/crm/html/Stephan-Keller.jpg differ diff --git a/addons/crm/html/claudia-sebastiani.jpg b/addons/crm/html/claudia-sebastiani.jpg new file mode 100644 index 00000000000..f24ba95189a Binary files /dev/null and b/addons/crm/html/claudia-sebastiani.jpg differ diff --git a/addons/crm/html/crm_game.png b/addons/crm/html/crm_game.png new file mode 100644 index 00000000000..b5416926793 Binary files /dev/null and b/addons/crm/html/crm_game.png differ diff --git a/addons/crm/html/crm_game_01.png b/addons/crm/html/crm_game_01.png new file mode 100644 index 00000000000..a3cd109c2de Binary files /dev/null and b/addons/crm/html/crm_game_01.png differ diff --git a/addons/crm/html/crm_game_02.png b/addons/crm/html/crm_game_02.png new file mode 100644 index 00000000000..1a747e1ffe8 Binary files /dev/null and b/addons/crm/html/crm_game_02.png differ diff --git a/addons/crm/html/crm_game_03.png b/addons/crm/html/crm_game_03.png new file mode 100644 index 00000000000..2fd14886179 Binary files /dev/null and b/addons/crm/html/crm_game_03.png differ diff --git a/addons/crm/html/crm_linkedin.png b/addons/crm/html/crm_linkedin.png new file mode 100644 index 00000000000..e40563dbfc7 Binary files /dev/null and b/addons/crm/html/crm_linkedin.png differ diff --git a/addons/crm/html/crm_sc_01.jpg b/addons/crm/html/crm_sc_01.jpg new file mode 100644 index 00000000000..7a2a44d7b0d Binary files /dev/null and b/addons/crm/html/crm_sc_01.jpg differ diff --git a/addons/crm/html/crm_sc_01.png b/addons/crm/html/crm_sc_01.png new file mode 100644 index 00000000000..8f1ff1e95fe Binary files /dev/null and b/addons/crm/html/crm_sc_01.png differ diff --git a/addons/crm/html/crm_sc_02.png b/addons/crm/html/crm_sc_02.png new file mode 100644 index 00000000000..e20c44836ba Binary files /dev/null and b/addons/crm/html/crm_sc_02.png differ diff --git a/addons/crm/html/crm_sc_04a.png b/addons/crm/html/crm_sc_04a.png new file mode 100644 index 00000000000..d0308e3f68b Binary files /dev/null and b/addons/crm/html/crm_sc_04a.png differ diff --git a/addons/crm/html/crm_sc_04b.png b/addons/crm/html/crm_sc_04b.png new file mode 100644 index 00000000000..57b7965771e Binary files /dev/null and b/addons/crm/html/crm_sc_04b.png differ diff --git a/addons/crm/html/crm_sc_04c.png b/addons/crm/html/crm_sc_04c.png new file mode 100644 index 00000000000..d3c4dbae043 Binary files /dev/null and b/addons/crm/html/crm_sc_04c.png differ diff --git a/addons/crm/html/crm_sc_04d.png b/addons/crm/html/crm_sc_04d.png new file mode 100644 index 00000000000..687bdfb971f Binary files /dev/null and b/addons/crm/html/crm_sc_04d.png differ diff --git a/addons/crm/html/crm_sc_05.png b/addons/crm/html/crm_sc_05.png new file mode 100644 index 00000000000..b71ce805250 Binary files /dev/null and b/addons/crm/html/crm_sc_05.png differ diff --git a/addons/crm/html/crm_sc_06.png b/addons/crm/html/crm_sc_06.png new file mode 100644 index 00000000000..1da7d5e841f Binary files /dev/null and b/addons/crm/html/crm_sc_06.png differ diff --git a/addons/crm/html/crm_sc_08.png b/addons/crm/html/crm_sc_08.png new file mode 100644 index 00000000000..b47d9738cf9 Binary files /dev/null and b/addons/crm/html/crm_sc_08.png differ diff --git a/addons/crm/html/crm_sc_agenda.png b/addons/crm/html/crm_sc_agenda.png new file mode 100644 index 00000000000..a0f57eb4bca Binary files /dev/null and b/addons/crm/html/crm_sc_agenda.png differ diff --git a/addons/crm/html/crm_sc_marketing.png b/addons/crm/html/crm_sc_marketing.png new file mode 100644 index 00000000000..f7662587969 Binary files /dev/null and b/addons/crm/html/crm_sc_marketing.png differ diff --git a/addons/crm/html/index.html b/addons/crm/html/index.html new file mode 100644 index 00000000000..5ae542f5c91 --- /dev/null +++ b/addons/crm/html/index.html @@ -0,0 +1,252 @@ +
+
+
+

Customer Relationship Management

+

Boost sales productivity, improve win rates, grow revenue

+
+
+
+ + + + +
+
+
+

+Manage your sales funnel with no effort. Attract leads, follow-up on phone calls and meetings. Analyse the quality of your leads to make informed decisions and save time by integrating emails directly into the application. +

+ +
+
+
+ +
+
+

Your Sales Funnel, The Way You Like It

+
+

+Track your opportunities pipeline with the revolutionary kanban view. Work inside your sales funnel and get instant visual information about next actions, new messages, top opportunities and expected revenues. +

+
+
+
+ +
+
+
+
+ +
+
+

Social Network Integration

+
+
+ +
+
+
+

+Bring social intelligence to your sales process. Gain insights from social media site LinkedIn to find prospects easily and load their data automatically into your address book. +

+
+
+
+ + +
+
+

Lead Management Made Easy

+
+

+Create leads automatically from incoming emails. Analyse leads efficiency and compare performance by campaigns, channels or sales team. +

+

+Find duplicates, merge leads and assign them to the right salesperson in one operation. Spend less time on administration and more time on qualifying leads. +

+
+
+
+ +
+
+
+
+ +
+
+

Organize Your Opportunities

+

A clean user interface with everything in one screen

+
+
+ +
+
+
+

+Get your opportunities organized to stay focused on the best deals. Manage all your customer interactions from the opportunity like emails, phone calls, internal notes, meetings and quotations. +

+Follow opportunities that interrests you to get notified upon specific events: deal won or lost, stage changed, new customer demand, etc. +

+
+
+
+ +
+
+

Email Integration and Automation

+
+

+Work with the email applications you already use every day. Whether your company uses Microsoft Outlook or Gmail, no one needs to change the way they work, so everyone stays productive. +

+Route, sort and filter incoming emails automatically. OpenERP CRM handles incoming emails and route them to the right opportunities or sales team. New leads are created on the fly and interested salespersons are notified automatically. +

+
+
+
+ +
+
+
+
+ +
+
+

Collaborative Agenda

+
+
+ +
+
+
+

+Schedule your meetings and phone calls using the integrated calendar. You can see your agenda and your colleagues' in one view. As a manager, it's easy to see what your team is busy with. +

+
+
+
+ +
+
+

Lead Automation and Marketing Campaigns

+

Drive performance by automating tasks

+
+

+ Use our marketing campaigns to automate lead acquisition, follow ups and promotions. Define automated actions (e.g. ask a salesperson to call, send an email, ...) based on triggers (no activity since 20 days, answered a promotional email, etc.) +

+ Optimize campaigns from lead to close, on every channel. Make smarter decisions about where to invest and show the impact of your marketing activities on your company's bottom line. +

+
+
+
+ +
+
+
+
+ +
+
+

Customize Your Sales Cycle

+

It Fits Your Sales Approach

+

+Customize your sales cycle by configuring sales stages that perfectly fit your sales approach. Control statistics to get accurate forecasts to improve your sales performance at every stage of your customer relationship. +

+
+ + + + +
+
+
+ +
+
+

Reporting and Dashboards

+

Get access to the right information to take smart decisions

+
+
+ +
+
+
+

+Get the insights you need to make smarter decisions. Design custom dashboards to get a picture of your business at a glance. Dig deeper with real-time reports that anyone can create and share. +

+
+
+
+ +
+
+

Drive Engagement with Gamification

+

Leverage sales' natural desire for competition

+

+ Reinforce good habits and improve win rates with real-time recognition and rewards inspired by game mechanics. Align sales teams around clear business objectives with challenges, personal objectives and team leader boards. +

+
+

Leaderboards

+
+ +
+

+ Promote leaders and competition amongst sales team with performance ratios. +

+
+
+

Personnal Objectives

+
+ +
+

+ Assign clear goals to users to align them with the company objectives. +

+
+
+

Team Targets

+
+ +
+

+ Compare revenues with forecasts and budgets in real time. +

+
+
+
+ +
+
+
+

Many companies already enjoy it

+

Hear what they have to say !

+
+
+
+ + With OpenERP CRM I keep all the information about leads and customers + in a single place, and share it with my colleagues. It's great and effective. + + + +
Claudia Sebastiani
+
Sales manager at CQ Creativi Quadrati.
+
+
+
+
+
+ + I am surprised by how good OpenERP CRM is. Awesome product. + + + +
Stephan Keller
+
CEO of Sodexis, Inc.
+
+
+
+
+
diff --git a/addons/crm/i18n/ru.po b/addons/crm/i18n/ru.po index 19ae76e9f46..ec2a9f35ee5 100644 --- a/addons/crm/i18n/ru.po +++ b/addons/crm/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-03-01 11:27+0000\n" -"Last-Translator: Антон Лаврёнов \n" +"PO-Revision-Date: 2013-05-30 13:52+0000\n" +"Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:09+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-31 05:38+0000\n" +"X-Generator: Launchpad (build 16660)\n" #. module: crm #: view:crm.lead.report:0 @@ -452,7 +452,7 @@ msgstr "# Предложений" #, python-format msgid "" "Please select more than one element (lead or opportunity) from the list view." -msgstr "" +msgstr "Пожалуйста, выберите хотя бы один элемент из списка ниже." #. module: crm #: view:crm.lead:0 @@ -1108,7 +1108,7 @@ msgstr "Удалить" #. module: crm #: model:mail.message.subtype,description:crm.mt_lead_create msgid "Opportunity created" -msgstr "" +msgstr "Предложение создано" #. module: crm #: view:crm.lead:0 @@ -1397,7 +1397,7 @@ msgstr "Сделать" #. module: crm #: model:mail.message.subtype,description:crm.mt_lead_lost msgid "Opportunity lost" -msgstr "" +msgstr "Предложение отклонено" #. module: crm #: field:crm.lead2opportunity.partner,action:0 @@ -1446,7 +1446,7 @@ msgstr "Пользователи" #. module: crm #: model:mail.message.subtype,name:crm.mt_lead_stage msgid "Stage Changed" -msgstr "" +msgstr "Стадия изменена" #. module: crm #: field:crm.case.stage,section_ids:0 @@ -1759,7 +1759,7 @@ msgstr "Способ оплаты" #. module: crm #: model:ir.model,name:crm.model_crm_lead2opportunity_partner_mass msgid "Mass Lead To Opportunity Partner" -msgstr "Массовое проведение предложений партнёру" +msgstr "Массовое преобразование кандидатов в предложения" #. module: crm #: view:sale.config.settings:0 @@ -1917,7 +1917,7 @@ msgstr "Сделать" #: model:mail.message.subtype,name:crm.mt_lead_convert_to_opportunity #: model:mail.message.subtype,name:crm.mt_salesteam_lead_opportunity msgid "Lead to Opportunity" -msgstr "" +msgstr "Кандидат в предложение" #. module: crm #: field:crm.lead,user_email:0 @@ -2126,7 +2126,7 @@ msgstr "" #. module: crm #: view:crm.lead:0 msgid "Address" -msgstr "" +msgstr "Адрес" #. module: crm #: help:crm.case.section,alias_id:0 @@ -2134,6 +2134,8 @@ msgid "" "The email address associated with this team. New emails received will " "automatically create new leads assigned to the team." msgstr "" +"Адрес эл. почты связанный с этой командой. Новая полученная эл. почта будет " +"автоматически создавать новые кандидаты связанные с командой." #. module: crm #: view:crm.lead:0 @@ -2192,7 +2194,7 @@ msgstr "Продолжение процесса" #: selection:crm.lead2opportunity.partner.mass,name:0 #: model:ir.actions.act_window,name:crm.action_crm_lead2opportunity_partner msgid "Convert to opportunity" -msgstr "Преобразовать в возможность" +msgstr "Преобразовать в предложение" #. module: crm #: field:crm.opportunity2phonecall,user_id:0 @@ -2234,6 +2236,8 @@ msgid "" "This stage is not visible, for example in status bar or kanban view, when " "there are no records in that stage to display." msgstr "" +"Эта стадия не видима, например в статус-баре или виде канбан, когда нет " +"записей этой стадии для отображения." #. module: crm #: field:crm.lead.report,nbr:0 @@ -2249,7 +2253,7 @@ msgstr "Отдел продаж, которому принадлежит воп #. module: crm #: model:crm.case.resource.type,name:crm.type_lead6 msgid "Banner Ads" -msgstr "" +msgstr "Баннер" #. module: crm #: field:crm.merge.opportunity,opportunity_ids:0 @@ -2279,7 +2283,7 @@ msgstr "Выполняется" #. module: crm #: model:mail.message.subtype,description:crm.mt_lead_convert_to_opportunity msgid "Lead converted into an opportunity" -msgstr "" +msgstr "Кандидат превращенный в предложение" #. module: crm #: view:crm.lead:0 @@ -2289,7 +2293,7 @@ msgstr "Нераспределенные кандидаты" #. module: crm #: model:mail.message.subtype,description:crm.mt_lead_won msgid "Opportunity won" -msgstr "" +msgstr "Предложение принято" #. module: crm #: field:crm.case.categ,object_id:0 @@ -2364,7 +2368,7 @@ msgstr "" #. module: crm #: field:crm.case.stage,state:0 msgid "Related Status" -msgstr "" +msgstr "Связанный статус" #. module: crm #: field:crm.phonecall,name:0 @@ -2410,7 +2414,7 @@ msgstr "Подтвердить" #. module: crm #: view:crm.lead:0 msgid "Unread messages" -msgstr "" +msgstr "Непрочитанные сообщения" #. module: crm #: field:crm.phonecall.report,section_id:0 @@ -2501,7 +2505,7 @@ msgstr "Создание предложений из кандидатов" #. module: crm #: model:crm.case.resource.type,name:crm.type_lead3 msgid "Email Campaign - Products" -msgstr "" +msgstr "Кампания эл. почты - Продукция" #. module: crm #: model:ir.actions.act_window,help:crm.crm_case_categ_phone_incoming0 @@ -2578,7 +2582,7 @@ msgstr "Август" #: model:mail.message.subtype,name:crm.mt_lead_lost #: model:mail.message.subtype,name:crm.mt_salesteam_lead_lost msgid "Opportunity Lost" -msgstr "" +msgstr "Предложение отклонено" #. module: crm #: field:crm.lead.report,deadline_month:0 @@ -2644,7 +2648,7 @@ msgstr "Сотрудники отдела" #: view:crm.opportunity2phonecall:0 #: view:crm.phonecall2phonecall:0 msgid "Schedule/Log a Call" -msgstr "" +msgstr "Запланировать/Описать звонок" #. module: crm #: field:crm.lead,planned_cost:0 @@ -2654,7 +2658,7 @@ msgstr "Планируемые затраты" #. module: crm #: help:crm.lead,date_deadline:0 msgid "Estimate of the date on which the opportunity will be won." -msgstr "" +msgstr "Оценка даты на которую это предложение будет принято." #. module: crm #: help:crm.lead,email_cc:0 @@ -2676,7 +2680,7 @@ msgstr "Описанные звонки" #: model:mail.message.subtype,name:crm.mt_lead_won #: model:mail.message.subtype,name:crm.mt_salesteam_lead_won msgid "Opportunity Won" -msgstr "" +msgstr "Предложение принято" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_section_act_tree @@ -2895,7 +2899,7 @@ msgstr "" #. module: crm #: view:crm.lead:0 msgid "Internal Notes" -msgstr "" +msgstr "Внутренние заметки" #. module: crm #: view:crm.lead:0 @@ -2960,6 +2964,7 @@ msgstr "Проиграно" #, python-format msgid "Closed/Cancelled leads cannot be converted into opportunities." msgstr "" +"Закрытые/Отмененные кандидаты не могут быть конвертированы в возможности." #. module: crm #: view:crm.lead:0 @@ -3050,7 +3055,7 @@ msgstr "Рассылка" #. module: crm #: model:mail.message.subtype,name:crm.mt_salesteam_lead_stage msgid "Opportunity Stage Changed" -msgstr "" +msgstr "Этап предложения изменен" #. module: crm #: model:ir.actions.act_window,help:crm.crm_lead_stage_act diff --git a/addons/crm/process/crm_configuration_process.xml b/addons/crm/process/crm_configuration_process.xml index c56bb8935d9..882c9680268 100644 --- a/addons/crm/process/crm_configuration_process.xml +++ b/addons/crm/process/crm_configuration_process.xml @@ -60,24 +60,24 @@ - - + + - - + + - - + + diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index 759063b3c1d..09853c6379e 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -75,7 +75,7 @@ + help="Leads/Opportunities that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/> + help="Phone calls that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/> - + -