summaryrefslogtreecommitdiff
path: root/odoo/addons
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/addons')
-rw-r--r--odoo/addons/base/i18n/nl.po71
-rw-r--r--odoo/addons/base/i18n/ru.po67
-rw-r--r--odoo/addons/base/i18n/zh_CN.po22
-rw-r--r--odoo/addons/base/models/ir_actions.py5
-rw-r--r--odoo/addons/base/models/res_users.py8
-rw-r--r--odoo/addons/base/tests/test_float.py18
6 files changed, 137 insertions, 54 deletions
diff --git a/odoo/addons/base/i18n/nl.po b/odoo/addons/base/i18n/nl.po
index 3aa03d4dd50..a1c5c87721e 100644
--- a/odoo/addons/base/i18n/nl.po
+++ b/odoo/addons/base/i18n/nl.po
@@ -7,7 +7,7 @@
# Erwin van der Ploeg <erwin@odooexperts.nl>, 2016
# Stephan Van Dyck <stephan.vandyck@vanroey.be>, 2016
# Eric Geens <ericgeens@yahoo.com>, 2016
-# Martin Trigaux <mat@odoo.com>, 2016
+# Martin Trigaux, 2016
# Cas Vissers <casvissers@brahoo.nl>, 2016
# Eric Geens <eric.geens@vitabiz.be>, 2016
# Pol Van Dingenen <pol.vandingenen@vanroey.be>, 2017
@@ -3173,6 +3173,23 @@ msgid ""
" - Exception (Received and invoiced quantities differ)\n"
" "
msgstr ""
+"\n"
+"Beheer 3-way matching op leveranciersfacturen\n"
+"=====================================\n"
+"\n"
+"In de maakindustrie ontvangen bedrijven vaak eerder de leveranciers factuur\n"
+"voor het ontvangen van hun aankoop, maar willen de rekening niet betalen tot de goederen zijn bezorgd.\n"
+"\n"
+"De oplossing voor deze situatie is om de leveranciers factuur te maken wanneer u deze ontvangt (op basis van bestelde hoeveelheden), maar alleen te betalen als de ontvangen hoeveelheden (op de PO-regels) overeen komen met de hoeveelheden in de leveranciers factuur.\n"
+"\n"
+"Deze module introduceert een \"stel vrij voor betaling\" -mechanisme dat elke leverancier factuur markeert of het kan worden betaald of niet.\n"
+"\n"
+"Elke leveranciers factuur ontvangt een van de volgende drie statussen:\n"
+"\n"
+" - Ja (de factuur kan worden betaald)\n"
+" - Nee (de factuur kan nog niet worden betaald, er is niets geleverd)\n"
+" - Uitzondering (verschil tussen ontvangen en besteld)\n"
+" "
#. module: base
#: model:ir.module.module,description:base.module_stock_dropshipping
@@ -4721,6 +4738,12 @@ msgid ""
"Categorize the lines per subscription template when an online quote contains subscription products.\n"
" "
msgstr ""
+"\n"
+"Abonnement integratie voor de online offertes\n"
+"-------------------------------------------\n"
+"\n"
+"Categoriseer de regels per abonnementsjabloon wanneer een online offerte abonnementsproducten bevat.\n"
+" "
#. module: base
#: model:ir.module.module,description:base.module_survey_crm
@@ -5495,6 +5518,13 @@ msgid ""
"of this module is to allow the display of a customer portal without having\n"
"a dependency towards website edition and customization capabilities."
msgstr ""
+"\n"
+"Deze module voegt de vereiste basiscode toe voor een volledig geïntegreerd klantenportaal. Het bevat de basiscontrollerklasse en basissjablonen. Zakelijke add-ons\n"
+"zullen hun specifieke sjablonen en controllers toevoegen om de klantportaal uit te breiden.\n"
+"\n"
+"Deze module bevat voornamelijke code afkomstig van Odoo v10 website_portal. Doel\n"
+"van deze module is om de weergave van een klantportaal zonder \n"
+"afhankelijkheid van de mogelijkheden van de website editie en aanpas mogelijkheden."
#. module: base
#: model:ir.module.module,description:base.module_barcodes
@@ -6220,6 +6250,17 @@ msgid ""
"project.\n"
" "
msgstr ""
+"\n"
+"Transifex integratie\n"
+"=====================\n"
+"Deze module voegt een link toe aan het Transifex-project in de vertaalweergave.\n"
+"Het doel van deze module is om vertalingen van de hoofdmodules te versnellen.\n"
+"\n"
+"Om te laten werken gebruikt Odoo Transifex-configuratiebestanden `.txt / config` om de\n"
+"projectbron te detecteren. Aangepaste modules worden niet vertaald (sinds deze niet gepubliceerd zijn op het belangrijkste Transifex-project).\n"
+"\n"
+"De taal die de gebruiker probeert te vertalen moet op de Transifex geactiveerd zijn.\n"
+" "
#. module: base
#: model:ir.module.module,description:base.module_l10n_tr
@@ -11969,6 +12010,7 @@ msgstr "Functie"
#: model:res.partner.industry,full_name:base.res_partner_industry_G
msgid "G WHOLESALE AND RETAIL TRADE;REPAIR OF MOTOR VEHICLES AND MOTORCYCLES"
msgstr ""
+"G GROOT- EN DETAILHANDEL; REPARATIE VAN MOTORVOERTUIGEN EN MOTORFIETSEN"
#. module: base
#: selection:ir.module.module,license:0
@@ -14274,6 +14316,12 @@ msgid ""
"\n"
" * UPDATE ME\n"
msgstr ""
+"Account en betaling koppelen en portaalbetaling toevoegen\n"
+"\n"
+"Bieden hulpmiddelen voor account-gerelateerde betalingen evenals portaal-opties voor\n"
+"betalingen.\n"
+"\n"
+" * WERK BIJ\n"
#. module: base
#: model:ir.module.module,summary:base.module_sale_payment
@@ -14292,6 +14340,14 @@ msgid ""
" * JS code to handle a payment form (eCommerce\n"
" * add payment-related fields on SO\n"
msgstr ""
+"Verkoop en betaling koppelen\n"
+"\n"
+"Biedt hulpmiddelen voor verkoopgerelateerde betalingen\n"
+"\n"
+" * specifiek beheer van transacties zoals orderbevestiging\n"
+" * tools methode om transacties af te handelen bij het toestaan om te betalen / verkopen\n"
+" * JS-code om een betalingsformulier af te handelen (eCommerce\n"
+" * voeg betalingsgerelateerde velden toe aan verkooporder\n"
#. module: base
#: model:ir.module.module,shortdesc:base.module_link_tracker
@@ -22442,6 +22498,19 @@ msgid ""
"them to marketing campaigns.\n"
"\n"
msgstr ""
+"Uw contactformulier\n"
+"-----------------\n"
+"\n"
+"### Integreer contactformulieren met uw leads\n"
+"\n"
+"Deze eenvoudige applicatie integreert een contactformulier op uw \"Contact\" -pagina.\n"
+"Formulieren maken automatisch leads in Odoo CRM.\n"
+"\n"
+"Gemakkelijke contactpagina\n"
+"-----------------\n"
+"\n"
+"Zorg dat uw leads automatisch worden ingevuld met de integratie van uw contactformulier. Deze toepassing biedt een betere kwalificatie van de lead die perfect is om te koppelen\n"
+"aan marketingcampagnes.\n"
#. module: base
#: code:addons/base/models/ir_mail_server.py:224
diff --git a/odoo/addons/base/i18n/ru.po b/odoo/addons/base/i18n/ru.po
index 60b36581b71..ab2abd6fbda 100644
--- a/odoo/addons/base/i18n/ru.po
+++ b/odoo/addons/base/i18n/ru.po
@@ -3,12 +3,12 @@
# * base
#
# Translators:
-# Martin Trigaux <mat@odoo.com>, 2017
+# Martin Trigaux, 2017
# Sergey Vilizhanin <sv@grimmette.ru>, 2017
# Viktor Pogrebniak <vp@aifil.ru>, 2017
# Gennady Marchenko <gennadym@gmail.com>, 2017
# Максим Дронь <dronmax@gmail.com>, 2017
-# Эдуард Манятовский <manyatovskiy@gmail.com>, 2017
+# Collex100, 2017
# Denis Trepalin <zekarious@gmail.com>, 2017
# Alex Puchkov <ap@alteco.co>, 2017
# Mekan Bash <tmbashimov@gmail.com>, 2017
@@ -18,7 +18,7 @@
# KingOPl Slav <87slava13@gmail.com>, 2017
# Владимир Куряев <istercul@gmail.com>, 2017
# Evgeny Kemerov <sintezz777@gmail.com>, 2017
-# Andrey Skabelin <inactive+a.skabelin@transifex.com>, 2017
+# Andrey Skabelin, 2017
# Evgeny <transingularity@gmail.com>, 2017
# OstapYakovenko <Ostap.Yakovenko@gmail.com>, 2017
# Артур Чеботарь <artcha.chebotar@gmail.com>, 2017
@@ -27,13 +27,14 @@
# Андрей Гусев <gaussgss@gmail.com>, 2017
# Андрей Ландау <zaebokkunwow@gmail.com>, 2017
# Dmitry sky <d.v.selitsky@gmail.com>, 2017
+# Yuriy Ney <k_wizard@mail.ru>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~11.1+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-13 14:47+0000\n"
"PO-Revision-Date: 2017-12-13 14:47+0000\n"
-"Last-Translator: Dmitry sky <d.v.selitsky@gmail.com>, 2017\n"
+"Last-Translator: Yuriy Ney <k_wizard@mail.ru>, 2018\n"
"Language-Team: Russian (https://www.transifex.com/odoo/teams/41243/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -6741,7 +6742,7 @@ msgstr "Добавить стоимость доставки к онлайн пÑ
#. module: base
#: model:ir.module.module,summary:base.module_transifex
msgid "Add a link to edit a translation in Transifex"
-msgstr ""
+msgstr "Добавить ссылку для редактирования локализации в Transifex"
#. module: base
#: model:ir.module.module,summary:base.module_base_address_city
@@ -6941,7 +6942,7 @@ msgstr "Администрирование"
#. module: base
#: model:res.partner.industry,name:base.res_partner_industry_N
msgid "Administrative"
-msgstr ""
+msgstr "Административный"
#. module: base
#: model:ir.model.fields,help:base.field_res_country_state_name
@@ -6990,12 +6991,12 @@ msgstr "Affero GPL-3"
#. module: base
#: model:res.country,name:base.af
msgid "Afghanistan"
-msgstr ""
+msgstr "Афганистан"
#. module: base
#: selection:res.country,name_position:0
msgid "After Address"
-msgstr ""
+msgstr "После адреса"
#. module: base
#: selection:res.currency,position:0
@@ -7005,7 +7006,7 @@ msgstr "После суммы"
#. module: base
#: model:res.partner.industry,name:base.res_partner_industry_A
msgid "Agriculture"
-msgstr ""
+msgstr "Сельское хозяйство"
#. module: base
#: model:res.country,name:base.al
@@ -7062,12 +7063,12 @@ msgstr "Позволяет удаленно модернизировать прÐ
#. module: base
#: model:ir.module.module,summary:base.module_website_sale_coupon
msgid "Allows to use discount coupons in ecommerce orders"
-msgstr ""
+msgstr "Разрешить использование купонов в коммерческих заказах"
#. module: base
#: model:ir.module.module,summary:base.module_sale_coupon
msgid "Allows to use discount coupons in sales orders"
-msgstr ""
+msgstr "Разрешить использование купонов на скидку в заказах покупателя"
#. module: base
#: model:ir.module.category,description:base.module_category_account_voucher
@@ -7084,6 +7085,8 @@ msgid ""
"Also you will find here all the related documents and download it by "
"clicking on any individual document."
msgstr ""
+"Так же вы найдёте здесь связанные документы и сможете скачать кликнув на "
+"необходимый документ. "
#. module: base
#: code:addons/base/models/ir_fields.py:378
@@ -7128,12 +7131,12 @@ msgstr "Аналитический учёт"
#. module: base
#: model:ir.module.module,summary:base.module_mrp_account
msgid "Analytic accounting in Manufacturing"
-msgstr ""
+msgstr "Аналитический учёт в Производстве"
#. module: base
#: model:res.country,name:base.ad
msgid "Andorra"
-msgstr ""
+msgstr "Андора"
#. module: base
#: model:res.country,name:base.ao
@@ -7294,7 +7297,7 @@ msgstr "Аргентина - Бухгалтерский учет"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_ar_reports
msgid "Argentina - Accounting Reports"
-msgstr ""
+msgstr "Аргентина- Бухгалтерские Отчёты"
#. module: base
#: model:ir.model.fields,help:base.field_ir_act_client_params
@@ -7394,7 +7397,7 @@ msgstr "Австралийский - Бухгалтерский учет"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_au_reports
msgid "Australian - Accounting Reports"
-msgstr ""
+msgstr "Австралийские - Бухгалтерские Отчёты"
#. module: base
#: model:res.country,name:base.at
@@ -7437,7 +7440,7 @@ msgstr "Авто поиск"
#. module: base
#: model:ir.module.module,summary:base.module_marketing_automation
msgid "Automate Marketing Campaigns"
-msgstr ""
+msgstr "Автоматизируйте Маркетинговые кампании"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_automation
@@ -7447,7 +7450,7 @@ msgstr "Автоматические правила действий"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_automation_hr_contract
msgid "Automated Action based on Employee Contracts"
-msgstr ""
+msgstr "Автоматизация действий на основе контактов работников"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_gengo
@@ -7837,7 +7840,7 @@ msgstr "Двоичный"
#: model:ir.model.fields,field_description:base.field_ir_actions_binding_model_id_275
#: model:ir.model.fields,field_description:base.field_ir_cron_binding_model_id
msgid "Binding Model"
-msgstr ""
+msgstr "Связанная модель"
#. module: base
#: model:ir.model.fields,field_description:base.field_ir_act_client_binding_type
@@ -7849,7 +7852,7 @@ msgstr ""
#: model:ir.model.fields,field_description:base.field_ir_actions_binding_type_276
#: model:ir.model.fields,field_description:base.field_ir_cron_binding_type
msgid "Binding Type"
-msgstr ""
+msgstr "Связанный Тип"
#. module: base
#: model:ir.module.module,shortdesc:base.module_hw_blackbox_be
@@ -7894,7 +7897,7 @@ msgstr "Тема Bootswatch"
#. module: base
#: model:res.country,name:base.ba
msgid "Bosnia and Herzegovina"
-msgstr ""
+msgstr "Босния и Герцеговина"
#. module: base
#: model:res.country,name:base.bw
@@ -8047,7 +8050,7 @@ msgstr "SMS-оповещения"
#. module: base
#: model:res.country,name:base.kh
msgid "Cambodia"
-msgstr ""
+msgstr "Камбоджа"
#. module: base
#: model:res.country,name:base.cm
@@ -8349,7 +8352,7 @@ msgstr "Чили - Бухгалтерский учет"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_cl_reports
msgid "Chile - Accounting Reports"
-msgstr ""
+msgstr "Чили - Бухгалтерские Отчеты"
#. module: base
#: model:res.country,name:base.cn
@@ -8851,7 +8854,7 @@ msgstr "Форма контактов"
#. module: base
#: model:ir.module.module,shortdesc:base.module_website_crm_phone_validation
msgid "Contact Form Number Validation"
-msgstr ""
+msgstr "Контактная Форма для проверки номеров."
#. module: base
#: model:ir.ui.view,arch_db:base.view_partner_form
@@ -9045,7 +9048,7 @@ msgstr "Создать меню"
#. module: base
#: model:ir.module.module,summary:base.module_website_form_project
msgid "Create Tasks From Contact Form"
-msgstr ""
+msgstr "Создание задач из контактной формы."
#. module: base
#: model:ir.module.module,summary:base.module_crm_project
@@ -9290,7 +9293,7 @@ msgstr "Поддержка кредитных карт для точки проÐ
#. module: base
#: model:ir.module.module,shortdesc:base.module_crm_phone_validation
msgid "Crm Phone Numbers Validation"
-msgstr ""
+msgstr "Проверка телефонных номеров для CRM."
#. module: base
#: model:res.country,name:base.hr
@@ -9305,7 +9308,7 @@ msgstr "Хорватия - Бухгалтерский учет (RRIF 2012)"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_hr_reports
msgid "Croatia - RRIF 2012 COA - Accounting Reports"
-msgstr ""
+msgstr "Хорватия- RRIF 2012 COA - Бухгалтерские Отчеты"
#. module: base
#: model:res.country,name:base.cu
@@ -9373,7 +9376,7 @@ msgstr "Валютная единица"
#. module: base
#: model:ir.model.fields,help:base.field_res_currency_currency_unit_label
msgid "Currency Unit Name"
-msgstr ""
+msgstr "Наименование единицы валюты."
#. module: base
#: model:ir.model.fields,help:base.field_res_currency_symbol
@@ -9443,7 +9446,7 @@ msgstr ""
#: model:ir.module.module,shortdesc:base.module_portal
#: model:ir.module.module,summary:base.module_portal
msgid "Customer Portal"
-msgstr ""
+msgstr "Пользовательский Портал"
#. module: base
#: model:ir.module.module,shortdesc:base.module_rating
@@ -9664,7 +9667,7 @@ msgstr "Тема по умолчанию"
#. module: base
#: model:ir.model.fields,field_description:base.field_ir_default_json_value
msgid "Default Value (JSON format)"
-msgstr ""
+msgstr "Значение по умолчанию (в формате JSON)"
#. module: base
#: model:ir.model.fields,help:base.field_ir_act_window_limit
@@ -9734,7 +9737,7 @@ msgstr "Демонстрационные данные"
#. module: base
#: model:res.country,name:base.cd
msgid "Democratic Republic of the Congo"
-msgstr ""
+msgstr "Демократическая Республика Конго"
#. module: base
#: model:res.country,name:base.dk
@@ -9812,7 +9815,7 @@ msgstr "Показывает, куда вставлять символ: посл
msgid ""
"Determines where the customer/company name should be placed, i.e. after or "
"before the address."
-msgstr ""
+msgstr "Укажите расположение имени покупателя/компании, до или после адреса."
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_de
@@ -9822,7 +9825,7 @@ msgstr "Германия - Учет"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_de_reports
msgid "Deutschland - Accounting Reports"
-msgstr ""
+msgstr "Германия - Бухгалтерские Отчеты"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_de_skr03
diff --git a/odoo/addons/base/i18n/zh_CN.po b/odoo/addons/base/i18n/zh_CN.po
index 6ff892bf955..d6f35e09c1a 100644
--- a/odoo/addons/base/i18n/zh_CN.po
+++ b/odoo/addons/base/i18n/zh_CN.po
@@ -4,9 +4,9 @@
#
# Translators:
# Jeffery CHEN Fan <jeffery9@gmail.com>, 2016
-# fausthuang <faust_huang@hotmail.com>, 2016
+# fausthuang, 2016
# waveyeung <waveyeung@qq.com>, 2016
-# Martin Trigaux <mat@odoo.com>, 2016
+# Martin Trigaux, 2016
# Talway <9010446@qq.com>, 2016
# 菜小蛇 <lttlsnk@gmail.com>, 2016
# xiaobin wu <bd5dml@gmail.com>, 2016
@@ -31,7 +31,7 @@
# glovebx <ruinning@163.com>, 2016
# 苏州远鼎 <tiexinliu@126.com>, 2016
# Noah McDermott <Noah_mcdermott@northwestschools.net>, 2016
-# Bo Cao <cao.poobo@hotmail.com>, 2017
+# Bo Cao, 2017
# 仁东 郑 <msntop@outlook.com>, 2017
# 北京路远通 <sales@luyuantong.com>, 2017
# 厦门-许舟 <windedge99@gmail.com>, 2017
@@ -7869,12 +7869,12 @@ msgstr "城市"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_address_city
msgid "City Addresses"
-msgstr ""
+msgstr "城市地址"
#. module: base
#: selection:res.company,external_report_layout:0
msgid "Clean"
-msgstr ""
+msgstr "清理"
#. module: base
#: model:ir.actions.act_window,help:base.action_ui_view_custom
@@ -8515,7 +8515,7 @@ msgstr "创建菜单"
#. module: base
#: selection:ir.actions.server,state:0
msgid "Create a new Record"
-msgstr ""
+msgstr "创建一条新记录"
#. module: base
#: model:ir.actions.act_window,help:base.action_res_company_form
@@ -8734,7 +8734,7 @@ msgstr "POS信用卡支持"
#. module: base
#: model:ir.module.module,shortdesc:base.module_crm_phone_validation
msgid "Crm Phone Numbers Validation"
-msgstr ""
+msgstr "CRM电话号码验证"
#. module: base
#: model:res.country,name:base.hr
@@ -8887,7 +8887,7 @@ msgstr ""
#: model:ir.module.module,shortdesc:base.module_portal
#: model:ir.module.module,summary:base.module_portal
msgid "Customer Portal"
-msgstr ""
+msgstr "客户门户"
#. module: base
#: model:ir.module.module,shortdesc:base.module_rating
@@ -10700,7 +10700,7 @@ msgstr "常规设置"
#: model:ir.ui.menu,name:base.menu_wizard_update_translations
#: model:ir.ui.view,arch_db:base.wizard_update_translations
msgid "Generate Missing Terms"
-msgstr ""
+msgstr "生成缺少的术语"
#. module: base
#: model:ir.ui.view,arch_db:base.ir_property_view_search
@@ -18674,7 +18674,7 @@ msgstr ""
#. module: base
#: model:ir.model.fields,help:base.field_ir_attachment_res_model
msgid "The database object this attachment will be attached to."
-msgstr ""
+msgstr "该附件将附加到的数据库对象。"
#. module: base
#: code:addons/base/models/ir_model.py:557
@@ -18878,7 +18878,7 @@ msgstr "币别到其他币别的汇率为 1"
#. module: base
#: model:ir.model.fields,help:base.field_ir_attachment_res_id
msgid "The record id this is attached to."
-msgstr ""
+msgstr "这是附加到记录ID。"
#. module: base
#: code:addons/models.py:2675
diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py
index 95fd6eff322..f9ec9413e2f 100644
--- a/odoo/addons/base/models/ir_actions.py
+++ b/odoo/addons/base/models/ir_actions.py
@@ -8,6 +8,7 @@ from odoo.tools.safe_eval import safe_eval, test_python_expr
from odoo.tools import pycompat
from odoo.http import request
+import base64
from collections import defaultdict
import datetime
import dateutil
@@ -76,6 +77,8 @@ class IrActions(models.Model):
'datetime': datetime,
'dateutil': dateutil,
'timezone': timezone,
+ 'b64encode': base64.b64encode,
+ 'b64decode': base64.b64decode,
}
@api.model
@@ -258,7 +261,7 @@ class IrActionsActWindowView(models.Model):
_name = 'ir.actions.act_window.view'
_table = 'ir_act_window_view'
_rec_name = 'view_id'
- _order = 'sequence'
+ _order = 'sequence,id'
sequence = fields.Integer()
view_id = fields.Many2one('ir.ui.view', string='View')
diff --git a/odoo/addons/base/models/res_users.py b/odoo/addons/base/models/res_users.py
index 832a2b4f48b..b0dd4a8ff78 100644
--- a/odoo/addons/base/models/res_users.py
+++ b/odoo/addons/base/models/res_users.py
@@ -15,7 +15,6 @@ from odoo.exceptions import AccessDenied, AccessError, UserError, ValidationErro
from odoo.osv import expression
from odoo.service.db import check_super
from odoo.tools import partition, pycompat
-from odoo.http import root
_logger = logging.getLogger(__name__)
@@ -372,8 +371,6 @@ class Users(models.Model):
if any(key.startswith('context_') or key in ('lang', 'tz') for key in values):
self.context_get.clear_cache(self)
if any(key in values for key in ['active'] + USER_PRIVATE_FIELDS):
- # force deletion of all sessions for these users
- root.session_store.delete_sessions_for_uids(self.ids)
db = self._cr.dbname
for id in self.ids:
self.__uid_cache[db].pop(id, None)
@@ -387,10 +384,7 @@ class Users(models.Model):
db = self._cr.dbname
for id in self.ids:
self.__uid_cache[db].pop(id, None)
- res = super(Users, self).unlink()
- # force deletion of all sessions for these users
- root.session_store.delete_sessions_for_uids(self.ids)
- return res
+ return super(Users, self).unlink()
@api.model
def name_search(self, name='', args=None, operator='ilike', limit=100):
diff --git a/odoo/addons/base/tests/test_float.py b/odoo/addons/base/tests/test_float.py
index 1c2fcc3e91f..6e42f8adf1d 100644
--- a/odoo/addons/base/tests/test_float.py
+++ b/odoo/addons/base/tests/test_float.py
@@ -92,6 +92,18 @@ class TestFloatPrecision(TransactionCase):
try_round(1.8, '2', 0, method='UP')
try_round(-1.8, '-2', 0, method='UP')
+ # Try some rounding value with rounding method DOWN instead of HALF-UP
+ # We use 2.425 because when normalizing 2.425 with precision_digits=3 it gives
+ # us 2424.9999999999995 as value, and if not handle correctly the rounding DOWN
+ # value will be incorrect (should be 2.425 and not 2.424)
+ try_round(2.425, '2.425', method='DOWN')
+ try_round(2.4249, '2.424', method='DOWN')
+ try_round(-2.425, '-2.425', method='DOWN')
+ try_round(-2.4249, '-2.424', method='DOWN')
+ try_round(-2.500, '-2.500', method='DOWN')
+ try_round(1.8, '1', 0, method='DOWN')
+ try_round(-1.8, '-1', 0, method='DOWN')
+
# Extended float range test, inspired by Cloves Almeida's test on bug #882036.
fractions = [.0, .015, .01499, .675, .67499, .4555, .4555, .45555]
expecteds = ['.00', '.02', '.01', '.68', '.67', '.46', '.456', '.4556']
@@ -135,8 +147,8 @@ class TestFloatPrecision(TransactionCase):
try_compare(-657.4444, -657.445, 1)
# Rounding to unusual rounding units (e.g. coin values)
- def try_round(amount, expected, precision_rounding=None):
- value = float_round(amount, precision_rounding=precision_rounding)
+ def try_round(amount, expected, precision_rounding=None, method='HALF-UP'):
+ value = float_round(amount, precision_rounding=precision_rounding, rounding_method=method)
result = float_repr(value, precision_digits=2)
self.assertEqual(result, expected, 'Rounding error: got %s, expected %s' % (result, expected))
@@ -145,6 +157,8 @@ class TestFloatPrecision(TransactionCase):
try_round(457.3, '455.00', precision_rounding=5)
try_round(457.5, '460.00', precision_rounding=5)
try_round(457.1, '456.00', precision_rounding=3)
+ try_round(2.5, '2.50', precision_rounding=0.05, method='DOWN')
+ try_round(-2.5, '-2.50', precision_rounding=0.05, method='DOWN')
def test_rounding_04(self):
""" check that proper rounding is performed for float persistence """