From 600bfbdc434e86f90de32d0dbed3c8988d5ac033 Mon Sep 17 00:00:00 2001 From: Mohammed Barsi Date: Tue, 13 Oct 2015 04:54:02 +0300 Subject: [PATCH 1/6] [CLA] Signed CLA for Mohammed Barsi (barsi) --- doc/cla/individual/barsi.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/barsi.md diff --git a/doc/cla/individual/barsi.md b/doc/cla/individual/barsi.md new file mode 100644 index 00000000000..5d09cf05bc5 --- /dev/null +++ b/doc/cla/individual/barsi.md @@ -0,0 +1,11 @@ +Saudi Arabia, 2015-10-13 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Mohammed Barsi barsintod@gmail.com From fa48e6f485775be52950d37193d269be1aa6c4ab Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Fri, 9 Oct 2015 09:31:10 +0200 Subject: [PATCH 2/6] [IMP] website_sale: sale_get_order avoid useless sql request Avoid an sql request when sale_order_id is None. Improvement of 6b6d7310c0cd37a461ee25b33ea7ff70ea468740. Closes PR #8974. --- addons/website_sale/models/sale_order.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/website_sale/models/sale_order.py b/addons/website_sale/models/sale_order.py index 4c942c2da54..8cc155b43a0 100644 --- a/addons/website_sale/models/sale_order.py +++ b/addons/website_sale/models/sale_order.py @@ -129,9 +129,16 @@ class website(orm.Model): def sale_get_order(self, cr, uid, ids, force_create=False, code=None, update_pricelist=None, context=None): sale_order_obj = self.pool['sale.order'] sale_order_id = request.session.get('sale_order_id') - sale_order = sale_order_obj.browse(cr, SUPERUSER_ID, sale_order_id, context=context) + sale_order = None + + # Test validity of the sale_order_id + if sale_order_id and sale_order_obj.exists(cr, SUPERUSER_ID, sale_order_id, context=context): + sale_order = sale_order_obj.browse(cr, SUPERUSER_ID, sale_order_id, context=context) + else: + sale_order_id = None + # create so if needed - if not sale_order.exists() and (force_create or code): + if not sale_order_id and (force_create or code): # TODO cache partner_id session partner = self.pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id @@ -148,7 +155,7 @@ class website(orm.Model): request.session['sale_order_id'] = sale_order_id sale_order = sale_order_obj.browse(cr, SUPERUSER_ID, sale_order_id, context=context) - if sale_order.exists(): + if sale_order_id: # TODO cache partner_id session partner = self.pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id # check for change of pricelist with a coupon From fc1f3b34246fa7d23a2583130d6eecb6d807fa0c Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 14 Oct 2015 16:36:05 +0200 Subject: [PATCH 3/6] [FIX] account_analytic_analysis: integer out of range When reading the view `account_analytic_analysis_summary_user`, through the function fields using `_analysis_all`, it could lead to an `integer out of range` if you have a bunch of `res.users` and or `account.account`. Casting the multiplication of the integers to a double solves the issue. opw-652152 --- addons/account_analytic_analysis/account_analytic_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 76d2b68a957..53f8b8169f0 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -841,7 +841,7 @@ class account_analytic_account_summary_user(osv.osv): WHERE (j.type = 'general' ) and (j.id=l.journal_id) GROUP BY l.account_id, l.user_id ) - select (lu.account_id * mu.max_user) + lu.user_id as id, + select (lu.account_id::bigint * mu.max_user) + lu.user_id as id, lu.account_id as account_id, lu.user_id as "user", unit_amount From 5575f98db1b2a7dea911a19ef55eb0880ccb86f7 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 15 Oct 2015 08:46:39 +0200 Subject: [PATCH 4/6] [FIX] account: missing terms in .pot file --- addons/account/i18n/account.pot | 131 +++++++++++++++++++++++--------- 1 file changed, 97 insertions(+), 34 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 06a8d53451f..906337cccc1 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-21 14:07+0000\n" -"PO-Revision-Date: 2015-01-21 14:07+0000\n" +"POT-Creation-Date: 2015-10-15 06:40+0000\n" +"PO-Revision-Date: 2015-10-15 06:40+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -41,7 +41,7 @@ msgid "\n" "
\n" "

