Account:-problem with passing of 'journal_id' in context while creating Journal Items in gtk.

Bug #907261 reported by Meera Trambadia (OpenERP)
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP R&D Addons Team 3

Bug Description

Scenario-1A
-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 in 'Sales Journal-(test)' only
-It should actually create record in the journal selected on search view.

Scenario-1B
-Accounting/Customers/Journal Items.In search view select journal other than 'Sales Journal-(test)'
-create a new journal item in form view you will see that it contains journal which has been selected in the search.
-And then click save.The journal changes and it now becomes 'Sales Journal-(test)'

Scenario-2
-Accounting/Journal Entries/Journal Items.
-create a new journal item in tree view and press enter.
-you will get Warning; field journal is required!

It appears that either it is not passing the journal_id in context or even if it does it is not updating the journal_id.
see bug 834512

It is working fine in web-client but in gtk it has problem with passing of journal_id in context.

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I have completely traced the all scenario, and I have noticed that only Scenario-1A is working fine with web-client.
Scenario-1B can not checked in web because in editable list view form view doesn't displayed in new web(Which is the behavior of web-client).

Scenario-2 are reproducible in both GTK as well as webclient both.

Currently I am confirming this issue and assigning this to addons team for following reasons.

@RD Team:-

*Scenario-1A:- This problem appears only in GTK client because GTk client doesn't passed the read-only field's value to server but web-client passed it, and we have set a context['journal_id'] = context.get('search_default_journal_id') on default_get method of account_move_line object, Due to this when we have search via journal field then this value set in the context. So the web client passed this value to server but GTk client doesn't. That's why we have seen that only record save with 'Sales Journal-(test)' journal only which is set as a default value.

For that reason we have seen that web-client works fine, also one more thing the GTK client's behavior are also correct (because GTK client never passed the read-only field's value same as 5.0, 6.0..;-)).

*Scenario-1B:- We can not checked this on web client due to web-client architecture. But in GTK we have seen the search-able value in form view but at the save time it will change because here again same problem appears due to read-only field.

*Scenario-2:- This scenario producible in GTk as well as web cilent because here journal_id field is readonly as well as required.
And in context we have got a "False" value for journal-id field.

So I think we need to fix this problem form addons side, that should be better because only due to this one issue we do not change client's behavior/architecture.

That's why I am assigning this to addons team, Team will take appropriate decision on it.

Thanks for understanding!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Meera Trambadia,

Thanks for reporting. The solution for this bug is proposed in the branch :https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-907261-mdi/

with following Revision ID and Number.

Revision ID : <email address hidden>
Revision Number : 6203

Thanks and Regards,

Divyesh Makwana(MDI)

Changed in openobject-addons:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.