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
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. workspace/ npg_jonco/ openerp- trunk-server/ bin/addons/ account_ voucher/ voucher_ payment_ receipt_ view.xml ======= ======= ======= ======= ======= ======= ======= ======= ==== workspace/ npg_jonco/ openerp- trunk-server/ bin/addons/ account_ voucher/ voucher_ payment_ receipt_ view.xml (revision 4392) workspace/ npg_jonco/ openerp- trunk-server/ bin/addons/ account_ voucher/ voucher_ payment_ receipt_ view.xml (working copy)
<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 ?"/> voucher" string="Validate" states="draft" icon="gtk- go-forward" /> 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>
Index: /home/mjk/
=======
--- /home/mjk/
+++ /home/mjk/
@@ -324,7 +324,7 @@
- <button name="proforma_
+ <button name="proforma_
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
======= ======= ======= === mjk/workspace/ npg_jonco/ openobject- client/ bin/widget/ view/form_ gtk/parser. py", line 121, in button_clicked get_button_ action( self.form. screen, id, self.attrs) mjk/workspace/ npg_jonco/ openobject- client/ bin/widget/ model/record. py", line 376, in get_button_action _exec_action( result, {}, context=context) mjk/workspace/ npg_jonco/ openobject- client/ bin/modules/ action/ main.py" , line 141, in _exec_action datas[' limit'] , auto_refresh= datas[' auto_refresh' ], auto_search = datas[' auto_search' ], search_view = datas[' search_ view']) mjk/workspace/ npg_jonco/ openobject- client/ bin/modules/ gui/window/ __init_ _.py", line 49, in create refresh= auto_refresh, auto_search= auto_search, search_ view=search_ view) mjk/workspace/ npg_jonco/ openobject- client/ bin/modules/ gui/window/ form.py" , line 73, in __init__ search= True, window=self.window, limit=limit, readonly= bool(auto_ refresh) , auto_search= auto_search, search_ view=search_ view) mjk/workspace/ npg_jonco/ openobject- client/ bin/widget/ screen/ screen. py", line 128, in __init__ mjk/workspace/ npg_jonco/ openobject- client/ bin/widget/ screen/ screen. py", line 785, in display current_ view.display( ) mjk/workspace/ npg_jonco/ openobject- client/ bin/widget/ view/form. py", line 507, in display screen. window. set_default( button_ focus.widget) ======= ======= ======= =====
Traceback (most recent call last):
File "/home/
model.
File "/home/
obj.
File "/home/
limit=
File "/home/
auto_
File "/home/
show_
File "/home/
self.display()
File "/home/
self.
File "/home/
self.
AttributeError: 'NoneType' object has no attribute 'set_default'
=======
Hope you now have enough information to recreate the issue.
Waiting for your response
Sinoj