Merge lp:~openerp-brazil-team/openerp/openerp-br into lp:openerp

Proposed by adelcio diniz on 2012-05-06
Status: Needs review
Proposed branch: lp:~openerp-brazil-team/openerp/openerp-br
Merge into: lp:openerp
Diff against target: 135 lines (+53/-16)
2 files modified
README.txt (+1/-2)
bzr_set.py (+52/-14)
To merge this branch: bzr merge lp:~openerp-brazil-team/openerp/openerp-br
Reviewer Review Type Date Requested Status
OpenERP Core Team 2012-05-06 Pending
Review via email: mp+104860@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

44. By Renato Lima - http://www.akretion.com on 2012-04-27

changed br branch address

43. By Renato Lima - http://www.akretion.com on 2012-02-27

Added 6.1 version

42. By Renato Lima - http://www.akretion.com on 2012-02-09

Removed addons-community to download

41. By Renato Lima - http://www.akretion.com on 2012-01-27

changed default version

40. By Renato Lima - http://www.akretion.com on 2012-01-27

changed web branch address for OpenERP trunk version

39. By Renato Lima - http://www.akretion.com on 2012-01-27

updated web client branch address form trunk

38. By Renato Lima - http://www.akretion.com on 2012-01-27

Added brazilian localization branch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.txt'
2--- README.txt 2011-09-14 09:41:35 +0000
3+++ README.txt 2012-05-06 19:25:20 +0000
4@@ -1,7 +1,7 @@
5 Obtaining OpenERP with bzr_set.py
6 =================================
7
8-Execute bzr_set with the version you wish to use::
9+Execute bzr_set with the version you wish to use:
10
11 python bzr_set.py -v 6.0
12
13@@ -11,5 +11,4 @@
14 * Download the appropriate source code branches
15 * Setup modules in your server as symbolic links
16
17-
18 All symbolic links are set in the server at this point, so you can run it directly.
19
20=== modified file 'bzr_set.py'
21--- bzr_set.py 2011-03-07 10:59:15 +0000
22+++ bzr_set.py 2012-05-06 19:25:20 +0000
23@@ -19,15 +19,23 @@
24 f._setup_outf()
25 return f.run(*args, **kwargs)
26
27-_VERSIONS = ('4.2', '5.0', '6.0', 'trunk')
28-_DEFAULT_VERSION = '6.0'
29+_VERSIONS = ('4.2', '5.0', '6.0', '6.1', 'trunk')
30+_DEFAULT_VERSION = '6.1'
31 _EXTRA_ADDONS_MAP = {
32 '4.2': '4.2-extra-addons',
33 '5.0': 'stable_5.0-extra-addons',
34 '6.0': 'extra-6.0',
35+ '6.1': 'trunk-extra-addons',
36 'trunk': 'trunk-extra-addons',
37 }
38
39+_L10N_MAP = {
40+ '5.0': '5.0',
41+ '6.0': '6.0',
42+ '6.1': 'trunk',
43+ 'trunk': 'trunk',
44+}
45+
46 def update_openerp(dest_dir, version=_DEFAULT_VERSION, lplogin=None, export=False, revision=None, verbose=False):
47 """
48 if lplogin == None -> make a branch instead of a checkout
49@@ -49,27 +57,44 @@
50 BASEURL = 'lp:'
51 else:
52 BASEURL = 'bzr+ssh://%s@bazaar.launchpad.net/' % (lplogin,)
53-
54+
55 # map branch URLs according to version
56 extraversion = _EXTRA_ADDONS_MAP[version]
57 communityversion = 'trunk'
58 webversion = version
59+ l10nversion = _L10N_MAP[version]
60
61 bzr_repository = {
62- 'server': (BASEURL + '~openerp/openobject-server/' + version, True),
63+ 'server': (BASEURL + '~openerp/openobject-server/' + version, True),
64 'client': (BASEURL + '~openerp/openobject-client/' + version, True),
65 'addons': (BASEURL + '~openerp/openobject-addons/' + version, True),
66 'addons-extra': (BASEURL + '~openerp-commiter/openobject-addons/' + extraversion, False),
67- 'addons-community': (BASEURL + '~openerp-community/openobject-addons/' + communityversion + '-addons-community', False),
68+ #'addons-community': (BASEURL + '~openerp-community/openobject-addons/' + communityversion + '-addons-community', False),
69 'web': (BASEURL + '~openerp/openobject-client-web/' + webversion, True),
70- }
71-
72- bzr_links = {
73- 'addons/*': 'server/bin/addons/',
74- }
75+ 'br': (BASEURL + '~openerp-brazil-core-team/openerp.pt-br-localiz/' + l10nversion, True),
76+ }
77+
78+ bzr_l10n_links = {
79+ 'br/*': 'addons/',
80+ 'addons-extra/account_fiscal_position_rule': 'addons/',
81+ 'addons-extra/account_fiscal_position_rule_sale': 'addons/',
82+ 'addons-extra/account_fiscal_position_rule_stock': 'addons/',
83+ 'addons-extra/account_fiscal_position_rule_purchase': 'addons/',
84+ 'addons-extra/account_product_fiscal_classification': 'addons/',
85+ }
86+
87+ if version in ('4.2', '5.0', '6.0'):
88+ bzr_links = {
89+ 'addons/*': 'server/bin/addons/',
90+ }
91+ else:
92+ bzr_links = {
93+ 'addons/*': 'server/openerp/addons/',
94+ }
95+ bzr_repository['web'] = (BASEURL + '~openerp/openerp-web/' + webversion, True)
96
97 if branch:
98- cmd = {'new': lambda u, l, r: run_cmd('branch', u, l, revision=r),
99+ cmd = {'new': lambda u, l, r: run_cmd('branch', u, l, stacked=True, revision=r),
100 'update': lambda u, l, r: run_cmd('pull', u, directory=l, overwrite=True, revision=r),
101 }
102 else:
103@@ -110,6 +135,17 @@
104 cmd[status](bzrdir, local, rev and [rev] or None)
105
106 # Doing symlinks
107+ log('(Re)Computing l10n Symbolic links...')
108+ for src2,dest2 in bzr_l10n_links.items():
109+ src2 = os.path.join(dest_dir, src2)
110+ dest2 = os.path.join(dest_dir, dest2)
111+ for src in glob.glob(src2):
112+ dest = os.path.join(dest2, os.path.basename(src))
113+ if not os.path.isdir(dest):
114+ os.symlink(os.path.realpath(src), dest)
115+
116+
117+ # Doing symlinks
118 log('(Re)Computing Symbolic links...')
119 for src2,dest2 in bzr_links.items():
120 src2 = os.path.join(dest_dir, src2)
121@@ -120,9 +156,11 @@
122 os.symlink(os.path.realpath(src), dest)
123
124 log('='*79)
125- log('Sources of OpenERP have been installed. If you develop new features,')
126- log('you can get more information on how to contribute to the project here:')
127- log('\thttp://test.openobject.com')
128+ log('Sources of OpenERP and Brazilian localization have been installed. ')
129+ log('If you develop new features, you can get more information on how to ')
130+ log('contribute to the project here:')
131+ log('\thttp://www.openobject.com/community')
132+ log('\thttp://www.openerpbrasil.org' )
133 log('='*79)
134
135 #