diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index 7bcb8432926..df52011118d 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -128,6 +128,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
history.append(partners_amount)
for partner in partners:
+ at_least_one_amount = False
values = {}
# Query here is replaced by one query which gets the all the partners their 'after' value
after = False
diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py
index 5824c07d5c2..c189fc0203b 100644
--- a/addons/account_asset/account_asset.py
+++ b/addons/account_asset/account_asset.py
@@ -127,19 +127,15 @@ class AccountAssetAsset(models.Model):
amount = amount_to_depr / (undone_dotation_number - len(posted_depreciation_line_ids))
if self.prorata and self.category_id.type == 'purchase':
amount = amount_to_depr / self.method_number
- days = total_days - float(depreciation_date.strftime('%j'))
if sequence == 1:
+ days = (self.company_id.compute_fiscalyear_dates(depreciation_date)['date_to'] - depreciation_date).days + 1
amount = (amount_to_depr / self.method_number) / total_days * days
- elif sequence == undone_dotation_number:
- amount = (amount_to_depr / self.method_number) / total_days * (total_days - days)
elif self.method == 'degressive':
amount = residual_amount * self.method_progress_factor
if self.prorata:
- days = total_days - float(depreciation_date.strftime('%j'))
if sequence == 1:
+ days = (self.company_id.compute_fiscalyear_dates(depreciation_date)['date_to'] - depreciation_date).days + 1
amount = (residual_amount * self.method_progress_factor) / total_days * days
- elif sequence == undone_dotation_number:
- amount = (residual_amount * self.method_progress_factor) / total_days * (total_days - days)
return amount
def _compute_board_undone_dotation_nb(self, depreciation_date, total_days):
diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js
index f29ea4ce79a..a2369f494b7 100644
--- a/addons/im_livechat/static/src/js/im_livechat.js
+++ b/addons/im_livechat/static/src/js/im_livechat.js
@@ -2,6 +2,7 @@ odoo.define('im_livechat.im_livechat', function (require) {
"use strict";
var bus = require('bus.bus').bus;
+var config = require('web.config');
var core = require('web.core');
var session = require('web.session');
var time = require('web.time');
@@ -55,10 +56,11 @@ var LivechatButton = Widget.extend({
start: function () {
this.$el.text(this.options.button_text);
+ var small_screen = config.device.size_class === config.device.SIZES.XS;
if (this.history) {
_.each(this.history.reverse(), this.add_message.bind(this));
this.open_chat();
- } else if (this.rule.action === 'auto_popup') {
+ } else if (!small_screen && this.rule.action === 'auto_popup') {
var auto_popup_cookie = utils.get_cookie('im_livechat_auto_popup');
if (!auto_popup_cookie || JSON.parse(auto_popup_cookie)) {
this.auto_popup_timeout = setTimeout(this.open_chat.bind(this), this.rule.auto_popup_timer*1000);
diff --git a/addons/l10n_fr/plan_comptable_general.xml b/addons/l10n_fr/plan_comptable_general.xml
index d16acb998d9..f846e6178a3 100644
--- a/addons/l10n_fr/plan_comptable_general.xml
+++ b/addons/l10n_fr/plan_comptable_general.xml
@@ -2053,7 +2053,7 @@
Personnel - Rémunérations dues
421
-
+
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 79941409762..b0a9dbf0b25 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -570,9 +570,10 @@ class project_project(osv.Model):
class res_partner(osv.osv):
def _issue_count(self, cr, uid, ids, field_name, arg, context=None):
Issue = self.pool['project.issue']
+ partners = {id: self.search(cr, uid, [('id', 'child_of', ids)]) for id in ids}
return {
- partner_id: Issue.search_count(cr,uid, [('partner_id', '=', partner_id)])
- for partner_id in ids
+ partner_id: Issue.search_count(cr, uid, [('partner_id', 'in', partners[partner_id])])
+ for partner_id in partners.keys()
}
""" Inherits partner and adds Issue information in the partner form """
diff --git a/addons/website_mail/models/mail_message.py b/addons/website_mail/models/mail_message.py
index e43a6eca9c0..544282fe813 100644
--- a/addons/website_mail/models/mail_message.py
+++ b/addons/website_mail/models/mail_message.py
@@ -68,4 +68,3 @@ class MailMessage(osv.Model):
if cr.fetchall():
raise AccessError(_('The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: %s, Operation: %s)') % (self._description, operation))
return super(MailMessage, self).check_access_rule(cr, uid, ids=ids, operation=operation, context=context)
-
diff --git a/addons/website_mail/views/website_mail.xml b/addons/website_mail/views/website_mail.xml
index 50192030cc2..d0df8e6b5a1 100644
--- a/addons/website_mail/views/website_mail.xml
+++ b/addons/website_mail/views/website_mail.xml
@@ -73,7 +73,7 @@
-
+