[MERGE] forward port of branch saas-10 up to d35d8c3
This commit is contained in:
@@ -148,19 +148,15 @@ class AccountAssetAsset(models.Model):
|
|||||||
amount = amount_to_depr / (undone_dotation_number - len(posted_depreciation_line_ids))
|
amount = amount_to_depr / (undone_dotation_number - len(posted_depreciation_line_ids))
|
||||||
if self.prorata and self.category_id.type == 'purchase':
|
if self.prorata and self.category_id.type == 'purchase':
|
||||||
amount = amount_to_depr / self.method_number
|
amount = amount_to_depr / self.method_number
|
||||||
days = total_days - float(depreciation_date.strftime('%j'))
|
|
||||||
if sequence == 1:
|
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
|
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':
|
elif self.method == 'degressive':
|
||||||
amount = residual_amount * self.method_progress_factor
|
amount = residual_amount * self.method_progress_factor
|
||||||
if self.prorata:
|
if self.prorata:
|
||||||
days = total_days - float(depreciation_date.strftime('%j'))
|
|
||||||
if sequence == 1:
|
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
|
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
|
return amount
|
||||||
|
|
||||||
def _compute_board_undone_dotation_nb(self, depreciation_date, total_days):
|
def _compute_board_undone_dotation_nb(self, depreciation_date, total_days):
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ odoo.define('im_livechat.im_livechat', function (require) {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var bus = require('bus.bus').bus;
|
var bus = require('bus.bus').bus;
|
||||||
|
var config = require('web.config');
|
||||||
var core = require('web.core');
|
var core = require('web.core');
|
||||||
var session = require('web.session');
|
var session = require('web.session');
|
||||||
var time = require('web.time');
|
var time = require('web.time');
|
||||||
@@ -55,10 +56,11 @@ var LivechatButton = Widget.extend({
|
|||||||
|
|
||||||
start: function () {
|
start: function () {
|
||||||
this.$el.text(this.options.button_text);
|
this.$el.text(this.options.button_text);
|
||||||
|
var small_screen = config.device.size_class === config.device.SIZES.XS;
|
||||||
if (this.history) {
|
if (this.history) {
|
||||||
_.each(this.history.reverse(), this.add_message.bind(this));
|
_.each(this.history.reverse(), this.add_message.bind(this));
|
||||||
this.open_chat();
|
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');
|
var auto_popup_cookie = utils.get_cookie('im_livechat_auto_popup');
|
||||||
if (!auto_popup_cookie || JSON.parse(auto_popup_cookie)) {
|
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);
|
this.auto_popup_timeout = setTimeout(this.open_chat.bind(this), this.rule.auto_popup_timer*1000);
|
||||||
|
|||||||
@@ -2053,7 +2053,7 @@
|
|||||||
<record id="pcg_421" model="account.account.template">
|
<record id="pcg_421" model="account.account.template">
|
||||||
<field name="name">Personnel - Rémunérations dues</field>
|
<field name="name">Personnel - Rémunérations dues</field>
|
||||||
<field name="code">421</field>
|
<field name="code">421</field>
|
||||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
<field name="user_type_id" ref="account.data_account_type_payable"/>
|
||||||
<field name="reconcile" eval="True"/>
|
<field name="reconcile" eval="True"/>
|
||||||
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -570,9 +570,10 @@ class project_project(osv.Model):
|
|||||||
class res_partner(osv.osv):
|
class res_partner(osv.osv):
|
||||||
def _issue_count(self, cr, uid, ids, field_name, arg, context=None):
|
def _issue_count(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
Issue = self.pool['project.issue']
|
Issue = self.pool['project.issue']
|
||||||
|
partners = {id: self.search(cr, uid, [('id', 'child_of', ids)]) for id in ids}
|
||||||
return {
|
return {
|
||||||
partner_id: Issue.search_count(cr,uid, [('partner_id', '=', partner_id)])
|
partner_id: Issue.search_count(cr, uid, [('partner_id', 'in', partners[partner_id])])
|
||||||
for partner_id in ids
|
for partner_id in partners.keys()
|
||||||
}
|
}
|
||||||
|
|
||||||
""" Inherits partner and adds Issue information in the partner form """
|
""" Inherits partner and adds Issue information in the partner form """
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<template id="assets_editor" inherit_id="website.assets_editor" name="Blog Editor" groups="base.group_website_publisher">
|
<template id="assets_editor" inherit_id="website.assets_editor" name="Blog Editor">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.editor.js"></script>
|
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.editor.js"></script>
|
||||||
<script type="text/javascript" src="/website_blog/static/src/js/website.tour.blog.js"></script>
|
<script type="text/javascript" src="/website_blog/static/src/js/website.tour.blog.js"></script>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="assets_editor" inherit_id="website.assets_editor" name="Event Editor" groups="event.group_event_manager">
|
<template id="assets_editor" inherit_id="website.assets_editor" name="Event Editor">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js"></script>
|
<script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js"></script>
|
||||||
<script type="text/javascript" src="/website_event/static/src/js/website.tour.event.js"></script>
|
<script type="text/javascript" src="/website_event/static/src/js/website.tour.event.js"></script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<data>
|
<data>
|
||||||
|
|
||||||
<!-- Editor custom -->
|
<!-- Editor custom -->
|
||||||
<template id="assets_editor" inherit_id="website.assets_editor" name="Forum Editor Assets" groups="base.group_user">
|
<template id="assets_editor" inherit_id="website.assets_editor" name="Forum Editor Assets">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript" src="/website_forum/static/src/js/website_tour_forum.js"/>
|
<script type="text/javascript" src="/website_forum/static/src/js/website_tour_forum.js"/>
|
||||||
<script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
|
<script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<template id="gengo_assets_editor" inherit_id="website.assets_editor" name="Editor Head" groups="base.group_website_publisher">
|
<template id="gengo_assets_editor" inherit_id="website.assets_editor" name="Editor Head">
|
||||||
<xpath expr='.' position="inside">
|
<xpath expr='.' position="inside">
|
||||||
<link rel="stylesheet" href="/website_gengo/static/src/css/website_gengo.css"></link>
|
<link rel="stylesheet" href="/website_gengo/static/src/css/website_gengo.css"></link>
|
||||||
<script type="text/javascript" src="/website_gengo/static/src/js/website_gengo.js"></script>
|
<script type="text/javascript" src="/website_gengo/static/src/js/website_gengo.js"></script>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</t>
|
</t>
|
||||||
<t t-foreach="messages" t-as="message">
|
<t t-foreach="messages" t-as="message">
|
||||||
<t t-if="message.website_published or website.env.user.sudo(website.env.user.id).has_group('base.group_website_publisher')">
|
<t t-if="message.website_published or website.env.user.sudo(website.env.user.id).has_group('base.group_website_publisher')">
|
||||||
<li class="media" t-if="message.message_type == 'comment'" t-att-id="'message-%s' % message.id">
|
<li class="media" t-if="message.message_type != 'notification'" t-att-id="'message-%s' % message.id">
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<img class="media-object pull-left img-circle" t-attf-src="/mail/#{message.model}/#{message.res_id}/avatar/#{message.author_id.id}"
|
<img class="media-object pull-left img-circle" t-attf-src="/mail/#{message.model}/#{message.res_id}/avatar/#{message.author_id.id}"
|
||||||
style="width: 50px; margin-right: 10px;"/>
|
style="width: 50px; margin-right: 10px;"/>
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ contentMenu.TopBar.include({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(!$('.js_sale').length) {
|
||||||
|
return $.Deferred().reject("DOM doesn't contain '.js_sale'");
|
||||||
|
}
|
||||||
|
|
||||||
options.registry.website_sale = options.Class.extend({
|
options.registry.website_sale = options.Class.extend({
|
||||||
start: function () {
|
start: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="assets_editor" inherit_id="website.assets_editor" name="Shop Editor" groups="base.group_sale_manager">
|
<template id="assets_editor" inherit_id="website.assets_editor" name="Shop Editor">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript" src="/website_sale/static/src/js/website_sale.editor.js"></script>
|
<script type="text/javascript" src="/website_sale/static/src/js/website_sale.editor.js"></script>
|
||||||
<script type="text/javascript" src="/website_sale/static/src/js/website_sale_tour_shop.js"></script>
|
<script type="text/javascript" src="/website_sale/static/src/js/website_sale_tour_shop.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user