Merge lp:~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement into lp:banking-addons/bank-statement-reconcile-70

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merged at revision: 83
Proposed branch: lp:~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement
Merge into: lp:banking-addons/bank-statement-reconcile-70
Diff against target: 208 lines (+64/-11)
10 files modified
account_easy_reconcile/__openerp__.py (+3/-3)
account_easy_reconcile/easy_reconcile.py (+7/-0)
account_easy_reconcile/easy_reconcile.xml (+2/-0)
account_easy_reconcile/easy_reconcile_history.py (+7/-0)
account_easy_reconcile/easy_reconcile_history_view.xml (+1/-0)
account_easy_reconcile/security/ir_rule.xml (+25/-0)
account_statement_ext/__openerp__.py (+6/-8)
account_statement_ext/security/ir_rule.xml (+10/-0)
account_statement_ext/statement.py (+1/-0)
account_statement_ext/statement_view.xml (+2/-0)
To merge this branch: bzr merge lp:~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp code review, no test Approve
Joël Grand-Guillaume @ camptocamp Pending
Review via email: mp+148379@code.launchpad.net

This proposal supersedes a proposal from 2013-02-13.

Description of the change

Adds multi-company support on account.statement.profile and adds multi-company support on easy-reconcile related models

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : Posted in a previous version of this proposal

LGTM ! Thanks

review: Approve
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Hello,

I have added multi-company support on easy-reconcile related models too

85. By Nicolas Bessi - Camptocamp

[FIX] version number as data model has changed

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : Posted in a previous version of this proposal

LGTM too

