Discussion:
[Erp5-dev] Multiple actions for object_exchange and object_print
Lukasz Nowak
2006-09-07 14:49:48 UTC
Permalink
Hello,

Is it possibile to have multiple actions for object_exchange and object_print,
with diffrent icons? Where shall I look for documentation for it? Any clues?

Right now if I'm adding additional actions to types in object_{exchange|print}
only with lowest priority is shown and executed, but eg. I need to have many
print methods for one type (so I moved it to object_action).

Thanks in advance,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
Bartek Gorny
2006-09-07 16:20:43 UTC
Permalink
Post by Lukasz Nowak
Hello,
Is it possibile to have multiple actions for object_exchange and object_print,
with diffrent icons? Where shall I look for documentation for it? Any clues?
I think you should have a look at how object_report works, it should
be something similar. And it is working fine in some places (e.g.
Account module).

Bartek
Post by Lukasz Nowak
Right now if I'm adding additional actions to types in object_{exchange|print}
only with lowest priority is shown and executed, but eg. I need to have many
print methods for one type (so I moved it to object_action).
Thanks in advance,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Jérôme Perrin
2006-09-07 16:27:49 UTC
Permalink
Post by Lukasz Nowak
Hello,
Is it possibile to have multiple actions for object_exchange and
object_print, with diffrent icons?
Yep, using object_button as action category, and specifying an icon
Post by Lukasz Nowak
Where shall I look for documentation for it? Any clues?
There's no wiki page for this ? you can install erp5_ui_test business template
and have a look at testButtonActions in /erp5/portal_tests/ .
Post by Lukasz Nowak
Right now if I'm adding additional actions to types in
object_{exchange|print} only with lowest priority is shown and executed,
but eg. I need to have many print methods for one type (so I moved it to
object_action).
You can also use object_report, if your print methods can be considered as
reports.
--
J?rome
Lukasz Nowak
2006-09-12 15:47:43 UTC
Permalink
Hi,

Dnia czwartek, 7 wrze?nia 2006 18:27, napisa?e?:
(...)
Post by Jérôme Perrin
You can also use object_report, if your print methods can be considered as
reports.
Well, adding my own printing methods to object works, if Base_printPdf render
as form, not as script which is sending PDF to browser.

So I'm attaching "my way" of having many prints _AND_ fully working
Base_printPdf as form. I think that if erp5_core will be patched that way
someone in future won't have misunderstanding as mine and selecting print
method will be avaiable out-of-the-box.

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Base_printPdf.xml
Type: text/xml
Size: 3811 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20060912/b36b27a6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doBase_printPdf.xml
Type: text/xml
Size: 6024 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20060912/b36b27a6/attachment-0001.bin>
Pelletier Vincent
2006-09-13 09:32:28 UTC
Permalink
Post by Lukasz Nowak
So I'm attaching "my way" of having many prints _AND_ fully working
Base_printPdf as form. I think that if erp5_core will be patched that way
someone in future won't have misunderstanding as mine and selecting print
method will be avaiable out-of-the-box.
Thanks.
I just commited an update to erp5_xhtml_style with something very similar to
what you attached - just xhtml_style-ized.

The current behaviour is that when there is only one possible print action,
it's performed immediatelly when the button is clicked, and if there are more
than one available it displays a form to choose the one to execute.

please tell me if this behaviour looks disturbing. The usual way is to always
display an intermediate dialog when there might be more than one action.
Maybe this new way should be applied to other actions aswell, with the
restriction that potentially long actions - reports - should never be
executed immediatelly.
--
Vincent Pelletier
Lukasz Nowak
2006-09-13 09:42:31 UTC
Permalink
Hello,
Post by Pelletier Vincent
Thanks.
I just commited an update to erp5_xhtml_style with something very similar
to what you attached - just xhtml_style-ized.
The current behaviour is that when there is only one possible print action,
it's performed immediatelly when the button is clicked, and if there are
more than one available it displays a form to choose the one to execute.
please tell me if this behaviour looks disturbing. The usual way is to
always display an intermediate dialog when there might be more than one
action. Maybe this new way should be applied to other actions aswell, with
the restriction that potentially long actions - reports - should never be
executed immediatelly.
Great. I think that revision should be increased, because it's not upgrading
with BT tool. I'm testing it right now and send you report about issues.

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
Pelletier Vincent
2006-09-13 10:29:23 UTC
Permalink
Post by Lukasz Nowak
Great. I think that revision should be increased, because it's not
upgrading with BT tool.
Yes, I forgot to commit the revision number at the same time, and wondered
which changelog to write to commit it... and then forgot about it :) .

