From 16631338739c5cea1f7bc7abaea8c9a0f6f0790b Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 14 Mar 2018 15:11:02 +0100 Subject: [PATCH 1/8] [FIX] purchase: Don't auto subscribe recipients on mail composers Purpose ======= During the refactoring of the purchase module something went wrong when overriding the 'send_mail' method. The 'mail_post_autofollow' key should have been set into the context only for the purchase orders model. See: https://github.com/odoo/odoo/commit/cb01be2#diff-fe8587929089e5fdb6c75687011b1c7eR822 --- addons/purchase/purchase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index b051377410b..be396e28b8c 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1047,7 +1047,8 @@ class MailComposeMessage(models.Model): @api.multi def send_mail(self, auto_commit=False): if self._context.get('default_model') == 'purchase.order' and self._context.get('default_res_id'): + self = self.with_context(mail_post_autofollow=True) order = self.env['purchase.order'].browse([self._context['default_res_id']]) if order.state == 'draft': order.state = 'sent' - return super(MailComposeMessage, self.with_context(mail_post_autofollow=True)).send_mail(auto_commit=auto_commit) + return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit) From 2b5bb95d430a8cfb3f6abb982f7402c33cdcc313 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 15 Mar 2018 14:38:59 +0100 Subject: [PATCH 2/8] [FIX] website: make 'Optimize SEO' working again (for empty fields) This commit https://github.com/odoo/odoo/commit/965f49201812cc3cca319a3b5b93331272dd2288 removed empty meta-description and meta-keywords from the DOM for SEO audit reasons (these tags when empty are considered as duplicates at a SEO point of view). By doing so it prevent the 'Optimize SEO' to work correctly since it can't retrieve the DOM elements that are used to store the user modifications until he saves. Now, even when these meta-tags are empty, we display them to people having the rights to 'Optimize SEO'. This closes #23659 --- addons/website/views/website_templates.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 81a860ad21b..bcd6e5d5a97 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -110,8 +110,8 @@ and main_object.website_meta_description or website_meta_description"/> - - + + From 9fd5df43055057fdbe442635da2f9f0f9079a0fb Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 15 Mar 2018 14:11:22 +0100 Subject: [PATCH 3/8] [FIX] survey: add missing groups Survey Users have a correct record rule but portal and employee had no rule, being able to read more records than a Survey User Closes #23675 --- addons/survey/security/survey_security.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml index afaf592686b..17a4d37fb65 100644 --- a/addons/survey/security/survey_security.xml +++ b/addons/survey/security/survey_security.xml @@ -42,7 +42,7 @@ Public access to user_input [('create_uid', '=', user.id)] - + From 45faa90732db8962df4521f739b0a24d0d33f730 Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Sun, 18 Mar 2018 16:26:19 +0100 Subject: [PATCH 4/8] [CLA] signature for bigbear3001 Done at #23733 --- doc/cla/individual/bigbear3001.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/bigbear3001.md diff --git a/doc/cla/individual/bigbear3001.md b/doc/cla/individual/bigbear3001.md new file mode 100644 index 00000000000..9690403db37 --- /dev/null +++ b/doc/cla/individual/bigbear3001.md @@ -0,0 +1,11 @@ +Austria, 18th of March 2018 + +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, + +Andreas Perhab bigbear.ap@gmx.at https://github.com/bigbear3001 From 444e2a4ed08dcf312f505e7013e1a7b2702a39ca Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Sun, 18 Mar 2018 16:20:40 +0100 Subject: [PATCH 5/8] [FIX] doc: correct link to nodejs download Closes #23733 --- doc/setup/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/setup/install.rst b/doc/setup/install.rst index 3e5940d8ba1..6c3a4f440d7 100644 --- a/doc/setup/install.rst +++ b/doc/setup/install.rst @@ -474,7 +474,7 @@ Source installation requires manually installing dependencies: $ sudo npm install -g less - - on Windows, `install nodejs `_, reboot (to + - on Windows, `install nodejs `_, reboot (to update the :envvar:`PATH`) and install less: .. code-block:: ps1 From 407b85e329476699e9bda4348e6cb756bbd8a132 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 20 Mar 2018 09:24:18 +0100 Subject: [PATCH 6/8] [FIX] product: default quantity on pricelist item - Create a new pricelist for a new currency - Set the 'Sale Price' option to 'A single sale price per product', so that the user cannot see the pricelist details - Sell 0.5 unit of the product with the new pricelist The pricelist is not correctly applied. This is because the default minimum quantity is 1. Once the user is selling less than 1 unit, the pricelist is not applied. opw-1825353 --- addons/product/pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 3cd8a03c24c..8906fbe6300 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -340,7 +340,7 @@ class product_pricelist_item(osv.osv): _defaults = { 'base': 'list_price', - 'min_quantity': 1, + 'min_quantity': 0, 'sequence': 5, 'price_discount': 0, 'applied_on': '3_global', From 6bd3bae04e030f4d69457e121d4137361d2b557a Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 3 Jul 2017 13:53:26 +0200 Subject: [PATCH 7/8] [FIX] mass_mailing: domain translation As Admin: - Set up 2 languages for the installation, e.g. English and French - Admin language is English, Demo language is French - Create a `res.partner.category` named 'Test English' - Assign the category to a newly created partner - Create a French translation for 'Test English', e.g. 'Test Francais' As Demo: - Create a Mass Mailing - Select a custom domain: ('category_id', '=', 'Test Francais') => it should match one partner - Save and validate Now either: - manually run the scheduled action "Process Mass Mailing Queue" as Admin - wait for the cron to process the mass mailing No mail will be sent since the domain will be evaluated in the Admin language, i.e. English. Indeed, the domain `('category_id', '=', 'Test Francais')` does not match any record in English. The solution/workaround is to use the language of the last user who wrote on the mass mailing. Closes #20906, Closes #15467, Closes #15445 opw-778922 --- addons/mass_mailing/models/mass_mailing.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index c59f12da0e6..154acd47bd8 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -836,9 +836,12 @@ class MassMailing(osv.Model): for mass_mailing_id in mass_mailing_ids: mass_mailing_record = self.browse(cr, uid, mass_mailing_id, context=context) + _uid = mass_mailing_record.write_uid.id or uid + _context = self.pool.get("res.users").context_get(cr, _uid, context=context) + _context = dict(context or {}, **_context) - if len(self.get_remaining_recipients(cr, uid, mass_mailing_record, context=context)) > 0: - self.write(cr, uid, [mass_mailing_id], {'state': 'sending'}, context=context) - self.send_mail(cr, uid, [mass_mailing_id], context=context) + if len(self.get_remaining_recipients(cr, uid, mass_mailing_record, context=_context)) > 0: + self.write(cr, uid, [mass_mailing_id], {'state': 'sending'}, context=_context) + self.send_mail(cr, uid, [mass_mailing_id], context=_context) else: - self.write(cr, uid, [mass_mailing_id], {'state': 'done'}, context=context) + self.write(cr, uid, [mass_mailing_id], {'state': 'done'}, context=_context) From 2c5fe07fc760396af7d671131da1a5f8ee4d7b50 Mon Sep 17 00:00:00 2001 From: Ward Marissen Date: Mon, 22 Jan 2018 20:21:54 +0100 Subject: [PATCH 8/8] [FIX] website_portal: Keep country changes When a portal user changes his account details and presses the 'Save' button when a mandatory field is not set, the selected country will be reset even when the user did change the country in the form. This fix prevents this from happening and leads to an improvement for the end user. This commit closes #22439 --- addons/website_portal/views/templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_portal/views/templates.xml b/addons/website_portal/views/templates.xml index 592bf9a4f63..ec902564380 100644 --- a/addons/website_portal/views/templates.xml +++ b/addons/website_portal/views/templates.xml @@ -113,7 +113,7 @@