Merge lp:~agilebg/account-consolidation/7.0-bug-1296740-elbati into lp:~account-core-editors/account-consolidation/7.0

Proposed by Lorenzo Battistini
Status: Merged
Approved by: Alexandre Fayolle - camptocamp
Approved revision: 21
Merged at revision: 22
Proposed branch: lp:~agilebg/account-consolidation/7.0-bug-1296740-elbati
Merge into: lp:~account-core-editors/account-consolidation/7.0
Diff against target: 29 lines (+0/-5)
1 file modified
account_parallel_currency/account.py (+0/-5)
To merge this branch: bzr merge lp:~agilebg/account-consolidation/7.0-bug-1296740-elbati
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp code review, test Approve
Ana Juaristi Olalde (community) code review Approve
Yannick Vaucher @ Camptocamp Needs Fixing
Pedro Manuel Baeza code review Approve
Review via email: mp+212487@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM

Regards.

review: Approve (code review)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

centralized is defined in account-financial-report/account_financial_report_webkit/account.py

It seams there is no dependancy on it and I think no dependancy should be there.
But simply removing it will break compatibility with account_financial_report_webkit

However, a link module by extracting centralized can be added to ensure account_financial_report_webkit and account_parralel_currency are still compatible.

Can you extract centralized copying in a new module in auto-install when account_financial_report_webkit and account_parralel_currency are installed?

review: Needs Fixing
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Dear Yannick,

I don't think this MP would break compatibility with account_financial_report_webkit.
I installed account_financial_report_webkit and account_parralel_currency and I can use them without problems.

It just doesn't copy the centralized field to the parallel accounts. For that, a link module can be surely done. But I think it has less priority than fixing the linked bug.

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

LGTM, thanks

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

I've reported a separate bug requestion the new module creation.

I'm approving this MP although the tests are failing because they were failing before too (lp:1334645)

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_parallel_currency/account.py'
--- account_parallel_currency/account.py 2013-09-27 07:51:20 +0000
+++ account_parallel_currency/account.py 2014-03-24 18:18:16 +0000
@@ -85,8 +85,6 @@
85 vals['user_type'] = account_vals['user_type']85 vals['user_type'] = account_vals['user_type']
86 if 'active' in account_vals:86 if 'active' in account_vals:
87 vals['active'] = account_vals['active']87 vals['active'] = account_vals['active']
88 if 'centralized' in account_vals:
89 vals['centralized'] = account_vals['centralized']
90 if 'parent_id' in account_vals:88 if 'parent_id' in account_vals:
91 parent_account = self.browse(cr, uid, account_vals['parent_id'], context)89 parent_account = self.browse(cr, uid, account_vals['parent_id'], context)
92 parent_parallel_acc_id = self._search_parallel_account(90 parent_parallel_acc_id = self._search_parallel_account(
@@ -112,7 +110,6 @@
112 'type': account.type,110 'type': account.type,
113 'user_type': account.user_type and account.user_type.id or False,111 'user_type': account.user_type and account.user_type.id or False,
114 'active': account.active,112 'active': account.active,
115 'centralized': account.centralized,
116 })113 })
117 cr.execute("insert into parallel_account_rel(parent_id,child_id) values (%d,%d)"114 cr.execute("insert into parallel_account_rel(parent_id,child_id) values (%d,%d)"
118 % (account.id, new_id))115 % (account.id, new_id))
@@ -443,8 +440,6 @@
443 vals['user_type'] = tax_code_vals['user_type']440 vals['user_type'] = tax_code_vals['user_type']
444 if tax_code_vals.has_key('active'):441 if tax_code_vals.has_key('active'):
445 vals['active'] = tax_code_vals['active']442 vals['active'] = tax_code_vals['active']
446 if tax_code_vals.has_key('centralized'):
447 vals['centralized'] = tax_code_vals['centralized']
448 if tax_code_vals.has_key('parent_id'):443 if tax_code_vals.has_key('parent_id'):
449 parent_tax_code = self.browse(cr, uid, tax_code_vals['parent_id'], context)444 parent_tax_code = self.browse(cr, uid, tax_code_vals['parent_id'], context)
450 parent_parallel_acc_id = self._search_parallel_tax_code(445 parent_parallel_acc_id = self._search_parallel_tax_code(

Subscribers

People subscribed via source and target branches