[MERGE] from trunk

bzr revid: odo@openerp.com-20110401125400-39nk9gayvlseh1jc
This commit is contained in:
Olivier Dony 2011-04-01 14:54:00 +02:00
commit cd914e0d42
11 changed files with 58 additions and 89 deletions

View File

@ -13,5 +13,6 @@ recursive-include pixmaps *bmp *ico *png
recursive-include win32 *.py *.bat
recursive-include openerp *css *csv *html *png *po *pot
recursive-include openerp *rml *rng *sql *sxw *xml *xsl *yml
graft debian
graft doc
global-exclude *pyc *~ # Exclude possible garbage from previous graft.

View File

@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-16 13:49+0000\n"
"PO-Revision-Date: 2011-03-30 08:28+0000\n"
"Last-Translator: Lorenzo Battistini - agilebg.com "
"<lorenzo.battistini@agilebg.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: 2011-02-16 04:53+0000\n"
"X-Generator: Launchpad (build 12351)\n"
"X-Launchpad-Export-Date: 2011-03-31 04:35+0000\n"
"X-Generator: Launchpad (build 12559)\n"
#. module: base
#: view:ir.filters:0
@ -912,7 +912,7 @@ msgstr "Uganda"
#. module: base
#: field:ir.model.access,perm_unlink:0
msgid "Delete Access"
msgstr "Rimuovi accesso"
msgstr "Accesso in cancellazione"
#. module: base
#: model:res.country,name:base.ne

7
debian/control vendored
View File

@ -17,9 +17,10 @@ Package: openerp-server
Section: net
Architecture: all
Depends:
${misc:Depends}, adduser, python, python-libxslt1, python-lxml,
python-psycopg2, python-pydot, python-pychart, python-reportlab, python-tz,
python-pyparsing, python-yaml, python-mako, postgresql-client (>= 8.2)
${misc:Depends}, adduser, python, python-dateutil, python-libxslt1,
python-lxml, python-psycopg2, python-pydot, python-pychart, python-reportlab,
python-tz, python-pyparsing, python-yaml, python-mako,
postgresql-client (>=8.2)
Conflicts: tinyerp-server
Replaces: tinyerp-server
Recommends:

View File

@ -1,15 +0,0 @@
Author: Daniel Baumann <daniel@debian.org>
Description: Disable modules check to make it buildable without X11.
diff -Naurp openerp-server.orig/setup.py openerp-server/setup.py
--- openerp-server.orig/setup.py 2009-06-08 15:51:20.000000000 +0000
+++ openerp-server/setup.py 2009-07-26 10:27:49.000000000 +0000
@@ -121,7 +121,7 @@ def data_files():
return files
-check_modules()
+#check_modules()
f = file('openerp-server','w')
start_script = """#!/bin/sh\necho "OpenERP Setup - The content of this file is generated at the install stage\n" """

View File

