Discussion:
[Erp5-dev] [BUG?] Base_print - selection functionality gone
Lukasz Nowak
2006-10-05 08:18:03 UTC
Permalink
Hello,

I've noticted today (but I think, that it gone earlier), that functionality
which allows selecting multiple print actions (discussed in 'Multiple actions
for object_exchange and object_print' thread) gone.

Steps to reproduce:

Install fresh erp5, install erp5_base BT, install erp5_pdf_style BT, add
Dummy_form with form_dialog template in custom portal_skins folder, attach it
to object action as object_print (eg. Person), create Person object, click on
print.

Behavior:

Buttons 'Cancel' and 'Print'.

Excpeted Behavior:

List of attached print actions to object and buttons 'Cancel' and 'Print'.

I'll try to hunt that bug and deliver patch as its important for us, but for
now, I do not know, where to look for it.

Thanks for any suggestions,
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-10-05 10:04:40 UTC
Permalink
Hello,
Post by Lukasz Nowak
Hello,
Well. Changes on file
erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml
between revisions 10251 and 10261 disabled that functionality.

I do not now how to give back that functionality correctly, log and comment do
not explain me enough, sorry.

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-10-05 16:56:26 UTC
Permalink
Post by Lukasz Nowak
Well. Changes on file
erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlSt
yle_filterParameterList.xml between revisions 10251 and 10261 disabled that
functionality.
I do not now how to give back that functionality correctly, log and comment
do not explain me enough, sorry.
This is a complete de-commit of 10251, because the latest had huge
side-effects which were not detected by the interface tests, and I did not
want to risk hot-fixing, and prefered rolling back changes.

So #10261 should be exactly the same as 9801.

Then, the idea for 10251 :
Back when I designed xhtml style "arguments propagation", I wanted to make a
system requiring no modifications at all if we ever require some special
arguments.
The application we already had which made me feel a need for argument
propagation is erp5_web. When you're browsing an erp5_web website, you can
pass the "editable_mode=1" parameter to switchto editable mode - providing
you have the right to. If after that, you move to another page, you must
provide this argument again in the url, which ended up in hardcoding many
parameters in most generated links.
What I thought as a solution was to just blindly take all received arguments,
filter out some known arguments which are always generated "when they
should", ie form fields, listbox fields, etc.
But there were 2 major drawbacks :
-the url might contain unchecked values
Even if it doesn't hurt as long as scripts check their inputs, more
agressive checks won't hurt.
-some values were not possible to filter out cleanly. For example, listbox
search fields must be named after the property they filter, so the filter
would have had to contain the names of all possible properties...

So the new (10251 reverted by 10261 and commited again in 10290) version names
the values to keep, because their names are much easier to enumerate. The
drawback compared to original design is that the filter must be edited to
handle more variables. The advantage is that there are no more "wild"
variables passed around.

So, back to that precise bug:
Before, dialog_category - which is the variable responsible for displaying the
dropdown menu in the dialog allowing to choose the print action to execute -
was passed around implicitely. Now, it has to be put explicitelly as a kept
variable when redirecting from Folder_print to the print action dialog :
return context.ERP5XhtmlStyle_redirect('%s/Base_print' %
(context.absolute_url(), ), keep_items={'dialog_category': 'object_print'},
**kw)
I'll commit this fix in a few minutes, along with a test in erp5_ui_tests.
--
Vincent Pelletier
Łukasz Nowak
2006-10-06 12:30:12 UTC
Permalink
Hello,

Pelletier Vincent napisa?(a):
(...)
[very important part which for now is to hard for me...]
(...)
Post by Pelletier Vincent
Before, dialog_category - which is the variable responsible for displaying the
dropdown menu in the dialog allowing to choose the print action to execute -
was passed around implicitely. Now, it has to be put explicitelly as a kept
return context.ERP5XhtmlStyle_redirect('%s/Base_print' %
(context.absolute_url(), ), keep_items={'dialog_category': 'object_print'},
**kw)
I'll commit this fix in a few minutes, along with a test in erp5_ui_tests.
Works great, thank you very much.

Bye,
Luke,
Yours Human Based Functional Tester

Loading...