c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #04308
[Bug 675417] Re: [6.0rc1] Issue with default button.
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.widget)
AttributeError: 'NoneType' object has no attribute 'set_default'
=================================
Hope you now have enough information to recreate the issue.
Waiting for your response
Sinoj
--
[6.0rc1] Issue with default button.
https://bugs.launchpad.net/bugs/675417
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject GTK Client: New
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.
References