@ -1,15 +0,0 @@
Author: Brian DeRocher <brian@derocher.org>
Description: Correct SQL syntax in migrate script (Closes: #467517).
diff -Naurp openerp-server.orig/doc/migrate/3.4.0-4.0.0/pre.py openerp-server/doc/migrate/3.4.0-4.0.0/pre.py
--- openerp-server.orig/doc/migrate/3.4.0-4.0.0/pre.py 2008-11-03 21:33:56.000000000 +0000
+++ openerp-server/doc/migrate/3.4.0-4.0.0/pre.py 2008-11-09 09:09:49.000000000 +0000
@@ -123,7 +123,7 @@ cr.commit()
for line in (
"ALTER TABLE ir_module_module ADD demo BOOLEAN",
- "ALTER TABLE ir_module_module SET demo DEFAULT False",
+ "ALTER TABLE ir_module_module alter column demo set DEFAULT False",
"DELETE FROM ir_values WHERE VALUE LIKE '%,False'",
"""UPDATE ir_ui_view set arch='<?xml version="1.0"?><tree string="Menu" toolbar="1"><field icon="icon" name="name"/></tree>' where name='ir.ui.menu.tree' and type='tree' and field_parent='child_id'""",
):

View File

@ -1,12 +0,0 @@
Author: Daniel Baumann <daniel@debian.org>
Description: Correcting shebang.
diff -Naurp openerp-server.orig/bin/addons/document/ftpserver/ftpserver.py openerp-server/bin/addons/document/ftpserver/ftpserver.py
--- openerp-server.orig/bin/addons/document/ftpserver/ftpserver.py 2009-05-30 10:14:37.000000000 +0000
+++ openerp-server/bin/addons/document/ftpserver/ftpserver.py 2009-05-30 11:02:00.000000000 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
# -*- encoding: utf-8 -*-
# ftpserver.py
#

View File

2
debian/po/sq.po vendored
View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-03-29 04:39+0000\n"
"X-Launchpad-Export-Date: 2011-03-31 04:35+0000\n"
"X-Generator: Launchpad (build 12559)\n"
#. Type: string

27
debian/rules vendored
View File

@ -5,33 +5,6 @@ EXTRA_MODULES_PATH ?= ../addons
%:
dh ${@}
override_dh_auto_clean:
dh_auto_clean
rm -rf build
override_dh_auto_install:
# Adding ALL addons to the server package
if [ -d "${EXTRA_MODULES_PATH}" ] ; then \
cd ${EXTRA_MODULES_PATH} ; \
echo > server_modules.list ; \
for ADD_DIR in * ; do \
[ -d "$$ADD_DIR" ] && [ -r "$$ADD_DIR"/__openerp__.py ] && echo "$$ADD_DIR" >> server_modules.list ; \
done ; \
fi
NO_CHECK_MODULES=1 python setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/openerp-server
# Adjusting program location
sed -i -e 's|cd .*|cd /usr/share/pyshared/openerp-server|' debian/openerp-server/usr/bin/openerp-server
# Removing double files
rm -rf debian/openerp-server/usr/share/doc/openerp-server-*
override_dh_fixperms:
dh_fixperms
find debian/openerp-server/usr/share/pyshared/openerp-server/addons -type f -print0 | xargs -0 chmod 0644
override_dh_installchangelogs:
dh_installchangelogs doc/Changelog

View File

@ -168,19 +168,32 @@ class act_window(osv.osv):
]
def _views_get_fnc(self, cr, uid, ids, name, arg, context=None):
res={}
"""Returns an ordered list of the specific view modes that should be
enabled when displaying the result of this action, along with the
ID of the specific view to use for each mode, if any were required.
This function hides the logic of determining the precedence between
the view_modes string, the view_ids o2m, and the view_id m2o that can
be set on the action.
:rtype: dict in the form { action_id: list of pairs (tuples) }
:return: { action_id: [(view_id, view_mode), ...], ... }, where view_mode
is one of the possible values for ir.ui.view.type and view_id
is the ID of a specific view to use for this mode, or False for
the default one.
"""
res = {}
for act in self.browse(cr, uid, ids):
res[act.id]=[(view.view_id.id, view.view_mode) for view in act.view_ids]
res[act.id] = [(view.view_id.id, view.view_mode) for view in act.view_ids]
view_ids_modes = [view.view_mode for view in act.view_ids]
modes = act.view_mode.split(',')
if len(modes)>len(act.view_ids):
find = False
if act.view_id:
missing_modes = [mode for mode in modes if mode not in view_ids_modes]
if missing_modes:
if act.view_id and act.view_id.type in missing_modes:
# reorder missing modes to put view_id first if present
missing_modes.remove(act.view_id.type)
res[act.id].append((act.view_id.id, act.view_id.type))
for t in modes[len(act.view_ids):]:
if act.view_id and (t == act.view_id.type) and not find:
find = True
continue
res[act.id].append((False, t))
res[act.id].extend([(False, mode) for mode in missing_modes])
return res
def _search_view(self, cr, uid, ids, name, arg, context=None):
@ -257,7 +270,10 @@ class act_window(osv.osv):
help="Comma-separated list of allowed view modes, such as 'form', 'tree', 'calendar', etc. (Default: tree,form)"),
'usage': fields.char('Action Usage', size=32),
'view_ids': fields.one2many('ir.actions.act_window.view', 'act_window_id', 'Views'),
'views': fields.function(_views_get_fnc, method=True, type='binary', string='Views'),
'views': fields.function(_views_get_fnc, method=True, type='binary', string='Views',
help="This function field computes the ordered list of views that should be enabled " \
"when displaying the result of an action, federating view mode, views and " \
"reference view. The result is returned as an ordered list of pairs (view_id,view_mode)."),
'limit': fields.integer('Limit', help='Default limit for the list view'),
'auto_refresh': fields.integer('Auto-Refresh',
help='Add an auto-refresh on the view'),
@ -307,6 +323,7 @@ class act_window_view(osv.osv):
_name = 'ir.actions.act_window.view'
_table = 'ir_act_window_view'
_rec_name = 'view_id'
_order = 'sequence'
_columns = {
'sequence': fields.integer('Sequence'),
'view_id': fields.many2one('ir.ui.view', 'View'),
@ -323,7 +340,11 @@ class act_window_view(osv.osv):
_defaults = {
'multi': lambda *a: False,
}
_order = 'sequence'
def _auto_init(self, cr, context=None):
super(act_window_view, self)._auto_init(cr, context)
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'act_window_view_unique_mode_per_action\'')
if not cr.fetchone():
cr.execute('CREATE UNIQUE INDEX act_window_view_unique_mode_per_action ON ir_act_window_view (act_window_id, view_mode)')
act_window_view()
class act_wizard(osv.osv):

View File

@ -104,6 +104,21 @@ if os.name == 'nt':
files.append((join('openerp',dp), map(lambda x: join('openerp', dp, x), names)))
os.chdir('..')
files.append(('openerp', [join('openerp', 'import_xml.rng'),]))
# copy pytz/timzeone
# TODO check if we have to also copy dateutil's timezone data.
import pytz
# Make sure the layout of pytz hasn't changed
assert (pytz.__file__.endswith('__init__.pyc') or
pytz.__file__.endswith('__init__.py')), pytz.__file__
pytz_dir = os.path.dirname(pytz.__file__)
saved_dir = os.getcwd()
os.chdir(pytz_dir)
for dp, dn, names in os.walk('zoneinfo'):
files.append((join('pytz',dp), map(lambda x: join(pytz_dir, dp, x), names)))
os.chdir(saved_dir)
return files
py2exe_data_files = data_files()