diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-07-02 15:16:20 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-07-02 15:16:20 +0200 |
| commit | a0c5b58d5d2c9ed39995c8dbc65b68152d9facff (patch) | |
| tree | 30ca7622fcc14c3a8a91deb2bdad5ef855a07108 | |
| parent | 683b0746beda2a2e89afc401be8baebba0583129 (diff) | |
| parent | 4846c30c90abdd32bdc16715892e46ec1797c25c (diff) | |
[MERGE] forward port branch saas-11.3 up to 4846c30c90a
| -rw-r--r-- | addons/account/static/src/js/reconciliation/reconciliation_renderer.js | 4 | ||||
| -rw-r--r-- | addons/account/static/src/scss/account_reconciliation.scss | 4 | ||||
| -rw-r--r-- | addons/account/static/src/xml/account_reconciliation.xml | 2 | ||||
| -rw-r--r-- | addons/auth_signup/controllers/main.py | 2 | ||||
| -rw-r--r-- | addons/mrp/views/mrp_production_views.xml | 2 | ||||
| -rw-r--r-- | addons/mrp/views/stock_move_views.xml | 4 | ||||
| -rw-r--r-- | addons/sale/report/invoice_report_templates.xml | 4 | ||||
| -rw-r--r-- | addons/sale_stock/tests/test_sale_stock.py | 4 | ||||
| -rw-r--r-- | addons/stock/models/stock_move_line.py | 2 | ||||
| -rw-r--r-- | addons/stock/models/stock_picking.py | 2 | ||||
| -rw-r--r-- | addons/web/static/src/scss/fields.scss | 7 | ||||
| -rw-r--r-- | addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js | 4 |
12 files changed, 25 insertions, 16 deletions
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js index ec27bc54d2f..cdbc5a0ebf3 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js @@ -315,7 +315,9 @@ var LineRenderer = Widget.extend(FieldManagerMixin, { }; self.fields.partner_id.appendTo(self.$('.accounting_view caption')); }); - this.$('thead .line_info_button').attr("data-content", qweb.render('reconciliation.line.statement_line.details', {'state': this._initialState})); + $('<span class="line_info_button fa fa-info-circle"/>') + .appendTo(this.$('thead .cell_info_popover')) + .attr("data-content", qweb.render('reconciliation.line.statement_line.details', {'state': this._initialState})); this.$el.popover({ 'selector': '.line_info_button', 'placement': 'left', diff --git a/addons/account/static/src/scss/account_reconciliation.scss b/addons/account/static/src/scss/account_reconciliation.scss index 204337c5808..605774d22f2 100644 --- a/addons/account/static/src/scss/account_reconciliation.scss +++ b/addons/account/static/src/scss/account_reconciliation.scss @@ -160,6 +160,9 @@ } /* info popover */ + .popover { + max-width: none; + } table.details { vertical-align: top; @@ -200,6 +203,7 @@ } &[data-mode="match"] > .match { max-height: none; + overflow: visible; @include o-transition(max-height, 400ms); } &[data-mode="create"] > .create { diff --git a/addons/account/static/src/xml/account_reconciliation.xml b/addons/account/static/src/xml/account_reconciliation.xml index a367feb03c0..9b9df5dab7d 100644 --- a/addons/account/static/src/xml/account_reconciliation.xml +++ b/addons/account/static/src/xml/account_reconciliation.xml @@ -260,7 +260,7 @@ <tr><td>Description</td><td><t t-esc="state.st_line.name"/></td></tr> <tr><td>Amount</td><td><t t-raw="state.st_line.amount_str"/><t t-if="state.st_line.amount_currency_str"> (<t t-esc="state.st_line.amount_currency_str"/>)</t></td></tr> <tr><td>Account</td><td><t t-esc="state.st_line.account_code"/> <t t-esc="state.st_line.account_name"/></td></tr> - <tr t-if="state.st_line.note"><td>Note</td><td><t t-esc="state.st_line.note"/></td></tr> + <tr t-if="state.st_line.note"><td>Note</td><td style="white-space: pre;"><t t-esc="state.st_line.note"/></td></tr> </table> </t> diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index 7410521e901..6a3f055ecf7 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -78,6 +78,8 @@ class AuthSignupHome(Home): login, request.env.user.login, request.httprequest.remote_addr) request.env['res.users'].sudo().reset_password(login) qcontext['message'] = _("An email has been sent with credentials to reset your password") + except UserError as e: + qcontext['error'] = e.name or e.value except SignupError: qcontext['error'] = _("Could not reset your password") _logger.exception('error when resetting password') diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 48d7ae71b56..2e548a9f62e 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -127,7 +127,7 @@ <field name="state" invisible="1" force_save="1"/> <field name="product_uom_qty" string="To Consume"/> <field name="reserved_availability" attrs="{'invisible': [('is_done', '=', True)], 'column_invisible': [('parent.state', '=', 'done')]}" string="Reserved"/> - <field name="quantity_done" string="Consumed"/> + <field name="quantity_done" string="Consumed" readonly="1"/> </tree> </field> </page> diff --git a/addons/mrp/views/stock_move_views.xml b/addons/mrp/views/stock_move_views.xml index 7a5bf1a4011..ff2cfec238c 100644 --- a/addons/mrp/views/stock_move_views.xml +++ b/addons/mrp/views/stock_move_views.xml @@ -22,7 +22,7 @@ <label for="product_uom_qty"/> <div class="o_row"> <span><field name="product_uom_qty" readonly="1" nolabel="1"/></span> - <span><field name="product_uom" attrs="{'readonly': [('id', '!=', False)]}" nolabel="1"/></span> + <span><field name="product_uom" readonly="1" nolabel="1"/></span> </div> <label for="quantity_done"/> <div class="o_row"> @@ -44,7 +44,7 @@ <field name="finished_lots_exist" invisible="1"/> </group> </group> - <field name="active_move_line_ids" attrs="{'readonly': [('is_locked', '=', True)], 'invisible': [('has_tracking', '=', 'none'), ('finished_lots_exist', '=', False)]}" context="{'default_workorder_id': workorder_id, 'default_product_uom_id': product_uom, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_production_id': production_id or raw_material_production_id}"> + <field name="active_move_line_ids" attrs="{'readonly': [('is_locked', '=', True)]}" context="{'default_workorder_id': workorder_id, 'default_product_uom_id': product_uom, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_production_id': production_id or raw_material_production_id}"> <tree editable="bottom" decoration-success="product_qty==qty_done" decoration-danger="(product_qty > 0) and (qty_done>product_qty)"> <field name="lot_id" attrs="{'column_invisible': [('parent.has_tracking', '=', 'none')]}" domain="[('product_id', '=', parent.product_id)]" context="{'default_product_id': parent.product_id}"/> <field name="lot_produced_id" options="{'no_open': True, 'no_create': True}" domain="[('id', 'in', parent.order_finished_lot_ids)]" invisible="not context.get('final_lots')"/> diff --git a/addons/sale/report/invoice_report_templates.xml b/addons/sale/report/invoice_report_templates.xml index e7a3598ce0d..5315f5e4979 100644 --- a/addons/sale/report/invoice_report_templates.xml +++ b/addons/sale/report/invoice_report_templates.xml @@ -22,7 +22,7 @@ <th class="text-right">Unit Price</th> <th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th> <th class="text-right">Taxes</th> - <th class="text-right">Price</th> + <th class="text-right">Amount</th> </tr> </thead> <tbody class="invoice_tbody"> @@ -53,7 +53,7 @@ <td class="text-right"> <span t-esc="', '.join(map(lambda x: x.description or x.name, l.invoice_line_tax_ids))"/> </td> - <td class="text-right" groups="sale.group_show_price_subtotal"> + <td class="text-right"> <span t-field="l.price_subtotal" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> </td> diff --git a/addons/sale_stock/tests/test_sale_stock.py b/addons/sale_stock/tests/test_sale_stock.py index 0d35dc00190..398d3f5efa1 100644 --- a/addons/sale_stock/tests/test_sale_stock.py +++ b/addons/sale_stock/tests/test_sale_stock.py @@ -52,7 +52,7 @@ class TestSaleStock(TestSale): self.assertEqual(len(self.so.picking_ids), 2, 'Sale Stock: number of pickings should be 2') pick_2 = self.so.picking_ids[0] pick_2.move_lines.write({'quantity_done': 1}) - self.assertIsNone(pick_2.button_validate(), 'Sale Stock: second picking should be final without need for a backorder') + self.assertTrue(pick_2.button_validate(), 'Sale Stock: second picking should be final without need for a backorder') self.assertEqual(self.so.invoice_status, 'to invoice', 'Sale Stock: so invoice_status should be "to invoice" after complete delivery') del_qties = [sol.qty_delivered for sol in self.so.order_line] del_qties_truth = [2.0 if sol.product_id.type in ['product', 'consu'] else 0.0 for sol in self.so.order_line] @@ -103,7 +103,7 @@ class TestSaleStock(TestSale): # deliver, check the delivered quantities pick = self.so.picking_ids pick.move_lines.write({'quantity_done': 2}) - self.assertIsNone(pick.button_validate(), 'Sale Stock: complete delivery should not need a backorder') + self.assertTrue(pick.button_validate(), 'Sale Stock: complete delivery should not need a backorder') del_qties = [sol.qty_delivered for sol in self.so.order_line] del_qties_truth = [2.0 if sol.product_id.type in ['product', 'consu'] else 0.0 for sol in self.so.order_line] self.assertEqual(del_qties, del_qties_truth, 'Sale Stock: delivered quantities are wrong after partial delivery') diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py index 65572945870..4b0dfdd41d7 100644 --- a/addons/stock/models/stock_move_line.py +++ b/addons/stock/models/stock_move_line.py @@ -262,7 +262,7 @@ class StockMoveLine(models.Model): except UserError: pass if new_product_qty != ml.product_qty: - new_product_uom_qty = self.product_id.uom_id._compute_quantity(new_product_qty, self.product_uom_id, rounding_method='HALF-UP') + new_product_uom_qty = ml.product_id.uom_id._compute_quantity(new_product_qty, ml.product_uom_id, rounding_method='HALF-UP') ml.with_context(bypass_reservation_update=True).product_uom_qty = new_product_uom_qty # When editing a done move line, the reserved availability of a potential chained move is impacted. Take care of running again `_action_assign` on the concerned moves. diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 95c665d20ff..80dc2069ad6 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -737,7 +737,7 @@ class Picking(models.Model): if self._check_backorder(): return self.action_generate_backorder_wizard() self.action_done() - return + return True def action_generate_backorder_wizard(self): view = self.env.ref('stock.view_backorder_confirmation') diff --git a/addons/web/static/src/scss/fields.scss b/addons/web/static/src/scss/fields.scss index 2a35c33005a..8a5ee6201bd 100644 --- a/addons/web/static/src/scss/fields.scss +++ b/addons/web/static/src/scss/fields.scss @@ -39,9 +39,7 @@ // Flex fields (inline) &.o_field_many2one, &.o_field_radio, &.o_field_many2manytags, &.o_field_percent_pie, &.o_field_monetary, &.o_field_binary_file { - @media (min-width: $screen-sm-min) { - @include o-inline-flex-display; - } + @include o-inline-flex-display; > span, > button { @include o-flex(0, 0, auto); } @@ -255,6 +253,9 @@ } // Radio buttons &.o_field_radio { + @media (max-width: $screen-xs-max) { + display: inline-block; + } .o_radio_input { outline: none; } diff --git a/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js b/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js index 55040849635..153527096a5 100644 --- a/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js +++ b/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js @@ -29,9 +29,9 @@ var ProductWishlist = Widget.extend({ if ($('.wishlist-section').length) { $('.wishlist-section a.o_wish_rm').on('click', function (e){ self.wishlist_rm(e, false); }); $('.wishlist-section a.o_wish_add').on('click', function (e){ - $(e.currentTarget).addClass('disabled'); + $('.wishlist-section a.o_wish_add').addClass('disabled'); self.wishlist_add_or_mv(e).then(function(o) { - $(e.currentTarget).removeClass('disabled'); + $('.wishlist-section a.o_wish_add').removeClass('disabled'); }); }); } |
