diff options
| -rw-r--r-- | addons/l10n_es/data/account_group.xml | 2 | ||||
| -rw-r--r-- | addons/sale_mrp/models/sale_mrp.py | 11 | ||||
| -rw-r--r-- | addons/sale_stock/models/sale_order.py | 5 | ||||
| -rw-r--r-- | addons/website/data/website_demo.xml | 4 | ||||
| -rw-r--r-- | addons/website_forum/i18n/website_forum.pot | 16 | ||||
| -rw-r--r-- | addons/website_forum/models/forum.py | 1 |
6 files changed, 34 insertions, 5 deletions
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 @@ <field name="parent_id" ref="l10n_es.account_group_599"/> </record> <record id="account_group_6" model="account.group"> - <field name="code_prefix">2</field> + <field name="code_prefix">6</field> <field name="name">Compras y gastos</field> </record> <record id="account_group_60" model="account.group"> diff --git a/addons/sale_mrp/models/sale_mrp.py b/addons/sale_mrp/models/sale_mrp.py index 0561aa528df..9b20cd6b471 100644 --- a/addons/sale_mrp/models/sale_mrp.py +++ b/addons/sale_mrp/models/sale_mrp.py @@ -48,6 +48,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 5a2b57e39c4..860ab963ed3 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -179,14 +179,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 not r.is_expense 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 @api.depends('order_id.state') 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", { <t t-set="bs_state_colors" t-value="[['success', 'Success'], ['info', 'Info'], ['warning', 'Warning'], ['danger', 'Danger']]"/> <t t-set="bs_theme_colors" t-value="bs_basic_colors + bs_state_colors"/> <t t-set="bs_gray_colors" t-value="[['white', 'White'], ['gray-lighter', 'Gray Lighter'], ['gray-light', 'Gray Light'], ['gray', 'Gray'], ['gray-dark', 'Gray Dark'], ['gray-darker', 'Gray Darker'], ['black', 'Black']]"/> - <div id="wrap oe_structure"> + <div id="wrap" class="oe_structure"> <section class="py-2"> <div class="container"> <h1>Components</h1> @@ -524,7 +524,7 @@ response = request.render("website.template_partner_comment", { clear: both; } </style> - <div id="wrap oe_structure"> + <div id="wrap" class="oe_structure"> <t t-call="website.snippets"/> </div> </t> diff --git a/addons/website_forum/i18n/website_forum.pot b/addons/website_forum/i18n/website_forum.pot index c63f6298d69..6e78bb953e0 100644 --- a/addons/website_forum/i18n/website_forum.pot +++ b/addons/website_forum/i18n/website_forum.pot @@ -1458,6 +1458,11 @@ 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?" msgstr "" @@ -2199,6 +2204,11 @@ 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 <i class=\"fa fa-times\"/>" msgstr "" @@ -2513,6 +2523,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 "" @@ -2813,6 +2824,11 @@ 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?" msgstr "" diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py index 4b30f165fa5..ee69793cb20 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 = """<section class="bg-info" style="height: 168px;"><div class="container"> <div class="row"> <div class="col-md-12"> |