It is also possible to directly pay with Paypal:

\n" " \n" -" \n" +" \n" " \n" " % endif\n" " \n" @@ -95,11 +95,18 @@ msgid " * The 'Draft' status is used when a user is encoding a new and unconfirm msgstr "" #. module: account -#: code:addons/account/account.py:1468 +#: code:addons/account/account.py:1477 #, python-format msgid " Centralisation" msgstr "" +#. module: account +#. openerp-web +#: code:addons/account/static/src/js/account_widgets.js:521 +#, python-format +msgid " seconds" +msgstr "" + #. module: account #: field:analytic.entries.report,nbr:0 msgid "# Entries" @@ -1554,17 +1561,7 @@ msgstr "" #. module: account #: help:account.fiscal.position,auto_apply:0 -msgid "Apply automatically this fiscal position." -msgstr "" - -#. module: account -#: help:account.fiscal.position,country_group_id:0 -msgid "Apply only if delivery or invocing country match the group." -msgstr "" - -#. module: account -#: help:account.fiscal.position,country_id:0 -msgid "Apply only if delivery or invoicing country match." +msgid "Apply automatically this fiscal position if the conditions match." msgstr "" #. module: account @@ -1572,6 +1569,16 @@ msgstr "" msgid "Apply only if partner has a VAT number." msgstr "" +#. module: account +#: help:account.fiscal.position,country_group_id:0 +msgid "Apply when the shipping or invoicing country is in this country group, and no position matches the country directly." +msgstr "" + +#. module: account +#: help:account.fiscal.position,country_id:0 +msgid "Apply when the shipping or invoicing country matches. Takes precedence over positions matching on a country group." +msgstr "" + #. module: account #: view:validate.account.move:account.validate_account_move_view #: view:validate.account.move.lines:account.validate_account_move_line_view @@ -2497,6 +2504,13 @@ msgstr "" msgid "Choose Fiscal Year" msgstr "" +#. module: account +#. openerp-web +#: code:addons/account/static/src/js/account_widgets.js:1297 +#, python-format +msgid "Choose counterpart" +msgstr "" + #. module: account #: view:account.automatic.reconcile:account.account_automatic_reconcile_view1 #: view:account.bank.statement:account.view_bank_statement_form @@ -2914,7 +2928,7 @@ msgstr "" #. module: account #: field:account.fiscal.position,country_id:0 -msgid "Countries" +msgid "Country" msgstr "" #. module: account @@ -2968,6 +2982,13 @@ msgstr "" msgid "Create Refund" msgstr "" +#. module: account +#. openerp-web +#: code:addons/account/static/src/js/account_widgets.js:1294 +#, python-format +msgid "Create Write-off" +msgstr "" + #. module: account #: selection:account.invoice.refund,filter_refund:0 msgid "Create a draft refund" @@ -5841,11 +5862,18 @@ msgstr "" msgid "Keep empty to use the period of the validation(invoice) date." msgstr "" +#. module: account +#. openerp-web +#: code:addons/account/static/src/js/account_widgets.js:1299 +#, python-format +msgid "Keep open" +msgstr "" + #. module: account #. openerp-web #: field:account.statement.operation.template,label:0 -#: code:addons/account/static/src/js/account_widgets.js:75 -#: code:addons/account/static/src/js/account_widgets.js:80 +#: code:addons/account/static/src/js/account_widgets.js:74 +#: code:addons/account/static/src/js/account_widgets.js:79 #: view:website:account.report_journal #: view:website:account.report_salepurchasejournal #, python-format @@ -8266,6 +8294,12 @@ msgstr "" msgid "Round per line" msgstr "" +#. module: account +#: code:addons/account/account_bank_statement.py:899 +#, python-format +msgid "Rounding error from currency conversion" +msgstr "" + #. module: account #: view:account.subscription:account.view_subscription_search #: selection:account.subscription,state:0 @@ -9518,6 +9552,16 @@ msgstr "" msgid "The commercial entity that will be used on Journal Entries for this invoice" msgstr "" +#. module: account +#: constraint:account.config.settings:0 +msgid "The company of the gain exchange rate account must be the same than the company selected." +msgstr "" + +#. module: account +#: constraint:account.config.settings:0 +msgid "The company of the loss exchange rate account must be the same than the company selected." +msgstr "" + #. module: account #: help:account.tax,type:0 msgid "The computation method for the tax amount." @@ -9544,6 +9588,11 @@ msgstr "" msgid "The fiscal position will determine taxes and accounts used for the partner." msgstr "" +#. module: account +#: view:account.config.settings:account.view_account_config_settings +msgid "The fiscal year is created when installing a Chart of Account." +msgstr "" + #. module: account #: constraint:account.aged.trial.balance:0 #: constraint:account.balance.report:0 @@ -9818,6 +9867,26 @@ msgstr "" msgid "This Year" msgstr "" +#. module: account +#: help:product.template,property_account_expense:0 +msgid "This account will be used for invoices instead of the default one to value expenses for the current product." +msgstr "" + +#. module: account +#: help:product.template,property_account_income:0 +msgid "This account will be used for invoices instead of the default one to value sales for the current product." +msgstr "" + +#. module: account +#: help:product.category,property_account_expense_categ:0 +msgid "This account will be used for invoices to value expenses." +msgstr "" + +#. module: account +#: help:product.category,property_account_income_categ:0 +msgid "This account will be used for invoices to value sales." +msgstr "" + #. module: account #: help:res.partner,property_account_payable:0 msgid "This account will be used instead of the default one as the payable account for the current partner" @@ -9828,18 +9897,6 @@ msgstr "" msgid "This account will be used instead of the default one as the receivable account for the current partner" msgstr "" -#. module: account -#: help:product.category,property_account_expense_categ:0 -#: help:product.template,property_account_expense:0 -msgid "This account will be used to value outgoing stock using cost price." -msgstr "" - -#. module: account -#: help:product.category,property_account_income_categ:0 -#: help:product.template,property_account_income:0 -msgid "This account will be used to value outgoing stock using sale price." -msgstr "" - #. module: account #: help:account.config.settings,module_account_budget:0 msgid "This allows accountants to manage analytic and crossovered budgets. Once the master budgets and the budgets are defined, the project managers can set the planned amount on each analytic account.\n" @@ -10066,7 +10123,7 @@ msgstr "" #. openerp-web #: code:addons/account/static/src/xml/account_bank_statement_reconciliation.xml:36 #, python-format -msgid "Tip : Hit ctrl-enter to validate the whole sheet." +msgid "Tip : Hit ctrl-enter to reconcile all balanced items." msgstr "" #. module: account @@ -10823,13 +10880,19 @@ msgid "You can check this box to mark this journal item as a litigation with the msgstr "" #. module: account -#: code:addons/account/account_move_line.py:1220 +#: code:addons/account/account_move_line.py:1246 #, python-format msgid "You can not add/modify entries in a closed period %s of journal %s." msgstr "" #. module: account -#: code:addons/account/account.py:1047 +#: code:addons/account/wizard/account_open_closed_fiscalyear.py:42 +#, python-format +msgid "You can not cancel closing entries if the 'End of Year Entries Journal' period is closed." +msgstr "" + +#. module: account +#: code:addons/account/account.py:1057 #, python-format msgid "You can not re-open a period which belongs to closed fiscal year" msgstr "" @@ -10866,7 +10929,7 @@ msgid "You can specify here the coefficient that will be used when consolidating msgstr "" #. module: account -#: code:addons/account/account.py:2273 +#: code:addons/account/account.py:2293 #, python-format msgid "You can specify year, month and date in the name of the model using the following labels:\n" "\n" From ba9771d6ecfde85495b2a6fcd0eb72e8f6509f8e Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 15 Oct 2015 11:34:49 +0200 Subject: [PATCH 5/6] [FIX] website_membership: don't display old as members Follow-up of 5ac77c9 which solved the issue when an association was selected, but not when "All Members" was choosen. Before this commit, the displayed membership lines would only be the paid ones, if an association (membership product) was selected. With this commit this is also the case when no such association is selected. This commit also correct the member counts in the "country" list : * with "All members" the free members were not in the counts, * with not "Free member", the counts didn't took the eventual current name search. closes #9083 opw-648627 --- addons/website_membership/controllers/main.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/website_membership/controllers/main.py b/addons/website_membership/controllers/main.py index b94f57b41a4..eb15ab0b11d 100644 --- a/addons/website_membership/controllers/main.py +++ b/addons/website_membership/controllers/main.py @@ -37,16 +37,16 @@ class WebsiteMembership(http.Controller): partner_obj = request.registry['res.partner'] post_name = post.get('name', '') current_country = None + today = time.strftime(DEFAULT_SERVER_DATE_FORMAT) # base domain for groupby / searches - base_line_domain = [("partner.website_published", "=", True), ('state', 'in', ['free', 'paid'])] + base_line_domain = [ + ("partner.website_published", "=", True), ('state', '=', 'paid'), + ('date_to', '>=', today), ('date_from', '<=', today) + ] if membership_id and membership_id != 'free': membership_id = int(membership_id) - today = time.strftime(DEFAULT_SERVER_DATE_FORMAT) - base_line_domain += [ - ('membership_id', '=', membership_id), ('date_to', '>=', today), - ('date_from', '<=', today), ('state', '=', 'paid') - ] + base_line_domain.append(('membership_id', '=', membership_id)) membership = product_obj.browse(cr, uid, membership_id, context=context) else: membership = None @@ -58,12 +58,14 @@ class WebsiteMembership(http.Controller): if membership_id != 'free': membership_line_ids = membership_line_obj.search(cr, SUPERUSER_ID, base_line_domain, context=context) country_domain = [('member_lines', 'in', membership_line_ids)] + if not membership_id: + country_domain = ['|', country_domain[0], ('membership_state', '=', 'free')] else: membership_line_ids = [] country_domain = [('membership_state', '=', 'free')] - if post_name: - country_domain += ['|', ('name', 'ilike', post_name), - ('website_description', 'ilike', post_name)] + if post_name: + country_domain += ['|', ('name', 'ilike', post_name), + ('website_description', 'ilike', post_name)] countries = partner_obj.read_group( cr, SUPERUSER_ID, country_domain + [("website_published", "=", True)], ["id", "country_id"], groupby="country_id", orderby="country_id", context=request.context) From 8d4ca3d787488142304a308d7b66ee6747ed4fb0 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 15 Oct 2015 13:56:27 +0200 Subject: [PATCH 6/6] [FIX] mail: localize display date in chatter This will display the localized date in the chatter. opw-651625 Closes #9038 --- addons/mail/static/src/js/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 91e766c3618..6b54641728e 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -218,7 +218,7 @@ openerp.mail = function (session) { //formating and add some fields for render this.date = this.date ? session.web.str_to_datetime(this.date) : false; - this.display_date = this.date.toString('ddd MMM dd yyyy HH:mm'); + this.display_date = this.date.toString(Date.CultureInfo.formatPatterns.fullDateTime); if (this.date && new Date().getTime()-this.date.getTime() < 7*24*60*60*1000) { this.timerelative = $.timeago(this.date); }