[6.0rc1] Issue with default button.

Bug #675417 reported by sinoj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
Jay Vora (Serpent Consulting Services)

Bug Description

Wizard action that try to open a view with default button is not working. It shows no error but it do not open the view. The same thing do work on webclient.
Default button is defined with default_focus=”1” as mentioned in http://doc.openerp.com/developer/2_6_views_events/views/design_element.html

Also I can open the view other than from the wizard action (using menu).

To recreate the issue, set a default button on customer payment form. And Try "payment" button on the invoice. Once the default button is set, "Payment" button will not bring the customer payment form. But still I can open the customer payment form form menu.

Tags: maintenance

Related branches

tags: added: maintenance
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Sebastian,

As per your post I tried it at my end.
Things work fine so does the default_focus.
Have checked in other modules too.

Would you please attach screen-shots? To trace the exact mishap that you face.
Thank you.

Revision history for this message
sinoj (sinojsebastian) wrote :
Download full text (3.3 KiB)

Hello JMA,
   Thank you for your time and effort to trace the problem.

To recreate the issue,

1) on account_voucher module set a default button.
Index: /home/mjk/workspace/npg_jonco/openerp-trunk-server/bin/addons/account_voucher/voucher_payment_receipt_view.xml
===================================================================
--- /home/mjk/workspace/npg_jonco/openerp-trunk-server/bin/addons/account_voucher/voucher_payment_receipt_view.xml (revision 4392)
+++ /home/mjk/workspace/npg_jonco/openerp-trunk-server/bin/addons/account_voucher/voucher_payment_receipt_view.xml (working copy)
@@ -324,7 +324,7 @@
                         <field name="state"/>
                         <button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
                         <button name="cancel_voucher" string="Unreconcile" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
- <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
+ <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" default_focus="1"/>
                         <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
                     </group>
                 </form>

2) Install/update the account_voucher module

3) create a new invoice and try to use the payment button.
   This will not open the payment form which is expected.
On the client log, I have an error message. But no error message visible to the user

========================
Traceback (most recent call last):
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/widget/view/form_gtk/parser.py", line 121, in button_clicked
    model.get_button_action(self.form.screen, id, self.attrs)
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/widget/model/record.py", line 376, in get_button_action
    obj._exec_action(result, {}, context=context)
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/modules/action/main.py", line 141, in _exec_action
    limit=datas['limit'], auto_refresh=datas['auto_refresh'], auto_search = datas['auto_search'], search_view = datas['search_view'])
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/modules/gui/window/__init__.py", line 49, in create
    auto_refresh=auto_refresh, auto_search=auto_search, search_view=search_view)
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/modules/gui/window/form.py", line 73, in __init__
    show_search=True, window=self.window, limit=limit, readonly=bool(auto_refresh), auto_search=auto_search, search_view=search_view)
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/widget/screen/screen.py", line 128, in __init__
    self.display()
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/widget/screen/screen.py", line 785, in display
    self.current_view.display()
  File "/home/mjk/workspace/npg_jonco/openobject-client/bin/widget/view/form.py", line 507, in display
    self.screen.window.set_default(button_focus.wi...

Read more...

Changed in openobject-client:
assignee: nobody → Jay (OpenERP) (jvo-openerp)
Changed in openobject-client:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Sinoj,

Would you please apply the patch and check?
Thanks.

Revision history for this message
sinoj (sinojsebastian) wrote :

Hi Jay
That patch is working for me. Thank you. When you will include this patch in trunk?

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thanks for the response.
The fix has landed into trunk by revision 1692 <email address hidden>.

Changed in openobject-client:
status: Confirmed → Fix Released
milestone: none → 6.0-rc2
Revision history for this message
sinoj (sinojsebastian) wrote : Re: [Bug 675417] Re: [6.0rc1] Issue with default button.

Hi Jay,
I have an urgent question, how do I set up a window client with this
modification?

On Tue, Nov 16, 2010 at 6:59 PM, Jay (OpenERP) <email address hidden> wrote:

> Thanks for the response.
> The fix has landed into trunk by revision 1692
> <email address hidden>.
>
>
> ** Changed in: openobject-client
> Status: Confirmed => Fix Released
>
> ** Changed in: openobject-client
> Milestone: None => 6.0-rc2
>
> --
> [6.0rc1] Issue with default button.
> https://bugs.launchpad.net/bugs/675417
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in OpenObject GTK Client: Fix Released
>
> Bug description:
> Wizard action that try to open a view with default button is not working.
> It shows no error but it do not open the view. The same thing do work on
> webclient.
> Default button is defined with default_focus=”1” as mentioned in
> http://doc.openerp.com/developer/2_6_views_events/views/design_element.html
>
> Also I can open the view other than from the wizard action (using menu).
>
> To recreate the issue, set a default button on customer payment form. And
> Try "payment" button on the invoice. Once the default button is set,
> "Payment" button will not bring the customer payment form. But still I can
> open the customer payment form form menu.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-client/+bug/675417/+subscribe
>

--
Best Regards

Sinoj Sebastian <email address hidden>
Project Manager [OpenERP],
ZestyBeanz Technologies Pvt. Ltd.
National Institute of Technology (NIT/REC)
Kozhikode, Kerala, India.

Ph : +91 495 2520873.
Mob : +91 99466 44739.
Skype : sinoj_sebastian
Web : www.zbeanztech.com

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

You will find windows installer only after the release of RC2.
If you want to build on your own, you may get help from http://www.openerp.com/forum/topic12184.html.
Thanks.

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.