[Merge] Merge with trunk server
bzr revid: vir@tinyerp.com-20100528050827-4l8y72c5u6abgp0f bzr revid: vir@tinyerp.com-20100531050936-a9uew1qiwj3rq8ul
This commit is contained in:
commit
9c0be199ef
File diff suppressed because it is too large
Load Diff
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-05-26 04:10+0000\n"
|
||||
"PO-Revision-Date: 2010-05-30 04:12+0000\n"
|
||||
"Last-Translator: goranc <goranc@gmail.com>\n"
|
||||
"Language-Team: openerp-translators\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-27 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-31 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"Language: hr\n"
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-05-26 04:12+0000\n"
|
||||
"PO-Revision-Date: 2010-05-30 04:11+0000\n"
|
||||
"Last-Translator: Harry (Open ERP) <hmo@tinyerp.com>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-27 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-31 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-05-26 04:13+0000\n"
|
||||
"PO-Revision-Date: 2010-05-30 04:09+0000\n"
|
||||
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\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: 2010-05-27 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-31 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-05-26 04:09+0000\n"
|
||||
"PO-Revision-Date: 2010-05-30 04:13+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\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: 2010-05-27 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-31 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-05-26 04:09+0000\n"
|
||||
"PO-Revision-Date: 2010-05-30 04:11+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\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: 2010-05-27 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-31 03:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
</record>
|
||||
<menuitem id="next_id_6" name="Actions" parent="base.next_id_4"/>
|
||||
<menuitem action="ir_sequence_actions" id="menu_ir_sequence_actions" parent="next_id_6"/>
|
||||
|
||||
|
||||
<!-- Filters form view-->
|
||||
|
||||
<record id="ir_filters_view_form" model="ir.ui.view">
|
||||
|
@ -248,9 +248,9 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Filters tree view-->
|
||||
|
||||
|
||||
<record id="ir_filters_view_tree" model="ir.ui.view">
|
||||
<field name="name">ir.filters.tree</field>
|
||||
<field name="model">ir.filters</field>
|
||||
|
@ -265,7 +265,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Filters action-->
|
||||
|
||||
<record id="actions_ir_filters_view" model="ir.actions.act_window">
|
||||
|
@ -275,7 +275,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="ir_filters_view_tree"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Filters view menu-->
|
||||
|
||||
<menuitem parent="base.next_id_6" name="Filters"
|
||||
|
@ -674,16 +674,8 @@
|
|||
<separator string="Attached To" colspan="2"/>
|
||||
<field name="res_model" select="2"/>
|
||||
<field name="res_id"/>
|
||||
<field name="res_name"/>
|
||||
</group>
|
||||
<separator string="Preview" colspan="4"/>
|
||||
<field
|
||||
name="preview"
|
||||
widget="picture"
|
||||
readonly="1"
|
||||
nolabel="1"
|
||||
colspan="4"
|
||||
img_height="400"
|
||||
img_width="800"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="description" nolabel="1"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -25,7 +25,7 @@ import tools
|
|||
|
||||
class ir_attachment(osv.osv):
|
||||
def check(self, cr, uid, ids, mode, context=None):
|
||||
if not ids:
|
||||
if not ids:
|
||||
return
|
||||
ima = self.pool.get('ir.model.access')
|
||||
if isinstance(ids, (int, long)):
|
||||
|
@ -37,8 +37,8 @@ class ir_attachment(osv.osv):
|
|||
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
||||
context=None, count=False):
|
||||
ids = super(ir_attachment, self).search(cr, uid, args, offset=offset,
|
||||
limit=limit, order=order,
|
||||
ids = super(ir_attachment, self).search(cr, uid, args, offset=offset,
|
||||
limit=limit, order=order,
|
||||
context=context, count=False)
|
||||
if not ids:
|
||||
if count:
|
||||
|
@ -66,7 +66,7 @@ class ir_attachment(osv.osv):
|
|||
def write(self, cr, uid, ids, vals, context=None):
|
||||
self.check(cr, uid, ids, 'write', context=context)
|
||||
return super(ir_attachment, self).write(cr, uid, ids, vals, context)
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
self.check(cr, uid, [id], 'write', context=context)
|
||||
return super(ir_attachment, self).copy(cr, uid, id, default, context)
|
||||
|
@ -84,37 +84,36 @@ class ir_attachment(osv.osv):
|
|||
dataobj = self.pool.get('ir.model.data')
|
||||
data_id = dataobj._get_id(cr, 1, 'base', 'action_attachment')
|
||||
res_id = dataobj.browse(cr, uid, data_id, context).res_id
|
||||
return self.pool.get('ir.actions.act_window').read(cr, uid, res_id, [], context)
|
||||
return self.pool.get('ir.actions.act_window').read(cr, uid, res_id, [], context)
|
||||
|
||||
def _get_preview(self, cr, uid, ids, name, arg, context=None):
|
||||
result = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
ctx = context.copy()
|
||||
ctx['bin_size'] = False
|
||||
for i in self.browse(cr, uid, ids, context=ctx):
|
||||
result[i.id] = False
|
||||
for format in ('png','jpg','jpeg','gif','bmp'):
|
||||
if (i.datas_fname and i.datas_fname.lower() or '').endswith(format):
|
||||
result[i.id]= i.datas
|
||||
break
|
||||
return result
|
||||
def _name_get_resname(self, cr, uid, ids, object,method, context):
|
||||
data = {}
|
||||
for attachment in self.browse(cr, uid, ids, context=context):
|
||||
model_object = attachment.res_model
|
||||
res_id = attachment.res_id
|
||||
if model_object and res_id:
|
||||
model_pool = self.pool.get(model_object)
|
||||
res = model_pool.name_get(cr,uid,[res_id],context)
|
||||
data[attachment.id] = res[0][1]
|
||||
else:
|
||||
data[attachment.id] = False
|
||||
return data
|
||||
|
||||
_name = 'ir.attachment'
|
||||
_columns = {
|
||||
'name': fields.char('Attachment Name',size=64, required=True),
|
||||
'datas': fields.binary('Data'),
|
||||
'preview': fields.function(_get_preview, type='binary', string='Image Preview', method=True),
|
||||
'datas_fname': fields.char('Filename',size=64),
|
||||
'description': fields.text('Description'),
|
||||
# Not required due to the document module !
|
||||
'res_name': fields.function(_name_get_resname, type='char', string='Resource Name', method=True),
|
||||
'res_model': fields.char('Resource Object',size=64, readonly=True),
|
||||
'res_id': fields.integer('Resource ID', readonly=True),
|
||||
'link': fields.char('Link', size=256),
|
||||
|
||||
'create_date': fields.datetime('Date Created', readonly=True),
|
||||
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
|
||||
}
|
||||
|
||||
ir_attachment()
|
||||
|
||||
|
||||
|
|
|
@ -37,37 +37,26 @@
|
|||
# - functions
|
||||
#
|
||||
#
|
||||
|
||||
import calendar
|
||||
import copy
|
||||
import datetime
|
||||
import logging
|
||||
import operator
|
||||
import pickle
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import datetime
|
||||
import types
|
||||
|
||||
import fields
|
||||
import netsvc
|
||||
import tools
|
||||
from lxml import etree
|
||||
from tools.config import config
|
||||
from tools.translate import _
|
||||
|
||||
import copy
|
||||
import sys
|
||||
import operator
|
||||
import fields
|
||||
import tools
|
||||
|
||||
try:
|
||||
from lxml import etree
|
||||
except ImportError:
|
||||
sys.stderr.write("ERROR: Import lxml module\n")
|
||||
sys.stderr.write("ERROR: Try to install the python-lxml package\n")
|
||||
|
||||
from tools.config import config
|
||||
|
||||
regex_order = re.compile('^(([a-z0-9_]+|"[a-z0-9_]+")( *desc| *asc)?( *, *|))+$', re.I)
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ def _process_text(self, txt):
|
|||
expr = sps.pop(0)
|
||||
txt = eval(expr,self.localcontext)
|
||||
if txt and (isinstance(txt, unicode) or isinstance(txt, str)):
|
||||
txt = unicode(self.localcontext.get('translate', lambda x:x)(txt))
|
||||
txt = unicode(txt)
|
||||
except Exception,e:
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
if type(txt)==type('') or type(txt)==type(u''):
|
||||
|
|
|
@ -261,6 +261,7 @@ class db(netsvc.ExportService):
|
|||
|
||||
db = sql_db.db_connect('template1')
|
||||
cr = db.cursor()
|
||||
cr.autocommit(True) # avoid transaction block
|
||||
try:
|
||||
try:
|
||||
cr.execute('ALTER DATABASE "%s" RENAME TO "%s"' % (old_name, new_name))
|
||||
|
|
5
setup.py
5
setup.py
|
@ -34,6 +34,7 @@ import glob
|
|||
|
||||
from distutils.core import setup, Command
|
||||
from distutils.command.install import install
|
||||
from distutils.sysconfig import get_python_lib
|
||||
|
||||
has_py2exe = False
|
||||
if os.name == 'nt':
|
||||
|
@ -122,7 +123,7 @@ def data_files():
|
|||
files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'),
|
||||
filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*'))))
|
||||
|
||||
openerp_site_packages = join('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server')
|
||||
openerp_site_packages = join(get_python_lib(prefix=''), 'openerp-server')
|
||||
|
||||
files.append((openerp_site_packages, [join('bin', 'import_xml.rng'),
|
||||
join('bin', 'server.pkey'),
|
||||
|
@ -134,7 +135,7 @@ def data_files():
|
|||
join('python25-compat','SocketServer.py')]))
|
||||
|
||||
for addonname, add_path in find_addons():
|
||||
addon_path = join('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server','addons', addonname)
|
||||
addon_path = join(get_python_lib(prefix=''), 'openerp-server','addons', addonname)
|
||||
for root, dirs, innerfiles in os.walk(add_path):
|
||||
innerfiles = filter(lambda fil: os.path.splitext(fil)[1] not in ('.pyc', '.pyd', '.pyo'), innerfiles)
|
||||
if innerfiles:
|
||||
|
|
Loading…
Reference in New Issue