From 66d37834284f890c00f00c8ab32ca820f757beb6 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 26 Sep 2018 10:27:45 +0000 Subject: [PATCH 1/4] [FIX] website: add correct ID on demo pages container closes odoo/odoo#27244 --- addons/website/data/website_demo.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/data/website_demo.xml b/addons/website/data/website_demo.xml index e1e67a2cbc6..c9439071b14 100644 --- a/addons/website/data/website_demo.xml +++ b/addons/website/data/website_demo.xml @@ -260,7 +260,7 @@ response = request.render("website.template_partner_comment", { -
+

Components

@@ -524,7 +524,7 @@ response = request.render("website.template_partner_comment", { clear: both; } -
+
From 8a88bbeb8b07abf80a5c6339177eaf1c269480e5 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 27 Sep 2018 08:55:54 +0000 Subject: [PATCH 2/4] [FIX] website_forum: translate the welcome message opw-1884718 closes odoo/odoo#27273 --- addons/website_forum/i18n/website_forum.pot | 16 ++++++++++++++++ addons/website_forum/models/forum.py | 1 + 2 files changed, 17 insertions(+) diff --git a/addons/website_forum/i18n/website_forum.pot b/addons/website_forum/i18n/website_forum.pot index 9493572890b..1ca58a0f105 100644 --- a/addons/website_forum/i18n/website_forum.pot +++ b/addons/website_forum/i18n/website_forum.pot @@ -1411,6 +1411,11 @@ msgstr "" msgid "Help" msgstr "" +#. module: website_forum +#: model:forum.forum,welcome_message:website_forum.forum_help +msgid "Hide Intro" +msgstr "" + #. module: website_forum #: model:ir.ui.view,arch_db:website_forum.new_question msgid "How to create a physical inventory at an anterior date?, How is the 'remaining hours' field computed on tasks?, How to configure TPS and TVQ's canadian taxes?" @@ -2093,6 +2098,11 @@ msgstr "" msgid "Redirect to external link" msgstr "" +#. module: website_forum +#: model:forum.forum,welcome_message:website_forum.forum_help +msgid "Register" +msgstr "" + #. module: website_forum #: model:ir.ui.view,arch_db:website_forum.post_description_full msgid "Reject " @@ -2403,6 +2413,7 @@ msgstr "" #. module: website_forum #: code:addons/website_forum/models/forum.py:51 #: model:forum.forum,description:website_forum.forum_help +#: model:forum.forum,welcome_message:website_forum.forum_help #, python-format msgid "This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together." msgstr "" @@ -2648,6 +2659,11 @@ msgstr "" msgid "Welcome Message" msgstr "" +#. module: website_forum +#: model:forum.forum,welcome_message:website_forum.forum_help +msgid "Welcome!" +msgstr "" + #. module: website_forum #: model:forum.forum,faq:website_forum.forum_help msgid "What kinds of questions can I ask here?" diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py index a4a78fc0a92..787ad5676e0 100644 --- a/addons/website_forum/models/forum.py +++ b/addons/website_forum/models/forum.py @@ -53,6 +53,7 @@ class Forum(models.Model): 'build your professional profile and become a better marketer together.')) welcome_message = fields.Html( 'Welcome Message', + translate=True, default = """
From d3ee7a7a1597cd4fd93fc36c627bbade3eafa6eb Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 18 Sep 2018 13:44:32 +0000 Subject: [PATCH 3/4] [FIX] sale_mrp, sale_stock: procurement qty of kits - Create a BOM kit for product F with: 2 Unit(s) of A 1 Unit(s) of B - Create a SO for 1 Unit(s) of F, confirm => a picking with 2 Unit(s) of A and 1 Unit(s) of B is created - Modify the Ordered Qty to 2 Unit(s) The picking is not updated. This is because `_get_qty_procurement` wrongly computed the product quantity based on the moves' quantities. This is not correct since the moves are for products A and B, not product F. At this point, it is not possible to make sure of the real procurement quantity. therefore, we use a very simple approach: we compare the sold quantity before and after modification, and return the difference. opw-1881227 closes odoo/odoo#27064 --- addons/sale_mrp/models/sale_mrp.py | 11 +++++++++++ addons/sale_stock/models/sale_order.py | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/addons/sale_mrp/models/sale_mrp.py b/addons/sale_mrp/models/sale_mrp.py index 5586d2742e6..57a4ba86631 100644 --- a/addons/sale_mrp/models/sale_mrp.py +++ b/addons/sale_mrp/models/sale_mrp.py @@ -47,6 +47,17 @@ class SaleOrderLine(models.Model): components[product] = {'qty': qty, 'uom': to_uom.id} return components + def _get_qty_procurement(self): + self.ensure_one() + # Specific case when we change the qty on a SO for a kit product. + # We don't try to be too smart and keep a simple approach: we compare the quantity before + # and after update, and return the difference. We don't take into account what was already + # sent, or any other exceptional case. + bom = self.env['mrp.bom']._bom_find(product=self.product_id) + if bom and bom.type == 'phantom' and 'previous_product_uom_qty' in self.env.context: + return self.env.context['previous_product_uom_qty'].get(self.id, 0.0) + return super(SaleOrderLine, self)._get_qty_procurement() + class AccountInvoiceLine(models.Model): # TDE FIXME: what is this code ?? diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py index 486c022d14c..8c3f2289d04 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -99,14 +99,15 @@ class SaleOrderLine(models.Model): @api.multi def write(self, values): - lines = False + lines = self.env['sale.order.line'] if 'product_uom_qty' in values: precision = self.env['decimal.precision'].precision_get('Product Unit of Measure') lines = self.filtered( lambda r: r.state == 'sale' and float_compare(r.product_uom_qty, values['product_uom_qty'], precision_digits=precision) == -1) + previous_product_uom_qty = {line.id: line.product_uom_qty for line in lines} res = super(SaleOrderLine, self).write(values) if lines: - lines._action_launch_procurement_rule() + lines.with_context(previous_product_uom_qty=previous_product_uom_qty)._action_launch_procurement_rule() return res From d61a248523f30526afa73767ac558c38c9dcf9fe Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 25 Sep 2018 14:05:48 +0000 Subject: [PATCH 4/4] [FIX] l10n_es: Correct prefix_code for group 6 closes odoo/odoo#27228 --- addons/l10n_es/data/account_group.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_es/data/account_group.xml b/addons/l10n_es/data/account_group.xml index e4a9303b164..4d457aeba6e 100644 --- a/addons/l10n_es/data/account_group.xml +++ b/addons/l10n_es/data/account_group.xml @@ -2687,7 +2687,7 @@ - 2 + 6 Compras y gastos