Merge remote branch 'rebzr/official-trunk' into deb-scripts
bzr revid: p_christ@hol.gr-20110117190940-mabdtzjp0y7dyjek
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
'module/wizard/base_import_language_view.xml',
|
||||
'module/wizard/base_module_upgrade_view.xml',
|
||||
'module/wizard/base_module_configuration_view.xml',
|
||||
'module/wizard/base_module_shortcut_data.xml',
|
||||
'module/wizard/base_export_language_view.xml',
|
||||
'module/wizard/base_update_translations_view.xml',
|
||||
'res/res_request_view.xml',
|
||||
@@ -59,6 +60,7 @@
|
||||
'res/res_log_view.xml',
|
||||
'res/partner/partner_report.xml',
|
||||
'res/partner/partner_view.xml',
|
||||
'res/partner/partner_shortcut_data.xml',
|
||||
'res/bank_view.xml',
|
||||
'res/country_view.xml',
|
||||
'res/res_currency_view.xml',
|
||||
|
||||
@@ -554,10 +554,14 @@ class ir_model_data(osv.osv):
|
||||
|
||||
def __init__(self, pool, cr):
|
||||
osv.osv.__init__(self, pool, cr)
|
||||
self.loads = {}
|
||||
self.doinit = True
|
||||
self.unlink_mark = {}
|
||||
|
||||
# also stored in pool to avoid being discarded along with this osv instance
|
||||
if getattr(pool, 'model_data_reference_ids', None) is None:
|
||||
self.pool.model_data_reference_ids = {}
|
||||
self.loads = self.pool.model_data_reference_ids
|
||||
|
||||
def _auto_init(self, cr, context=None):
|
||||
super(ir_model_data, self)._auto_init(cr, context)
|
||||
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_model_data_module_name_index\'')
|
||||
|
||||
@@ -38,7 +38,7 @@ def graph_get(cr, graph, wkf_ids, nested=False, workitem={}):
|
||||
cr.execute('select * from wkf where id=%s', (n['subflow_id'],))
|
||||
wkfinfo = cr.dictfetchone()
|
||||
graph2 = pydot.Cluster('subflow'+str(n['subflow_id']), fontsize='12', label = """\"Subflow: %s\\nOSV: %s\"""" % ( n['name'], wkfinfo['osv']) )
|
||||
(s1,s2) = graph_get(cr, graph2, n['subflow_id'], nested,workitem)
|
||||
(s1,s2) = graph_get(cr, graph2, [n['subflow_id']], nested,workitem)
|
||||
graph.add_subgraph(graph2)
|
||||
actfrom[n['id']] = s2
|
||||
actto[n['id']] = s1
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<field name="code">action = obj.start()</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Start Configuration"
|
||||
<menuitem name="Reconfigure"
|
||||
action="action_start_configurator"
|
||||
id="menu_view_base_module_configuration" parent="base.menu_config"
|
||||
type="server" icon="STOCK_EXECUTE" sequence="100" />
|
||||
@@ -38,12 +38,6 @@
|
||||
<field name="key">action</field>
|
||||
<field name="model">ir.actions.todo</field>
|
||||
</record>
|
||||
<record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
|
||||
<field name="name">Reconfigure</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_view_base_module_configuration"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
|
||||
<field name="name">Reconfigure</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_view_base_module_configuration"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -273,7 +273,7 @@ res_partner()
|
||||
class res_partner_address(osv.osv):
|
||||
_description ='Partner Addresses'
|
||||
_name = 'res.partner.address'
|
||||
_order = 'name'
|
||||
_order = 'type, name'
|
||||
_columns = {
|
||||
'partner_id': fields.many2one('res.partner', 'Partner Name', ondelete='set null', select=True, help="Keep empty for a private address, not related to partner."),
|
||||
'type': fields.selection( [ ('default','Default'),('invoice','Invoice'), ('delivery','Delivery'), ('contact','Contact'), ('other','Other') ],'Address Type', help="Used to select automatically the right address according to the context in sales and purchases documents."),
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="ir_ui_view_sc_partner0" model="ir.ui.view_sc">
|
||||
<field name="name">Customers</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_partner_form"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -590,12 +590,5 @@
|
||||
groups="base.group_extended"
|
||||
/>
|
||||
|
||||
<record id="ir_ui_view_sc_partner0" model="ir.ui.view_sc">
|
||||
<field name="name">Customers</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_partner_form"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -54,9 +54,9 @@ class res_request(osv.osv):
|
||||
return True
|
||||
|
||||
def request_get(self, cr, uid):
|
||||
cr.execute('select id from res_request where act_to=%s and (trigger_date<=%s or trigger_date is null) and active=True', (uid,time.strftime('%Y-%m-%d')))
|
||||
cr.execute('select id from res_request where act_to=%s and (trigger_date<=%s or trigger_date is null) and active=True and state != %s', (uid,time.strftime('%Y-%m-%d'), 'closed'))
|
||||
ids = map(lambda x:x[0], cr.fetchall())
|
||||
cr.execute('select id from res_request where act_from=%s and (act_to<>%s) and (trigger_date<=%s or trigger_date is null) and active=True', (uid,uid,time.strftime('%Y-%m-%d')))
|
||||
cr.execute('select id from res_request where act_from=%s and (act_to<>%s) and (trigger_date<=%s or trigger_date is null) and active=True and state != %s', (uid,uid,time.strftime('%Y-%m-%d'), 'closed'))
|
||||
ids2 = map(lambda x:x[0], cr.fetchall())
|
||||
return (ids, ids2)
|
||||
|
||||
|
||||
@@ -33,16 +33,12 @@ import render
|
||||
import urllib
|
||||
|
||||
#
|
||||
# encode a value to a string in utf8 and converts XML entities
|
||||
# coerce any type to a unicode string (to preserve non-ascii characters)
|
||||
# and escape XML entities
|
||||
#
|
||||
def toxml(val):
|
||||
if isinstance(val, str):
|
||||
str_utf8 = val
|
||||
elif isinstance(val, unicode):
|
||||
str_utf8 = val.encode('utf-8')
|
||||
else:
|
||||
str_utf8 = str(val)
|
||||
return str_utf8.replace('&', '&').replace('<','<').replace('>','>')
|
||||
def toxml(value):
|
||||
unicode_value = tools.ustr(value)
|
||||
return unicode_value.replace('&', '&').replace('<','<').replace('>','>')
|
||||
|
||||
class report_int(netsvc.Service):
|
||||
def __init__(self, name, audience='*'):
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
import socket
|
||||
import base64
|
||||
import errno
|
||||
import SocketServer
|
||||
from BaseHTTPServer import *
|
||||
from SimpleHTTPServer import SimpleHTTPRequestHandler
|
||||
|
||||
@@ -919,7 +919,12 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
|
||||
('src', '=', dic['src']),
|
||||
]
|
||||
if dic['type'] == 'model':
|
||||
args.append(('res_id', '=', dic['res_id']))
|
||||
if dic['res_id'] is False:
|
||||
args.append(('res_id', '=', 0))
|
||||
args.append(('module', '=', dic['module']))
|
||||
args.append(('xml_id', '=', dic['xml_id']))
|
||||
else:
|
||||
args.append(('res_id', '=', dic['res_id']))
|
||||
ids = trans_obj.search(cr, uid, args)
|
||||
if ids:
|
||||
if context.get('overwrite') and dic['value']:
|
||||
@@ -935,10 +940,10 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
|
||||
def trans_update_res_ids(cr):
|
||||
cr.execute("""
|
||||
UPDATE ir_translation
|
||||
SET res_id = (SELECT ir_model_data.res_id
|
||||
SET res_id = COALESCE ((SELECT ir_model_data.res_id
|
||||
FROM ir_model_data
|
||||
WHERE ir_translation.module = ir_model_data.module
|
||||
AND ir_translation.xml_id = ir_model_data.name)
|
||||
AND ir_translation.xml_id = ir_model_data.name), 0)
|
||||
WHERE ir_translation.module is not null
|
||||
AND ir_translation.xml_id is not null
|
||||
AND ir_translation.res_id = 0;
|
||||
|
||||
Reference in New Issue
Block a user