review: Approve (code review, no test)
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_easy_reconcile/__openerp__.py'
2--- account_easy_reconcile/__openerp__.py 2013-02-06 09:33:47 +0000
3+++ account_easy_reconcile/__openerp__.py 2013-02-14 08:17:21 +0000
4@@ -21,9 +21,8 @@
5
6 {
7 "name": "Easy Reconcile",
8- "version": "1.2",
9- "depends": ["account",
10- ],
11+ "version": "1.3.0",
12+ "depends": ["account"],
13 "author": "Akretion,Camptocamp",
14 "description": """
15 Easy Reconcile
16@@ -58,6 +57,7 @@
17 "demo_xml": [],
18 "data": ["easy_reconcile.xml",
19 "easy_reconcile_history_view.xml",
20+ "security/ir_rule.xml",
21 "security/ir.model.access.csv"],
22 'license': 'AGPL-3',
23 "auto_install": False,
24
25=== modified file 'account_easy_reconcile/easy_reconcile.py'
26--- account_easy_reconcile/easy_reconcile.py 2013-01-04 08:39:10 +0000
27+++ account_easy_reconcile/easy_reconcile.py 2013-02-14 08:17:21 +0000
28@@ -96,6 +96,12 @@
29 string='Task',
30 required=True,
31 ondelete='cascade'),
32+ 'company_id': fields.related('task_id','company_id',
33+ relation='res.company',
34+ type='many2one',
35+ string='Company',
36+ store=True,
37+ readonly=True),
38 }
39
40 _defaults = {
41@@ -182,6 +188,7 @@
42 type='many2one',
43 relation='easy.reconcile.history',
44 readonly=True),
45+ 'company_id': fields.many2one('res.company', 'Company'),
46 }
47
48 def _prepare_run_transient(self, cr, uid, rec_method, context=None):
49
50=== modified file 'account_easy_reconcile/easy_reconcile.xml'
51--- account_easy_reconcile/easy_reconcile.xml 2013-01-04 08:24:03 +0000
52+++ account_easy_reconcile/easy_reconcile.xml 2013-02-14 08:17:21 +0000
53@@ -27,6 +27,7 @@
54 <group>
55 <field name="name" select="1"/>
56 <field name="account"/>
57+ <field name="company_id" groups="base.group_multi_company"/>
58 </group>
59 <group>
60 <field name="unreconciled_count"/>
61@@ -76,6 +77,7 @@
62 <tree string="Automatic Easy Reconcile">
63 <field name="name"/>
64 <field name="account"/>
65+ <field name="company_id" groups="base.group_multi_company"/>
66 <field name="unreconciled_count"/>
67 <field name="reconciled_partial_count"/>
68 <button icon="gtk-ok" name="run_reconcile" colspan="4"
69
70=== modified file 'account_easy_reconcile/easy_reconcile_history.py'
71--- account_easy_reconcile/easy_reconcile_history.py 2012-12-20 10:15:12 +0000
72+++ account_easy_reconcile/easy_reconcile_history.py 2013-02-14 08:17:21 +0000
73@@ -81,6 +81,13 @@
74 relation='account.move.line',
75 readonly=True,
76 multi='lines'),
77+ 'company_id': fields.related('easy_reconcile_id','company_id',
78+ relation='res.company',
79+ type='many2one',
80+ string='Company',
81+ store=True,
82+ readonly=True),
83+
84 }
85
86 def _open_move_lines(self, cr, uid, history_id, rec_type='full', context=None):
87
88=== modified file 'account_easy_reconcile/easy_reconcile_history_view.xml'
89--- account_easy_reconcile/easy_reconcile_history_view.xml 2013-01-04 08:17:29 +0000
90+++ account_easy_reconcile/easy_reconcile_history_view.xml 2013-02-14 08:17:21 +0000
91@@ -48,6 +48,7 @@
92 <group>
93 <field name="easy_reconcile_id"/>
94 <field name="date"/>
95+ <field name="company_id" groups="base.group_multi_company"/>
96 </group>
97 <group col="2">
98 <separator colspan="2" string="Reconciliations"/>
99
100=== added file 'account_easy_reconcile/security/ir_rule.xml'
101--- account_easy_reconcile/security/ir_rule.xml 1970-01-01 00:00:00 +0000
102+++ account_easy_reconcile/security/ir_rule.xml 2013-02-14 08:17:21 +0000
103@@ -0,0 +1,25 @@
104+<?xml version="1.0" encoding="utf-8"?>
105+<openerp>
106+ <data noupdate="1">
107+ <record id="easy_reconcile_rule" model="ir.rule">
108+ <field name="name">Easy reconcile multi-company</field>
109+ <field name="model_id" ref="model_account_easy_reconcile"/>
110+ <field name="global" eval="True"/>
111+ <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
112+ </record>
113+
114+ <record id="easy_reconcile_history_rule" model="ir.rule">
115+ <field name="name">Easy reconcile history multi-company</field>
116+ <field name="model_id" ref="model_easy_reconcile_history"/>
117+ <field name="global" eval="True"/>
118+ <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
119+ </record>
120+
121+ <record id="easy_reconcile_method_rule" model="ir.rule">
122+ <field name="name">Easy reconcile method multi-company</field>
123+ <field name="model_id" ref="model_account_easy_reconcile_method"/>
124+ <field name="global" eval="True"/>
125+ <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
126+ </record>
127+ </data>
128+</openerp>
129
130=== modified file 'account_statement_ext/__openerp__.py'
131--- account_statement_ext/__openerp__.py 2013-02-04 15:16:28 +0000
132+++ account_statement_ext/__openerp__.py 2013-02-14 08:17:21 +0000
133@@ -20,7 +20,7 @@
134 ##############################################################################
135
136 {'name': "Bank statement extension and profiles",
137- 'version': '1.2.0',
138+ 'version': '1.3.0',
139 'author': 'Camptocamp',
140 'maintainer': 'Camptocamp',
141 'category': 'Finance',
142@@ -76,13 +76,11 @@
143
144 """,
145 'website': 'http://www.camptocamp.com',
146- 'init_xml': [],
147- 'update_xml': [
148- 'statement_view.xml',
149- 'report/bank_statement_webkit_header.xml',
150- 'report.xml',
151- 'security/ir.model.access.csv',
152- ],
153+ 'data': ['statement_view.xml',
154+ 'report/bank_statement_webkit_header.xml',
155+ 'report.xml',
156+ 'security/ir.model.access.csv',
157+ 'security/ir_rule.xml'],
158 'demo_xml': [],
159 'test': [],
160 'installable': True,
161
162=== added file 'account_statement_ext/security/ir_rule.xml'
163--- account_statement_ext/security/ir_rule.xml 1970-01-01 00:00:00 +0000
164+++ account_statement_ext/security/ir_rule.xml 2013-02-14 08:17:21 +0000
165@@ -0,0 +1,10 @@
166+<openerp>
167+ <data noupdate="1">
168+ <record id="account_bank_statement_profile_rule" model="ir.rule">
169+ <field name="name">Bank statement profile multi-company</field>
170+ <field name="model_id" ref="model_account_statement_profile"/>
171+ <field name="global" eval="True"/>
172+ <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
173+ </record>
174+ </data>
175+</openerp>
176\ No newline at end of file
177
178=== modified file 'account_statement_ext/statement.py'
179--- account_statement_ext/statement.py 2013-02-07 13:34:05 +0000
180+++ account_statement_ext/statement.py 2013-02-14 08:17:21 +0000
181@@ -76,6 +76,7 @@
182 'Bank Statement Prefix', size=32),
183 'bank_statement_ids': fields.one2many(
184 'account.bank.statement', 'profile_id', 'Bank Statement Imported'),
185+ 'company_id': fields.many2one('res.company', 'Company'),
186 }
187
188 def _check_partner(self, cr, uid, ids, context=None):
189
190=== modified file 'account_statement_ext/statement_view.xml'
191--- account_statement_ext/statement_view.xml 2013-01-28 09:48:10 +0000
192+++ account_statement_ext/statement_view.xml 2013-02-14 08:17:21 +0000
193@@ -11,6 +11,7 @@
194 <separator string="" colspan="4"/>
195 <field name="name" select="1" />
196 <field name="partner_id" select="1"/>
197+ <field name="company_id" select="1" groups="base.group_multi_company"/>
198 <field name="journal_id" select="1"/>
199 <field name="commission_account_id" />
200 <field name="commission_analytic_id" />
201@@ -31,6 +32,7 @@
202 <tree string="Import statement">
203 <field name="name" />
204 <field name="partner_id" />
205+ <field name="company_id" groups="base.group_multi_company"/>
206 <field name="journal_id" />
207 <field name="commission_account_id" />
208 <field name="commission_analytic_id" />

Subscribers

People subscribed via source and target branches