[MERGE] forward port branch saas-11.2 up to 611c86dbc7

This commit is contained in:
Christophe Simonis
2018-07-02 15:02:48 +02:00
12 changed files with 25 additions and 16 deletions
@@ -310,7 +310,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',
@@ -168,6 +168,9 @@
}
/* info popover */
.popover {
max-width: none;
}
table.details {
vertical-align: top;
@@ -218,6 +221,7 @@
}
&[data-mode="match"] > .match {
max-height: none;
overflow: visible;
.o-transition(max-height, 400ms);
}
&[data-mode="create"] > .create {
@@ -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>
+2
View File
@@ -77,6 +77,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')
+1 -1
View File
@@ -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)]}" string="Reserved"/>
<field name="quantity_done" string="Consumed"/>
<field name="quantity_done" string="Consumed" readonly="1"/>
</tree>
</field>
</page>
+2 -2
View File
@@ -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 &gt; 0) and (qty_done&gt;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')"/>
@@ -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>
+2 -2
View File
@@ -54,7 +54,7 @@ class TestSaleStock(TestSale):
pick_2 = self.so.picking_ids[0]
pick_2.force_assign()
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]
@@ -106,7 +106,7 @@ class TestSaleStock(TestSale):
pick = self.so.picking_ids
pick.force_assign()
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')
+1 -1
View File
@@ -268,7 +268,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.
+1 -1
View File
@@ -752,7 +752,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')
+4 -3
View File
@@ -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) {
.o-inline-flex-display();
}
.o-inline-flex-display();
> span, > button {
.o-flex(0, 0, auto);
}
@@ -235,6 +233,9 @@
// Radio buttons
&.o_field_radio {
@media (max-width: @screen-xs-max) {
display: inline-block;
}
.o_radio_input {
outline: none;
}
@@ -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');
});
});
}