Skip to content
Permalink
Browse files

[MERGE] forward port branch 10.0 up to 36ba37a

  • Loading branch information...
KangOl committed Mar 18, 2019
2 parents d5a8b23 + 36ba37a commit 5162ca7be7dbc994d60fbcbf080ff09f9fa12bc0
@@ -150,7 +150,7 @@ def _get_html(self):
</head>
<body class="original_body">
<div hidden class="shadow"></div>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<h1>Odoo Point of Sale</h1>
@@ -32,8 +32,8 @@
$("head").append($parsedHTML.find(".resources").html());
}

$(".container").html($parsedHTML.find('.pos-customer_facing_display').html());
$(".container").attr('class', 'container').addClass($parsedHTML.find('.pos-customer_facing_display').attr('class'));
$(".container-fluid").html($parsedHTML.find('.pos-customer_facing_display').html());
$(".container-fluid").attr('class', 'container-fluid').addClass($parsedHTML.find('.pos-customer_facing_display').attr('class'));

var d = $('.pos_orderlines_list');
d.scrollTop(d.prop("scrollHeight"));
@@ -222,11 +222,13 @@ def _get_lines(self, dispatchmode=False, extendedmode=False):
if dispatchmode:
mode1 = 'out_invoice'
mode2 = 'in_refund'
extrf = "29"
declcode = self._get_expedition_code(extendedmode)
declform = self._get_expedition_form(extendedmode)
else:
mode1 = 'in_invoice'
mode2 = 'out_refund'
extrf = "19"
declcode = self._get_reception_code(extendedmode)
declform = self._get_reception_form(extendedmode)

@@ -271,7 +273,7 @@ def _get_lines(self, dispatchmode=False, extendedmode=False):
invoicelines = self.env['account.invoice.line'].browse(invoicelines_ids)

for inv_line in invoicelines:
linekey = self._get_intrastat_linekey(declcode, inv_line, dispatchmode, extendedmode)
linekey = self._get_intrastat_linekey(extrf, inv_line, dispatchmode, extendedmode)
if linekey is None:
continue

@@ -93,7 +93,7 @@ def get_error_messages(self):
partners_error_empty |= wizard_user.partner_id
elif email in emails:
partners_error_emails |= wizard_user.partner_id
user = self.env['res.users'].sudo().with_context(active_test=False).search([('login', '=', email)])
user = self.env['res.users'].sudo().with_context(active_test=False).search([('login', '=ilike', email)])
if user:
partners_error_user |= wizard_user.partner_id
emails.append(email)
@@ -173,7 +173,7 @@ var QWeb2 = {
new_dict[as_first] = index === 0;
new_dict[as_last] = index + 1 === size;
new_dict[as_parity] = (index % 2 == 1 ? 'odd' : 'even');
if (cur.constructor === Object) {
if (cur && cur.constructor === Object) {
this.extend(new_dict, cur);
}
new_dict[as] = cur;
@@ -206,7 +206,7 @@ class CurrencyRate(models.Model):

name = fields.Datetime(string='Date', required=True, index=True,
default=lambda self: fields.Date.today() + ' 00:00:00')
rate = fields.Float(digits=(12, 6), help='The rate of the currency to the currency of rate 1')
rate = fields.Float(digits=(12, 6), default=1.0, help='The rate of the currency to the currency of rate 1')
currency_id = fields.Many2one('res.currency', string='Currency', readonly=True)
company_id = fields.Many2one('res.company', string='Company',
default=lambda self: self.env.user.company_id)
@@ -425,7 +425,7 @@ def _commercial_sync_from_company(self):
as if they were related fields """
commercial_partner = self.commercial_partner_id
if commercial_partner != self:
sync_vals = commercial_partner._update_fields_values(self._commercial_fields())
sync_vals = commercial_partner.with_prefetch()._update_fields_values(self._commercial_fields())
self.write(sync_vals)

@api.multi

0 comments on commit 5162ca7

Please sign in to comment.
You can’t perform that action at this time.