[MERGE] forward port branch 9.0 up to 3e31dc0ba4
This commit is contained in:
@@ -393,7 +393,7 @@ class AccountInvoice(models.Model):
|
||||
default_model='account.invoice',
|
||||
default_res_id=self.id,
|
||||
default_use_template=bool(template),
|
||||
default_template_id=template.id,
|
||||
default_template_id=template and template.id or False,
|
||||
default_composition_mode='comment',
|
||||
mark_invoice_as_sent=True,
|
||||
)
|
||||
|
||||
@@ -399,7 +399,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||
table_name = self.pool[model_name]._table
|
||||
|
||||
# get the current value
|
||||
sql = "select id, %s from %s" % (field_name, table_name)
|
||||
sql = "select id, \"%s\" from \"%s\"" % (field_name, table_name)
|
||||
cr.execute(sql)
|
||||
records = cr.dictfetchall()
|
||||
for record in records:
|
||||
@@ -436,7 +436,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||
if anonymized_value is None:
|
||||
self._raise_after_history_update(cr, uid, history_id, _('Error !'), _("Anonymized value can not be empty."))
|
||||
|
||||
sql = "update %(table)s set %(field)s = %%(anonymized_value)s where id = %%(id)s" % {
|
||||
sql = "update \"%(table)s\" set \"%(field)s\" = %%(anonymized_value)s where id = %%(id)s" % {
|
||||
'table': table_name,
|
||||
'field': field_name,
|
||||
}
|
||||
@@ -544,7 +544,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||
custom_updates.sort(key=itemgetter('sequence'))
|
||||
queries = [(record['query'], record['query_type']) for record in custom_updates if record['query_type']]
|
||||
elif table_name:
|
||||
queries = [("update %(table)s set %(field)s = %%(value)s where id = %%(id)s" % {
|
||||
queries = [("update \"%(table)s\" set \"%(field)s\" = %%(value)s where id = %%(id)s" % {
|
||||
'table': table_name,
|
||||
'field': line['field_id'],
|
||||
}, 'sql')]
|
||||
|
||||
@@ -858,7 +858,7 @@ class Message(models.Model):
|
||||
def _invalidate_documents(self):
|
||||
""" Invalidate the cache of the documents followed by ``self``. """
|
||||
for record in self:
|
||||
if record.res_id:
|
||||
if record.model and record.res_id:
|
||||
self.env[record.model].invalidate_cache(ids=[record.res_id])
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -189,6 +189,7 @@ td {
|
||||
height: 100%;
|
||||
display: table;
|
||||
border: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
.pos .window .subwindow{
|
||||
display: table-row;
|
||||
@@ -213,6 +214,19 @@ td {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pos .clientlist-screen .window,
|
||||
.pos .clientlist-screen .full-content .subwindow{
|
||||
display: block;
|
||||
}
|
||||
.pos .clientlist-screen .full-content .subwindow-container{
|
||||
display: block;
|
||||
height: 100%;
|
||||
}
|
||||
.pos .clientlist-screen .full-content .subwindow.collapsed,
|
||||
.pos .clientlist-screen .full-content .subwindow-container.collapsed{
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* ---- Scrollers ----- */
|
||||
|
||||
.pos .scroller-container{
|
||||
@@ -701,6 +715,7 @@ td {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
text-align: center;
|
||||
width: 216px;
|
||||
margin: 16px;
|
||||
margin-top: 8px;
|
||||
margin-left: 0px;
|
||||
|
||||
@@ -1309,6 +1309,9 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
||||
var new_height = contents.height();
|
||||
|
||||
if(!this.details_visible){
|
||||
// resize client list to take into account client details
|
||||
parent.height('-=' + new_height);
|
||||
|
||||
if(clickpos < scroll + new_height + 20 ){
|
||||
parent.scrollTop( clickpos - 20 );
|
||||
}else{
|
||||
@@ -1338,6 +1341,7 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
||||
});
|
||||
} else if (visibility === 'hide') {
|
||||
contents.empty();
|
||||
parent.height('100%');
|
||||
if( height > scroll ){
|
||||
contents.css({height:height+'px'});
|
||||
contents.animate({height:0},400,function(){
|
||||
|
||||
@@ -141,7 +141,10 @@ class wizard_user(osv.osv_memory):
|
||||
user_id = False
|
||||
# create a user if necessary, and make sure it is in the portal group
|
||||
if not user:
|
||||
company_id = wizard_user.partner_id.company_id.id
|
||||
if wizard_user.partner_id.company_id:
|
||||
company_id = wizard_user.partner_id.company_id.id
|
||||
else:
|
||||
company_id = self.pool['res.company']._company_default_get(cr, uid, 'res.users', context=context)
|
||||
user_id = self._create_user(cr, SUPERUSER_ID, wizard_user.id, dict(context, company_id=company_id))
|
||||
else:
|
||||
user_id = user.id
|
||||
|
||||
@@ -246,7 +246,6 @@
|
||||
|
||||
<div class="well well-lg">
|
||||
<strong>Need help with defining your Projects? Contact us now.</strong><br/>
|
||||
<a href="https://www.odoo.com/page/live-chat" target="_blank" style="margin-right:10px"><span class="fa fa-comment-o"/> Website Live Chat</a>
|
||||
<a href="https://www.odoo.com/help"><span class="fa fa-envelope-o"/> Email Our Project Expert</a>
|
||||
</div>
|
||||
</t>
|
||||
@@ -360,7 +359,6 @@
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="well well-lg">
|
||||
<strong>Need help to structure your projects?</strong><br/>
|
||||
<a href="https://www.odoo.com/page/live-chat" target="_blank" style="margin-right:10px"><span class="fa fa-comment-o"/> Website Live Chat on</a><br/>
|
||||
<a href="https://www.odoo.com/help"><span class="fa fa-envelope-o"/> Email Our Project Expert</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -569,9 +567,6 @@
|
||||
</ul>
|
||||
<div class="well well-lg">
|
||||
<strong>Need help with Timesheets management? Contact us now:</strong><br/>
|
||||
<a href="https://www.odoo.com/page/live-chat" target="_blank" style="margin-right:10px">
|
||||
<span class="fa fa-comment-o"/> Website Live Chat on
|
||||
</a>
|
||||
<a href="https://www.odoo.com/help"><span class="fa fa-envelope-o"/> Email Our Project Expert</a>
|
||||
</div>
|
||||
</section>
|
||||
@@ -650,7 +645,6 @@
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<div class="well well-lg">
|
||||
<strong>Contact us now:</strong><br/>
|
||||
<a href="https://www.odoo.com/page/live-chat" target="_blank" style="margin-right:10px"><span class="fa fa-comment-o"/> Website Live Chat on</a><br/>
|
||||
<a href="https://www.odoo.com/help"><span class="fa fa-envelope-o"/> Email Our Project Expert</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1046,7 +1040,6 @@
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<div class="well well-lg">
|
||||
<strong>Contact us now:</strong><br/>
|
||||
<a href="https://www.odoo.com/page/live-chat" target="_blank" style="margin-right:10px"><span class="fa fa-comment-o"/> Website Live Chat on</a><br/>
|
||||
<a href="https://www.odoo.com/help"><span class="fa fa-envelope-o"/> Email Our Project Expert</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Vietnam, 2016-10-14
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Hoang Diep Huu mr.diephuuhoang@gmail.com https://github.com/anothingguy
|
||||
@@ -0,0 +1,9 @@
|
||||
Italy, 2017-01-24
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Sergio Corato sergiocorato@gmail.com https://github.com/sergiocorato
|
||||
+11
-5
@@ -6,11 +6,17 @@
|
||||
#----------------------------------------------------------
|
||||
# Running mode flags (gevent, prefork)
|
||||
#----------------------------------------------------------
|
||||
# Is the server running with gevent.
|
||||
import sys
|
||||
evented = False
|
||||
if sys.modules.get("gevent") is not None:
|
||||
evented = True
|
||||
def is_server_running_with_gevent():
|
||||
import sys
|
||||
if sys.modules.get("gevent") is not None:
|
||||
import socket
|
||||
import gevent.socket
|
||||
if socket.socket is gevent.socket.socket:
|
||||
# gevent is loaded and activated
|
||||
return True
|
||||
return False
|
||||
|
||||
evented = is_server_running_with_gevent()
|
||||
|
||||
# Is the server running in pefork mode (e.g. behind Gunicorn).
|
||||
# If this is True, the processes have to communicate some events,
|
||||
|
||||
Reference in New Issue
Block a user