By the way, the BT5 repos has problems (not updating bt5 for some days, except
when I ran the generation by hand). I'm working on it.
--
Vincent Pelletier
Lukasz Nowak
2006-09-13 10:34:14 UTC
Permalink
Hello,
Post by Pelletier Vincent
Yes, I forgot to commit the revision number at the same time, and wondered
which changelog to write to commit it... and then forgot about it :) .
By the way, the BT5 repos has problems (not updating bt5 for some days,
except when I ran the generation by hand). I'm working on it.
I made my own repos, which I'm uping from SVN - often I need to upgrade 'core'
BTses, like erp5_xhtml_style right now, and they aren't in Nexedis public
repos. If you need any help with repos autoregeneration let me now.

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
Pelletier Vincent
2006-09-13 13:48:43 UTC
Permalink
Post by Lukasz Nowak
If you need any help with repos autoregeneration let me now.
...and now it works.
--
Vincent Pelletier
Pelletier Vincent
2006-09-13 13:48:53 UTC
Permalink
Post by Lukasz Nowak
I made my own repos, which I'm uping from SVN - often I need to upgrade
'core' BTses, like erp5_xhtml_style right now, and they aren't in Nexedis
public repos. If you need any help with repos autoregeneration let me now.
They are, but in products/ERP5/bootstrap because they are needed at install
time.
And my problem with bt generation is more some system configuration problem on
a machine, because it works when run by hand...
--
Vincent Pelletier
Lukasz Nowak
2006-09-14 08:04:12 UTC
Permalink
Hello,
Post by Pelletier Vincent
Post by Lukasz Nowak
Great. I think that revision should be increased, because it's not
upgrading with BT tool.
Yes, I forgot to commit the revision number at the same time, and wondered
which changelog to write to commit it... and then forgot about it :) .
There's one little problem with listing.

Situation: there are two print actions associated with type, one is default
(Base_printPdf) which sends PDF, and second is Print_OOo which sends
openoffice document. After second method is invoked _and_ browser asks to
save or open document then hitting on 'Cancel' button on form do not returns
to previous window, but sends document again.In this case
erp5/portal_skins/erp5_xhtml_style/Base_cancel isn't invoked.

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
Lukasz Nowak
2006-09-13 09:48:27 UTC
Permalink
Hello,
Post by Pelletier Vincent
Thanks.
I just commited an update to erp5_xhtml_style with something very similar
to what you attached - just xhtml_style-ized.
The current behaviour is that when there is only one possible print action,
it's performed immediatelly when the button is clicked, and if there are
more than one available it displays a form to choose the one to execute.
please tell me if this behaviour looks disturbing. The usual way is to
always display an intermediate dialog when there might be more than one
action. Maybe this new way should be applied to other actions aswell, with
the restriction that potentially long actions - reports - should never be
executed immediatelly.
This is little incosistent, but I think is better, than presenting form, when
only one action is possible. I've tested it, it works well with my own
additions to object_print very well. Thanks for patch.

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''
Jean-Paul Smets
2006-09-07 23:21:04 UTC
Permalink
Post by Lukasz Nowak
Hello,
Is it possibile to have multiple actions for object_exchange and
object_print, with diffrent icons? Where shall I look for documentation
for it? Any clues?
Actions for object_exchange / object_print should call a dialog
(form_dialog layout) rather than call an action directly.
Post by Lukasz Nowak
Right now if I'm adding additional actions to types in
object_{exchange|print} only with lowest priority is shown and executed,
but eg. I need to have many print methods for one type (so I moved it to
object_action).
Thanks in advance,
Luke
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Loading...