← Back to team overview

openerp-india team mailing list archive

[Bug 997160] Re: can't post journal entries after execution of the "return picking" wizard

 

*** This bug is a duplicate of bug 789074 ***
    https://bugs.launchpad.net/bugs/789074

** Branch linked: lp:~openerp-dev/openobject-addons/6.0-opw-574735-rha

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/997160

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

Status in OpenERP Addons (modules):
  New

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) ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/997160/+subscriptions


References