[MERGE] forward port of branch saas-3 up to 504a04c
This commit is contained in:
commit
7d68fa0ee6
|
@ -24,6 +24,8 @@ import logging
|
|||
from email.utils import formataddr
|
||||
from urlparse import urljoin
|
||||
|
||||
import psycopg2
|
||||
|
||||
from openerp import api, tools
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.addons.base.ir.ir_mail_server import MailDeliveryException
|
||||
|
@ -328,6 +330,12 @@ class mail_mail(osv.Model):
|
|||
'Consider raising the --limit-memory-hard startup option',
|
||||
mail.id, mail.message_id)
|
||||
raise
|
||||
except psycopg2.Error:
|
||||
# If an error with the database occurs, chances are that the cursor is unusable.
|
||||
# This will lead to an `psycopg2.InternalError` being raised when trying to write
|
||||
# `state`, shadowing the original exception and forbid a retry on concurrent
|
||||
# update. Let's bubble it.
|
||||
raise
|
||||
except Exception as e:
|
||||
_logger.exception('failed sending mail.mail %s', mail.id)
|
||||
mail.write({'state': 'exception'})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="group_note_fancy" model="res.groups">
|
||||
<field name="name">Notes / Fancy mode</field>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<record id="trans_confirmed_double_gt" model="workflow.transition">
|
||||
<field name="act_from" ref="act_double_check"/>
|
||||
<field name="act_to" ref="act_double_wait"/>
|
||||
<field name="condition">amount_untaxed >= 5000</field>
|
||||
<field name="signal">purchase_approve</field>
|
||||
<field name="group_id" ref="purchase.group_purchase_manager"/>
|
||||
</record>
|
||||
|
@ -31,7 +30,6 @@
|
|||
<record id="trans_confirmed_double_lt" model="workflow.transition">
|
||||
<field name="act_from" ref="act_double_check"/>
|
||||
<field name="act_to" ref="act_double_wait"/>
|
||||
<field name="condition">amount_untaxed < 5000</field>
|
||||
</record>
|
||||
|
||||
<record id="trans_double_app_conf" model="workflow.transition">
|
||||
|
@ -40,4 +38,12 @@
|
|||
</record>
|
||||
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="trans_confirmed_double_gt" model="workflow.transition">
|
||||
<field name="condition">amount_untaxed >= 5000</field>
|
||||
</record>
|
||||
<record id="trans_confirmed_double_lt" model="workflow.transition">
|
||||
<field name="condition">amount_untaxed < 5000</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -43,6 +43,7 @@ from report_helper import WebKitHelper
|
|||
import openerp
|
||||
from openerp.modules.module import get_module_resource
|
||||
from openerp.report.report_sxw import *
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp import tools
|
||||
from openerp.tools.translate import _
|
||||
from openerp.osv.osv import except_osv
|
||||
|
@ -127,7 +128,7 @@ class WebKitParser(report_sxw):
|
|||
def get_lib(self, cursor, uid):
|
||||
"""Return the lib wkhtml path"""
|
||||
proxy = self.pool['ir.config_parameter']
|
||||
webkit_path = proxy.get_param(cursor, uid, 'webkit_path')
|
||||
webkit_path = proxy.get_param(cursor, SUPERUSER_ID, 'webkit_path')
|
||||
|
||||
if not webkit_path:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue