can't post journal entries after execution of the "return picking" wizard

Bug #997160 reported by Alexis de Lattre
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
OpenERP Publisher's Warranty Team

Bug Description

This is the most incredible bug that I have found in all my OpenERP developer life !

It is 100% reproductible on OpenERP 6.0 :
server 6.0 rev 3617 (current bzr version)
addons 6.0 rev 5222 (current bzr version)
client 6.0 rev 1949 (current bzr version)

I have prepared a small video that explains in detail the process to reproduce the bug and gives some debug explainations :
http://people.via.ecp.fr/~alexis/incredible_openerpv6_bug.ogv

Here is the process to reproduce the bug on OpenERP 6.0 :
1) Go to Accounting > Journal entries > Journal Items
2) Create an accounting entry by hand -> you get a draft account move
3) Select this entry, click on "Action", select "Post journal entries" and click on "Approve"

-> it WORKS, the account move is successfully posted.

4) Go to Warehouse > Warehouse management > Delivery order
5) Select any picking in "done" state and click on the button "Return Products". You don't have to fully execute the wizard ; you just have to start it.

Now, we execute steps 1, 2 and 3 again :

6) Go back to Accounting > Journal entries > Journal Items
7) Create an accounting entry by hand -> you get a draft account move
8) Select this entry, click on "Action", select "Post journal entries" and click on "Approve"
9) IT FAILS : you get a pop-up : "Invalid form, correct red fields !"

After a long debug session in the code of the Gtk client, we figured out that we get this pop-up because of a field "invoice_state" which is Required=True and is not filled :
{'selection': [('2binvoiced', u'To be refunded/invoiced'), ('none', u'No invoicing')], 'string': 'Invoicing', 'selectable': True, 'required': True, 'type': 'selection', 'valid': True, 'name': 'invoice_state'}
This is printed from the source code of the Gtk client : file client-60/bin/widget/model/field.py around line 90, in the "def validate(self, model)" function : I display the value of "self.get_state_attrs(model)"

This field is defined in stock/wizard/stock_return_picking.py line 89, inside the function "view_init" :
self._columns['invoice_state'] = fields.selection([('2binvoiced', 'To be refunded/invoiced'), ('none', 'No invoicing')], string='Invoicing', required=True)

The big question is : how is it possible that a field with required=True defined in the wizard stock.return.picking blocks the successfull execution of the wizard validate.account.move.lines (defined in account/wizard/account_validate_account_move.py) ?

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hello Alexis,

I had this issue half year ago and still nobody fixed it. Please look here https://bugs.launchpad.net/openobject-client/+bug/789074/comments/14

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

I confirm that the branch lp:~openerp-dev/openobject-addons/6.0-opw-574735-rha fixes the issue on OpenERP v6.0.

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello,

We are sorry that took so long but this was finally merged into openerp addons 6.0.
revno: 5484 [merge]
revision-id: <email address hidden>
Thanks for reporting

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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