From 6a711060ae380ffcb9342579ff11b9b53aee0712 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 28 Jul 2016 11:11:34 +0200 Subject: [PATCH 01/10] [FIX] account: fiscal position in compute_refund When choosing to refund an invoice with refund method="create refund, reconcile and create a new draft invoice" , the fiscal position of the refund invoice must be kept in the new draft invoice. opw:683311 --- addons/account/wizard/account_invoice_refund.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index d309992cf97..3190e46c6a5 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -202,7 +202,8 @@ class account_invoice_refund(osv.osv_memory): 'invoice_line': invoice_lines, 'tax_line': tax_lines, 'period_id': period, - 'name': description + 'name': description, + 'fiscal_position': inv.fiscal_position.id }) for field in ('partner_id', 'account_id', 'currency_id', 'payment_term', 'journal_id'): From f57f55966df338c78e19403f0ace932c64585852 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 28 Jul 2016 13:13:00 +0200 Subject: [PATCH 02/10] [FIX] sale_stock: UoM in warning The warning message of the product packaging change does not take into account the appropriate UoM. opw-12827 Fixes #12827 --- addons/sale_stock/i18n/sale_stock.pot | 2 +- addons/sale_stock/sale_stock.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/sale_stock/i18n/sale_stock.pot b/addons/sale_stock/i18n/sale_stock.pot index db2bf052fb0..34ca26249f4 100644 --- a/addons/sale_stock/i18n/sale_stock.pot +++ b/addons/sale_stock/i18n/sale_stock.pot @@ -349,7 +349,7 @@ msgstr "" #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:270 #, python-format -msgid "You selected a quantity of %d Units.\n" +msgid "You selected a quantity of %s %s.\n" "But it's not compatible with the selected packaging.\n" "Here is a proposition of quantities according to the packaging:\n" "EAN: %s Quantity: %s Type of ul: %s" diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index 4c943325f6a..00585a9abb3 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -260,11 +260,12 @@ class sale_order_line(osv.osv): qty_pack = pack.qty type_ul = pack.ul if not warning_msgs: - warn_msg = _("You selected a quantity of %d Units.\n" + uom_obj = product_uom_obj.browse(cr, uid, uom, context=context) + warn_msg = _("You selected a quantity of %s %s.\n" "But it's not compatible with the selected packaging.\n" "Here is a proposition of quantities according to the packaging:\n" "EAN: %s Quantity: %s Type of ul: %s") % \ - (qty, ean, qty_pack, type_ul.name) + (qty, uom_obj.name, ean, qty_pack, type_ul.name) warning_msgs += _("Picking Information ! : ") + warn_msg + "\n\n" warning = { 'title': _('Configuration Error!'), From 8bc590a7b939e23336557b24bae11dc1b11dfd16 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 28 Jul 2016 14:16:16 +0200 Subject: [PATCH 03/10] [FIX] stock: default domain on a many2many field The default domain on a many2many field must be list and not a string. opw:684474 --- addons/stock/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/product.py b/addons/stock/product.py index c2ee1310ade..53ad35404bf 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -437,7 +437,7 @@ class product_template(osv.osv): fnct_search=_search_product_quantity, type='float', string='Outgoing'), 'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'), 'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'), - 'route_ids': fields.many2many('stock.location.route', 'stock_route_product', 'product_id', 'route_id', 'Routes', domain="[('product_selectable', '=', True)]", + 'route_ids': fields.many2many('stock.location.route', 'stock_route_product', 'product_id', 'route_id', 'Routes', domain=[('product_selectable', '=', True)], help="Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,..."), 'nbr_reordering_rules': fields.function(_compute_nbr_reordering_rules, string='Reordering Rules', type='integer', multi=True), 'reordering_min_qty': fields.function(_compute_nbr_reordering_rules, type='float', multi=True), From de2d7d9acd71e86a40aa8a0e3489d94270dac255 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 28 Jul 2016 15:06:16 +0200 Subject: [PATCH 04/10] [FIX] sale_stock: incorrect value in error message The error message has an hardcoded precision of 2 digits, which is not enough of the product precision is higher than 2. Since this error message is often used, we should avoid its modification to prevent breaking the translations. opw-683639 Fixes #12629 --- addons/sale_stock/i18n/en.po | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 addons/sale_stock/i18n/en.po diff --git a/addons/sale_stock/i18n/en.po b/addons/sale_stock/i18n/en.po new file mode 100644 index 00000000000..0f50fbd8fe9 --- /dev/null +++ b/addons/sale_stock/i18n/en.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-21 14:08+0000\n" +"PO-Revision-Date: 2015-01-21 14:08+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: sale_stock +#: code:addons/sale_stock/sale_stock.py:343 +#, python-format +msgid "You plan to sell %.2f %s but you only have %.2f %s available !\n" +"The real stock is %.2f %s. (without reservations)" +msgstr "You plan to sell %s %s but you only have %s %s available !\n" +"The real stock is %s %s. (without reservations)" From c372708b01b9c1a19137b25eeddf6ec7ab2c2480 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 28 Jul 2016 17:27:46 +0200 Subject: [PATCH 05/10] [FIX] website_google_map: do not allow invalid partner prefix The only supported prefixes are the following: - /partners/ when website_partner and/or website_crm_partner_assign are installed - /customers/ when website_customer is installed --- addons/website_google_map/controllers/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/website_google_map/controllers/main.py b/addons/website_google_map/controllers/main.py index 1abc7c41397..282be8e508f 100644 --- a/addons/website_google_map/controllers/main.py +++ b/addons/website_google_map/controllers/main.py @@ -57,9 +57,14 @@ class google_map(http.Controller): 'longitude': escape(str(partner.partner_longitude)), }) + if 'customers' in post.get('partner_url', ''): + partner_url = '/customers/' + else: + partner_url = '/partners/' + # generate the map values = { - 'partner_url': post.get('partner_url'), + 'partner_url': partner_url, 'partner_data': json.dumps(partner_data) } return request.website.render("website_google_map.google_map", values) From 37ae7a73343d89dd308c8f159777acac38df9b72 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 28 Jul 2016 16:16:01 +0200 Subject: [PATCH 06/10] [FIX] account: account filter Searching on the name of an account can lead to a traceback ("This domain is syntactically not correct"). This is for example the case in Accounting -> Configuration -> Taxes -> Custom filter on "Tax account doesn't contain 'xxx'". The reason is that the negation of the domain is not correct. opw-684525 --- addons/account/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 7652895dca0..8cb2167f02c 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -128,7 +128,7 @@ class AccountAccount(models.Model): if name: domain = ['|', ('code', '=ilike', name + '%'), ('name', operator, name)] if operator in expression.NEGATIVE_TERM_OPERATORS: - domain = ['&'] + domain + domain = ['&', '!'] + domain[1:] accounts = self.search(domain + args, limit=limit) return accounts.name_get() From b1463354843af63ac0045238696aca689a6b0ca3 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 29 Jul 2016 10:11:04 +0200 Subject: [PATCH 07/10] [FIX] doc: correct typo in deployment page --- doc/setup/deploy.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/setup/deploy.rst b/doc/setup/deploy.rst index 53aabb1aec8..c421606823e 100644 --- a/doc/setup/deploy.rst +++ b/doc/setup/deploy.rst @@ -170,7 +170,7 @@ Worker number calculation * Rule of thumb : (#CPU * 2) + 1 * Cron workers need CPU -* 1 worker ~= 6 concurent users +* 1 worker ~= 6 concurrent users memory size calculation ----------------------- @@ -196,7 +196,7 @@ Configuration sample -------------------- * Server with 4 CPU, 8 Thread -* 60 concurent users +* 60 concurrent users * 60 users / 6 = 10 <- theorical number of worker needed * (4 * 2) + 1 = 9 <- theorical maximal number of worker From ec5410581e8733e56c5a8f0d8ca7e760855f2717 Mon Sep 17 00:00:00 2001 From: mva Date: Fri, 29 Jul 2016 10:20:37 +0200 Subject: [PATCH 08/10] [FIX] doc: change memory hard and soft The hardware limit should be higher than the soft, otherwise it is killed before reaching the limit. Closes #12957 --- doc/setup/deploy.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/setup/deploy.rst b/doc/setup/deploy.rst index c421606823e..76f1d81cb38 100644 --- a/doc/setup/deploy.rst +++ b/doc/setup/deploy.rst @@ -208,8 +208,8 @@ in ``/etc/odoo.conf``: .. code-block:: apacheconf [options] - limit_memory_hard = 629145600 - limit_memory_soft = 1677721600 + limit_memory_hard = 1677721600 + limit_memory_soft = 629145600 limit_request = 8192 limit_time_cpu = 600 limit_time_real = 1200 From 9fe930e6ba95a223fc56163d675e8d5a6485a6fc Mon Sep 17 00:00:00 2001 From: aetna-softwares Date: Mon, 30 May 2016 09:27:46 +0200 Subject: [PATCH 09/10] [FIX] survey: prevent saving issues of answers to multiple_choice questions, when id starts with id of other questions Fixes #11873 #12215 --- addons/survey/survey.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/survey/survey.py b/addons/survey/survey.py index a29e24e79d9..f428ba58a5d 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -1171,7 +1171,7 @@ class survey_user_input_line(osv.Model): if old_uil: self.unlink(cr, SUPERUSER_ID, old_uil, context=context) - ca = dict_keys_startswith(post, answer_tag) + ca = dict_keys_startswith(post, answer_tag+"_") comment_answer = ca.pop(("%s_%s" % (answer_tag, 'comment')), '').strip() if len(ca) > 0: for a in ca: @@ -1203,7 +1203,7 @@ class survey_user_input_line(osv.Model): self.unlink(cr, SUPERUSER_ID, old_uil, context=context) no_answers = True - ca = dict_keys_startswith(post, answer_tag) + ca = dict_keys_startswith(post, answer_tag+"_") comment_answer = ca.pop(("%s_%s" % (answer_tag, 'comment')), '').strip() if comment_answer: From 9b64a2f869372dbfdbabde24283af7724cb74ab8 Mon Sep 17 00:00:00 2001 From: Erwin van der Ploeg Date: Thu, 2 Jun 2016 17:31:49 +0200 Subject: [PATCH 10/10] [IMP] l10n_nl: correct module description Remove outdated information Closes #12274 --- addons/l10n_nl/__openerp__.py | 91 ++++------------------------------- 1 file changed, 10 insertions(+), 81 deletions(-) diff --git a/addons/l10n_nl/__openerp__.py b/addons/l10n_nl/__openerp__.py index f6a55af961a..f04033aa86a 100644 --- a/addons/l10n_nl/__openerp__.py +++ b/addons/l10n_nl/__openerp__.py @@ -3,94 +3,23 @@ # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl -# -# Deze module werkt in OpenERP 5.0.0 (en waarschijnlijk hoger). -# Deze module werkt niet in OpenERP versie 4 en lager. -# -# Status 1.0 - getest op OpenERP 5.0.3 -# -# Versie 5.0.0.1 -# account.account.type -# Basis gelegd voor alle account type -# -# account.account.template -# Basis gelegd met alle benodigde grootboekrekeningen welke via een menu- -# structuur gelinkt zijn aan rubrieken 1 t/m 9. -# De grootboekrekeningen gelinkt aan de account.account.type -# Deze links moeten nog eens goed nagelopen worden. -# -# account.chart.template -# Basis gelegd voor het koppelen van rekeningen aan debiteuren, crediteuren, -# bank, inkoop en verkoop boeken en de BTW configuratie. -# -# Versie 5.0.0.2 -# account.tax.code.template -# Basis gelegd voor de BTW configuratie (structuur) -# Heb als basis het BTW aangifte formulier gebruikt. Of dit werkt? -# -# account.tax.template -# De BTW rekeningen aangemaakt en deze gekoppeld aan de betreffende -# grootboekrekeningen -# -# Versie 5.0.0.3 -# Opschonen van de code en verwijderen van niet gebruikte componenten. -# Versie 5.0.0.4 -# Aanpassen a_expense van 3000 -> 7000 -# record id='btw_code_5b' op negatieve waarde gezet -# Versie 5.0.0.5 -# BTW rekeningen hebben typeaanduiding gekregen t.b.v. purchase of sale -# Versie 5.0.0.6 -# Opschonen van module. -# Versie 5.0.0.7 -# Opschonen van module. -# Versie 5.0.0.8 -# Foutje in l10n_nl_wizard.xml gecorrigeerd waardoor de module niet volledig installeerde. -# Versie 5.0.0.9 -# Account Receivable en Payable goed gedefinieerd. -# Versie 5.0.1.0 -# Alle user_type_xxx velden goed gedefinieerd. -# Specifieke bouw en garage gerelateerde grootboeken verwijderd om een standaard module te creeeren. -# Deze module kan dan als basis worden gebruikt voor specifieke doelgroep modules te creeeren. -# Versie 5.0.1.1 -# Correctie van rekening 7010 (stond dubbel met 7014 waardoor installatie verkeerd ging) -# versie 5.0.1.2 -# Correctie op diverse rekening types van user_type_asset -> user_type_liability en user_type_equity -# versie 5.0.1.3 -# Kleine correctie op BTW te vorderen hoog, id was hetzelfde voor beide, waardoor hoog werd overschreven door # overig. Verduidelijking van omschrijvingen in belastingcodes t.b.v. aangifte overzicht. -# versie 5.0.1.4 -# BTW omschrijvingen aangepast, zodat rapporten er beter uitzien. 2a en 5b e.d. verwijderd en enkele omschrijvingen toegevoegd. -# versie 5.0.1.5 - Switch to English -# Added properties_stock_xxx accounts for correct stock valuation, changed 7000-accounts from type cash to type expense -# Changed naming of 7020 and 7030 to Kostprijs omzet xxxx - { 'name' : 'Netherlands - Accounting', 'version' : '2.0', 'category': 'Localization', 'description': """ -This is the module to manage the accounting chart for Netherlands in OpenERP. +This is the module to manage the accounting chart for Netherlands in Odoo. ============================================================================= +This module installs the a standard chart of accounts and also the Dutch Tax codes and +fiscal positions for deliveries inside and outside the UE. -Read changelog in file __openerp__.py for version information. -Dit is een basismodule om een uitgebreid grootboek- en BTW schema voor -Nederlandse bedrijven te installeren in OpenERP versie 7.0. - -De BTW rekeningen zijn waar nodig gekoppeld om de juiste rapportage te genereren, -denk b.v. aan intracommunautaire verwervingen waarbij u 21% BTW moet opvoeren, -maar tegelijkertijd ook 21% als voorheffing weer mag aftrekken. - -Na installatie van deze module word de configuratie wizard voor 'Accounting' aangeroepen. - * U krijgt een lijst met grootboektemplates aangeboden waarin zich ook het - Nederlandse grootboekschema bevind. - - * Als de configuratie wizard start, wordt u gevraagd om de naam van uw bedrijf - in te voeren, welke grootboekschema te installeren, uit hoeveel cijfers een - grootboekrekening mag bestaan, het rekeningnummer van uw bank en de currency - om Journalen te creeren. - -Let op!! -> De template van het Nederlandse rekeningschema is opgebouwd uit 4 -cijfers. Dit is het minimale aantal welk u moet invullen, u mag het aantal verhogen. -De extra cijfers worden dan achter het rekeningnummer aangevult met 'nullen'. +In the company settings you can make the following settings: +- The number of digits of the chart of accounts. +By default the chart of accounts are 6 digits. 4 is the minimum number of digits. +- If you want to use Anglosaxon acounting +- The prefix of the bank accounts, by default 1100 +- The prefix of the cash account, by default 1000 +- The way of rounding the VAT. """, 'author' : 'Veritos - Jan Verlaan',