[MERGE] forward port branch saas-11.3 up to 4846c30c90
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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')"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user