[MERGE] Forward-port of latest bugfixes from saas-3 up to 733cb3e76f

This commit is contained in:
Olivier Dony 2015-08-04 15:22:33 +02:00
commit c96174da5f
3 changed files with 6 additions and 1 deletions

View File

@ -41,6 +41,7 @@ from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
MAX_POP_MESSAGES = 50
MAIL_TIMEOUT = 60
# Workaround for Python 2.7.8 bug https://bugs.python.org/issue23906
poplib._MAXLINE = 65536
@ -154,6 +155,8 @@ openerp_mailgate: "|/path/to/openerp-mailgate.py --host=localhost -u %(uid)d -p
#connection.user("recent:"+server.user)
connection.user(server.user)
connection.pass_(server.password)
# Add timeout on socket
connection.sock.settimeout(MAIL_TIMEOUT)
return connection
def button_confirm_login(self, cr, uid, ids, context=None):

View File

@ -121,6 +121,8 @@ Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
return {}
def onchange_task_work(self, cr, uid, ids, task_work, context=None):
if not task_work:
return {'value': {}}
return {'value': {
'module_project_timesheet': task_work,
'module_sale_service': task_work,

View File

@ -75,7 +75,7 @@ from .tools.translate import _
_logger = logging.getLogger(__name__)
_schema = logging.getLogger(__name__ + '.schema')
regex_order = re.compile('^( *([a-z0-9:_]+|"[a-z0-9:_]+")( *desc| *asc)?( *, *|))+$', re.I)
regex_order = re.compile('^(\s*([a-z0-9:_]+|"[a-z0-9:_]+")(\s+(desc|asc))?\s*(,|$))+(?<!,)$', re.I)
regex_object_name = re.compile(r'^[a-z0-9_.]+$')
onchange_v7 = re.compile(r"^(\w+)\((.*)\)$")