[MERGE] merged trunk.

bzr revid: vmt@openerp.com-20110913144916-er9fnuj00cj93cev
This commit is contained in:
Vo Minh Thu 2011-09-13 16:49:16 +02:00
commit d593e484c4
7 changed files with 26 additions and 11 deletions

View File

@ -215,7 +215,7 @@ def quit_on_signals():
os.unlink(config['pidfile'])
logger = logging.getLogger('server')
logger.info("Initiating shutdown")
logger.info("Hit CTRL-C again or send a second signal to force the sutdown.")
logger.info("Hit CTRL-C again or send a second signal to force the shutdown.")
logging.shutdown()
# manually join() all threads before calling sys.exit() to allow a second signal
@ -240,6 +240,8 @@ if __name__ == "__main__":
config = openerp.tools.config
setup_signal_handlers()
if config["test_file"]:
run_test_file(config['db_name'], config['test_file'])
sys.exit(0)
@ -277,7 +279,6 @@ if __name__ == "__main__":
setup_pid_file()
setup_signal_handlers()
logger = logging.getLogger('server')
logger.info('OpenERP server is running, waiting for connections...')
quit_on_signals()

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-08 12:09+0000\n"
"PO-Revision-Date: 2011-09-09 10:34+0000\n"
"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-09 04:37+0000\n"
"X-Launchpad-Export-Date: 2011-09-10 05:01+0000\n"
"X-Generator: Launchpad (build 13900)\n"
"X-Poedit-Language: Czech\n"
@ -885,7 +885,7 @@ msgstr "Znak"
#: model:ir.actions.act_window,name:base.action_publisher_warranty_contract_form
#: model:ir.ui.menu,name:base.menu_publisher_warranty_contract
msgid "Contracts"
msgstr "Kontakty"
msgstr "Smlouvy"
#. module: base
#: selection:base.language.install,lang:0
@ -3971,7 +3971,7 @@ msgstr "Neplatné ID pro záznam procházení, máme %r, očekáván integer."
#: model:ir.actions.act_window,name:base.action_partner_addess_tree
#: view:res.partner:0
msgid "Partner Contacts"
msgstr "Kontakty společníka"
msgstr "Kontakty partnera"
#. module: base
#: field:base.module.update,add:0

View File

@ -601,8 +601,10 @@ class actions_server(osv.osv):
context = {}
user = self.pool.get('res.users').browse(cr, uid, uid)
for action in self.browse(cr, uid, ids, context):
obj_pool = self.pool.get(action.model_id.model)
obj = obj_pool.browse(cr, uid, context['active_id'], context=context)
obj = None
if context.get('active_model') == action.model_id.model and context.get('active_id'):
obj_pool = self.pool.get(action.model_id.model)
obj = obj_pool.browse(cr, uid, context['active_id'], context=context)
cxt = {
'context': dict(context), # copy context to prevent side-effects of eval
'object': obj,
@ -625,6 +627,7 @@ class actions_server(osv.osv):
if action.state=='code':
localdict = {
'self': self.pool.get(action.model_id.model),
'pool': self.pool,
'context': dict(context), # copy context to prevent side-effects of eval
'time': time,
'ids': ids,

View File

@ -189,7 +189,7 @@ class ir_translation(osv.osv):
result = super(ir_translation, self).write(cursor, user, ids, vals, context=context)
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['src'])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['res_id'])
return result
def unlink(self, cursor, user, ids, context=None):
@ -199,7 +199,7 @@ class ir_translation(osv.osv):
ids = [ids]
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src'])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['res_id'])
result = super(ir_translation, self).unlink(cursor, user, ids, context=context)
return result

View File

@ -8,7 +8,7 @@
<field name="model">res.request</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Requests" colors="blue:state in ('waiting');gray:state in ('closed')">
<tree string="Requests" colors="blue:state == 'waiting';gray:state == 'closed'">
<field name="create_date"/>
<field name="act_from"/>
<field name="act_to"/>

View File

@ -113,6 +113,11 @@
<rng:define name="kanban">
<rng:element name="kanban">
<rng:optional>
<!-- group-by field to apply in the kanban view when no other
grouping is selected in the search view -->
<rng:attribute name="default_group_by" />
</rng:optional>
<rng:zeroOrMore>
<rng:ref name="field"/>
</rng:zeroOrMore>
@ -470,6 +475,8 @@
<rng:optional><rng:attribute name="selection"/></rng:optional>
<rng:optional><rng:attribute name="default_focus"/></rng:optional>
<rng:optional><rng:attribute name="filters"/></rng:optional>
<rng:optional><rng:attribute name="statusbar_visible"/></rng:optional>
<rng:optional><rng:attribute name="statusbar_colors"/></rng:optional>
<rng:zeroOrMore>
<rng:choice>
<rng:ref name="diagram"/>

View File

@ -294,6 +294,9 @@ class Cursor(object):
del self._obj
self.__closed = True
# Clean the underlying connection.
self._cnx.rollback()
if leak:
self._cnx.leaked = True
else:
@ -430,6 +433,7 @@ class ConnectionPool(object):
self._debug('Put connection to %r in pool', cnx.dsn)
else:
self._debug('Forgot connection to %r', cnx.dsn)
cnx.close()
break
else:
raise PoolError('This connection does not below to the pool')