[PATCH] Upstream patch - 28092022

This commit is contained in:
Parthiv Patel
2022-09-28 08:35:24 +00:00
parent 13cd88f20c
commit 26f58ee014
5 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -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...
+1 -1
View File
@@ -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>
+2 -3
View File
@@ -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())
+2 -2
View File
@@ -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 () {