mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-08-19 01:34:43 -05:00
[PATCH] Upstream patch - 28092022
This commit is contained in:
@@ -11,5 +11,5 @@ class IrHttp(models.AbstractModel):
|
||||
res = super(IrHttp, self).session_info()
|
||||
if self.env.user.has_group('base.group_user'):
|
||||
res['max_time_between_keys_in_ms'] = int(
|
||||
self.env['ir.config_parameter'].sudo().get_param('barcode.max_time_between_keys_in_ms', default='55'))
|
||||
self.env['ir.config_parameter'].sudo().get_param('barcode.max_time_between_keys_in_ms', default='100'))
|
||||
return res
|
||||
|
||||
@@ -28,7 +28,7 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, {
|
||||
suffix: /[\n\r\t]+/,
|
||||
// Keys from a barcode scanner are usually processed as quick as possible,
|
||||
// but some scanners can use an intercharacter delay (we support <= 50 ms)
|
||||
max_time_between_keys_in_ms: session.max_time_between_keys_in_ms || 55,
|
||||
max_time_between_keys_in_ms: session.max_time_between_keys_in_ms || 100,
|
||||
// To be able to receive the barcode value, an input must be focused.
|
||||
// On mobile devices, this causes the virtual keyboard to open.
|
||||
// Unfortunately it is not possible to avoid this behavior...
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<xpath expr="//h2" position="replace">
|
||||
<h2>
|
||||
<span t-if="o.move_type == 'out_invoice' and o.state == 'open'" t-field="o.journal_id.name"/>
|
||||
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted'" t-field="o.journal_id.name"/>
|
||||
<span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">Draft <span t-field="o.journal_id.name"/></span>
|
||||
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">Cancelled <span t-field="o.journal_id.name"/></span>
|
||||
<span t-if="o.move_type == 'out_refund'">Credit Note</span>
|
||||
|
||||
@@ -11,10 +11,9 @@ class ProductTemplate(models.Model):
|
||||
|
||||
@api.model
|
||||
def _get_buy_route(self):
|
||||
buy_route_id = self.env.ref('purchase_stock.route_warehouse0_buy', raise_if_not_found=False).id
|
||||
buy_route = self.env['stock.location.route'].search([('id', '=', buy_route_id)])
|
||||
buy_route = self.env.ref('purchase_stock.route_warehouse0_buy', raise_if_not_found=False)
|
||||
if buy_route:
|
||||
return buy_route.ids
|
||||
return self.env['stock.location.route'].search([('id', '=', buy_route.id)]).ids
|
||||
return []
|
||||
|
||||
route_ids = fields.Many2many(default=lambda self: self._get_buy_route())
|
||||
|
||||
@@ -227,11 +227,11 @@ var HtmlPage = Class.extend(mixins.PropertiesMixin, {
|
||||
return window.location.origin + window.location.pathname;
|
||||
},
|
||||
title: function () {
|
||||
return $('title').text().trim();
|
||||
return $('head title').text().trim();
|
||||
},
|
||||
changeTitle: function (title) {
|
||||
// TODO create tag if missing
|
||||
$('title').text(title.trim() || this.defaultTitle);
|
||||
$('head title').text(title.trim() || this.defaultTitle);
|
||||
this.trigger('title-changed', title);
|
||||
},
|
||||
description: function () {
|
||||
|
||||
Reference in New Issue
Block a user