[MERGE] forward port branch saas-14 up to 6e0c89867e

This commit is contained in:
Christophe Simonis
2019-04-04 19:34:35 +02:00
8 changed files with 37 additions and 17 deletions
@@ -133,7 +133,7 @@
<field name="salvage_value" widget="monetary" options="{'currency_field': 'currency_id'}" attrs="{'invisible': [('type','=','sale')]}"/>
<field name="value_residual" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="partner_id" string="Vendor" domain="[('supplier', '=', True)]"/>
<field name="invoice_id" string="Invoice" options="{'no_create': True}"/>
<field name="invoice_id" string="Invoice" attrs="{'readonly': [('state', '!=', 'draft')]}" options="{'no_create': True}"/>
</group>
</group>
<notebook colspan="4">
+1 -1
View File
@@ -253,7 +253,7 @@
<field name="type_tax_use">sale</field>
<field name="refund_account_id" ref="chart22030200"/>
<field name="account_id" ref="chart22030200"/>
<field name="tag_ids" eval="[ref('l10n_pl.tag_pl_08'), ref('l10n_pl.tag_pl_29')]"/>
<field name="tag_ids" eval="[(6,0,[ref('l10n_pl.tag_pl_08'), ref('l10n_pl.tag_pl_29')])]"/>
</record>
<record id="vs_kraj_5" model="account.tax.template">
@@ -1315,6 +1315,13 @@ msgstr ""
msgid "Group Journal Items"
msgstr ""
#. module: point_of_sale
#. openerp-web
#: code:addons/point_of_sale/static/src/js/models.js:135
#, python-format
msgid "HTTPS connection to IoT Box failed"
msgstr ""
#. module: point_of_sale
#. openerp-web
#: code:addons/point_of_sale/static/src/xml/pos.xml:1327
@@ -1637,6 +1644,13 @@ msgstr ""
msgid "Make Payment"
msgstr ""
#. module: point_of_sale
#. openerp-web
#: code:addons/point_of_sale/static/src/js/models.js:137
#, python-format
msgid "Make sure you are using IoT Box v18.12 or higher. Navigate to %s to accept the certificate of your IoT Box."
msgstr ""
#. module: point_of_sale
#: model:res.groups,name:point_of_sale.group_pos_manager
msgid "Manager"
@@ -630,9 +630,6 @@ var Chrome = PosBaseWidget.extend({
if(err.message === 'XmlHttpRequestError '){
title = 'Network Failure (XmlHttpRequestError)';
body = 'The Point of Sale could not be loaded due to a network problem.\n Please check your internet connection.';
}else if(err.message === 'TLSError'){
title = 'Https connection to IoT Box failed';
body = 'Make sure you are using IoT Box v18.10 or higher.\n\n Navigate to ' + err.url + ' to accept the certificate of your IoT Box.';
}else if(err.code === 200){
title = err.data.message;
body = err.data.debug;
+10 -5
View File
@@ -129,11 +129,16 @@ exports.PosModel = Backbone.Model.extend({
done.resolve();
},
function(statusText, url){
if (statusText == 'error' && window.location.protocol == 'https:') {
var error = {message: 'TLSError', url: url};
self.chrome.loading_error(error);
} else {
done.resolve();
var show_loading_error = (self.gui.current_screen === null);
done.resolve();
if (show_loading_error && statusText == 'error' && window.location.protocol == 'https:') {
self.gui.show_popup('alert', {
title: _t('HTTPS connection to IoT Box failed'),
body: _.str.sprintf(
_t('Make sure you are using IoT Box v18.12 or higher. Navigate to %s to accept the certificate of your IoT Box.'),
url
),
});
}
});
return done;
+5 -1
View File
@@ -10,6 +10,7 @@ from odoo.osv import expression
import odoo.addons.decimal_precision as dp
class ProductCategory(models.Model):
_name = "product.category"
_description = "Product Category"
@@ -520,7 +521,10 @@ class ProductProduct(models.Model):
if date is None:
date = fields.Date.today()
res = self.env['product.supplierinfo']
for seller in self.seller_ids:
sellers = self.seller_ids
if self.env.context.get('force_company'):
sellers = sellers.filtered(lambda s: not s.company_id or s.company_id.id == self.env.context['force_company'])
for seller in sellers:
# Set quantity in UoM of seller
quantity_uom_seller = quantity
if quantity_uom_seller and uom_id and uom_id != seller.product_uom:
+2 -2
View File
@@ -956,7 +956,7 @@ class ProcurementOrder(models.Model):
Purchase Order created to satisfy the given procurement. """
self.ensure_one()
seller = self.product_id._select_seller(
seller = self.product_id.with_context(force_company=self.company_id.id)._select_seller(
partner_id=partner,
quantity=self.product_qty,
date=fields.Date.to_string(schedule_date),
@@ -969,7 +969,7 @@ class ProcurementOrder(models.Model):
self.ensure_one()
procurement_uom_po_qty = self.product_uom._compute_quantity(self.product_qty, self.product_id.uom_po_id)
seller = self.product_id._select_seller(
seller = self.product_id.with_context(force_company=self.company_id.id)._select_seller(
partner_id=supplier.name,
quantity=procurement_uom_po_qty,
date=po.date_order and po.date_order[:10],
+4 -4
View File
@@ -768,7 +768,7 @@ function createVideoNode(url, options) {
options = options || {};
// video url patterns(youtube, instagram, vimeo, dailymotion, youku)
var ytRegExp = /^(?:(?:https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
var ytRegExp = /^(?:(?:https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube(-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((?:\w|-){11})(?:\S+)?$/;
var ytMatch = url.match(ytRegExp);
var igRegExp = /\/\/instagram.com\/p\/(.[a-zA-Z0-9]*)/;
@@ -787,10 +787,10 @@ function createVideoNode(url, options) {
var youkuMatch = url.match(youkuRegExp);
var $video = $('<iframe>');
if (ytMatch && ytMatch[1].length === 11) {
var youtubeId = ytMatch[1];
if (ytMatch && ytMatch[2].length === 11) {
var youtubeId = ytMatch[2];
$video = $('<iframe>', {
src: '//www.youtube.com/embed/' + youtubeId,
src: '//www.youtube' + (ytMatch[1] || '') + '.com/embed/' + youtubeId,
width: '640',
height: '360'
});