Merge lp:~openerp-dev/openobject-addons/6.1-opw-583910-msh into lp:openobject-addons/6.1

Proposed by Mohammed Shekha(Open ERP)
Status: Rejected
Rejected by: Vinay Rana (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-583910-msh
Merge into: lp:openobject-addons/6.1
Diff against target: 15 lines (+2/-3)
1 file modified
account/account_move_line.py (+2/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-583910-msh
Reviewer Review Type Date Requested Status
Mohammed Shekha(Open ERP) (community) Disapprove
OpenERP Core Team Pending
Review via email: mp+144073@code.launchpad.net

Description of the change

Hello,

Fixed the issue of multi-currency, if invoice currency and secondary currency is same then constraint should not be raised.

Demo :- Go to Accounting -> Customer Invoice -> Select customer who has secondary currency as EUR, and make sure your invoice currency is also EUR, now try to validate that invoice you will see, constraint got fired,

If there is same currency of invoice and secondary currency then constraint must not be fired, as the constraint def describes that it will be fired this two currencies are different.

Thanks.

To post a comment you must log in.
Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello,

I have re-analyzed the concept of Secondary currency again and found that the code should be as it is, this branch is useless, because setting same Secondary Currency as company currency is making no sense, Hence I am rejecting this branch, no doubt as end user point of view it seems an issue that if I am setting Secondary Currency as well as Invoice Currecny same then why it should raise constraint "The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal." but Secondary currency must be used when you want force to make transaction in other currency then you company currency.

Here In account we have prevented to do this by code, so we can not consider it as a bug.

For details discussion on this, one can read the comments on following bugs.

https://bugs.launchpad.net/openobject-addons/+bug/925360
https://bugs.launchpad.net/openobject-addons/+bug/1015459

Thanks.

review: Disapprove

Unmerged revisions

7133. By Mohammed Shekha<email address hidden>

[FIX]Fixed the issue of multi-currency, if invoice currency and secondary currency is same then constraint should not be raised.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_move_line.py'
2--- account/account_move_line.py 2012-09-06 14:35:17 +0000
3+++ account/account_move_line.py 2013-01-21 09:20:31 +0000
4@@ -598,9 +598,8 @@
5
6 def _check_currency(self, cr, uid, ids, context=None):
7 for l in self.browse(cr, uid, ids, context=context):
8- if l.account_id.currency_id:
9- if not l.currency_id or not l.currency_id.id == l.account_id.currency_id.id:
10- return False
11+ if l.account_id.currency_id and not l.account_id.currency_id.id == l.account_id.company_currency_id.id and not l.currency_id.id == l.account_id.currency_id.id:
12+ return False
13 return True
14
15 _constraints = [