Merge lp:~openerp-dev/openobject-addons/trunk-bug-907261-mdi into lp:openobject-addons

Proposed by DJ Patel (OpenERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-907261-mdi
Merge into: lp:openobject-addons
Diff against target: 21 lines (+1/-3)
1 file modified
account/account_move_line.py (+1/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-907261-mdi
Reviewer Review Type Date Requested Status
Purnendu Singh (OpenERP) (community) Needs Fixing
Review via email: mp+87717@code.launchpad.net

Description of the change

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/907261 "Account:-problem with passing of 'journal_id' in context while creating Journal Items in gtk".

I remove the 'readonly' attribute from 'journal_id' field.
Because Gtk does not send the value of read-only field to Server.

Thanks and Regards,

Divyesh Makwana(MDI)

To post a comment you must log in.
Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

Hello Divyesh,

This fix is not good!!!

Counterpart line is not created with right values. Say for e.g:

-Accounting/Customers/Journal Items.In search view select journal other than 'Sales Journal-(test)'
-Create a new journal item in tree view and press enter.
-It creates counterpart entries but line is not having right values!!!

Thanks,
Purnendu Singh

review: Needs Fixing
6204. By DJ Patel (OpenERP)

[Merge] Merge with main addons

Unmerged revisions

6204. By DJ Patel (OpenERP)

[Merge] Merge with main addons

6203. By DJ Patel (OpenERP)

[FIX] account : problem with passing of 'journal_id' in context while creating Journal Items in gtk.

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-01-30 11:18:03 +0000
3+++ account/account_move_line.py 2012-02-01 05:11:26 +0000
4@@ -494,7 +494,7 @@
5 'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
6 'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
7 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
8- 'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True, readonly=True,
9+ 'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True,
10 store = {
11 'account.move': (_get_move_lines, ['journal_id'], 20)
12 }),
13@@ -1250,8 +1250,6 @@
14 if len(period_candidate_ids) != 1:
15 raise osv.except_osv(_('Encoding error'), _('No period found or more than one period found for the given date.'))
16 context['period_id'] = period_candidate_ids[0][0]
17- if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
18- context['journal_id'] = context.get('search_default_journal_id')
19 self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
20 move_id = vals.get('move_id', False)
21 journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)

Subscribers

People subscribed via source and target branches

to all changes: