Discussion:
[Erp5-dev] Base_viewFieldLibrary question
Tomasz Brzezina
2008-03-03 10:37:32 UTC
Permalink
I found that when I press test tab on

/erp5/portal_skins/erp5_core/Base_viewFieldLibrary/my_category

i got:

Test this ListField.
Category [ [V] - and it's ok (i suppose)

BUT if i press tab on:
/erp5/portal_skins/erp5_core/Base_viewFieldLibrary/my_category_list

i got:

Site Error

An error was encountered while publishing this resource.

Error Type: AttributeError
Error Value: 'NoneType' object has no attribute 'set'

WHY?
--
Tomasz Brzezina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080303/bc2c0ca2/attachment.bin>
Tomasz Brzezina
2008-03-03 14:24:48 UTC
Permalink
I think that it's a seriuos bug - because some categories e.g. Skills
use my_category_list BUT there's no difference between skills and grade,
which use my_category (i think that there should be a difference -
because somebody can have multiple skills - but only one grade (highest)
--
Tomasz Brzezina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080303/d06a4481/attachment.bin>
bartek
2008-03-03 14:30:19 UTC
Permalink
Post by Tomasz Brzezina
I found that when I press test tab on
/erp5/portal_skins/erp5_core/Base_viewFieldLibrary/my_category
This is normal :)

If you want to test a form, do it in some "real" context, appropriate
for the form.

Bartek
Post by Tomasz Brzezina
Test this ListField.
Category [ [V] - and it's ok (i suppose)
/erp5/portal_skins/erp5_core/Base_viewFieldLibrary/my_category_list
Site Error
An error was encountered while publishing this resource.
Error Type: AttributeError
Error Value: 'NoneType' object has no attribute 'set'
WHY?
------------------------------------------------------------------------
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Tomasz Brzezina
2008-03-03 14:35:43 UTC
Permalink
Post by bartek
Post by Tomasz Brzezina
I found that when I press test tab on
/erp5/portal_skins/erp5_core/Base_viewFieldLibrary/my_category
This is normal :)
If you want to test a form, do it in some "real" context, appropriate
for the form.
so why the others works correctly?
--
Tomasz Brzezina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080303/1fd94571/attachment.bin>
Tomasz Brzezina
2008-03-03 14:40:49 UTC
Permalink
Post by bartek
This is normal :)
If you want to test a form, do it in some "real" context, appropriate
for the form.
(in real context it won't work neither)
--
Tomasz Brzezina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080303/dee3a616/attachment.bin>
bartek
2008-03-03 14:51:01 UTC
Permalink
Post by Tomasz Brzezina
Post by bartek
This is normal :)
If you want to test a form, do it in some "real" context, appropriate
for the form.
(in real context it won't work neither)
Ok, try this:

- in "custom" skin, create an ERP5 Form, name it "Person_test"

- in the form, add a ProxyField, give it an id "my_gender"

- in the field configuraion set "Form ID" to Base_viewFieldLibrary and
"Field ID" to my_category

- view Person_test in context of a Person object (to make it work for
real you have to add some categories to portal_categories/gender base
category)

- edit Person_view.my_gender field so that Field ID is my_category_list

- see what has changed

B.
Post by Tomasz Brzezina
------------------------------------------------------------------------
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Tomasz Brzezina
2008-03-03 15:13:35 UTC
Permalink
Post by bartek
Post by Tomasz Brzezina
Post by bartek
This is normal :)
If you want to test a form, do it in some "real" context, appropriate
for the form.
(in real context it won't work neither)
- in "custom" skin, create an ERP5 Form, name it "Person_test"
- in the form, add a ProxyField, give it an id "my_gender"
- in the field configuraion set "Form ID" to Base_viewFieldLibrary and
"Field ID" to my_category
- view Person_test in context of a Person object (to make it work for
real you have to add some categories to portal_categories/gender base
category)
- edit Person_view.my_gender field so that Field ID is my_category_list
- see what has changed
Yes, I can see a difference:

In first case: I can see combobox with Male Female - as expected

In second case:

Site Error

An error was encountered while publishing this resource.

Error Type: AttributeError
Error Value: 'NoneType' object has no attribute 'set'
--
Tomasz Brzezina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080303/cbe3dff4/attachment.bin>
bartek
2008-03-03 15:20:08 UTC
Permalink
Post by Tomasz Brzezina
Post by bartek
Post by Tomasz Brzezina
Post by bartek
This is normal :)
If you want to test a form, do it in some "real" context,
appropriate for the form.
(in real context it won't work neither)
- in "custom" skin, create an ERP5 Form, name it "Person_test"
- in the form, add a ProxyField, give it an id "my_gender"
- in the field configuraion set "Form ID" to Base_viewFieldLibrary and
"Field ID" to my_category
- view Person_test in context of a Person object (to make it work for
real you have to add some categories to portal_categories/gender base
category)
- edit Person_view.my_gender field so that Field ID is my_category_list
- see what has changed
In first case: I can see combobox with Male Female - as expected
Site Error
An error was encountered while publishing this resource.
Error Type: AttributeError
Error Value: 'NoneType' object has no attribute 'set'
Works for me, but I'm currently on 18850. Can somebody running HEAD have
a look?

B.
Post by Tomasz Brzezina
------------------------------------------------------------------------
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Tomasz Brzezina
2008-03-04 15:04:53 UTC
Permalink
Post by bartek
Post by Tomasz Brzezina
Site Error
An error was encountered while publishing this resource.
Error Type: AttributeError
Error Value: 'NoneType' object has no attribute 'set'
Works for me, but I'm currently on 18850. Can somebody running HEAD have
a look?
Today I'm also 18850 - the same WRONG result
--
Tomasz Brzezina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080304/04f070d7/attachment.bin>
bartek
2008-03-04 15:56:21 UTC
Permalink
Post by Tomasz Brzezina
Post by bartek
Post by Tomasz Brzezina
Site Error
An error was encountered while publishing this resource.
Error Type: AttributeError
Error Value: 'NoneType' object has no attribute 'set'
Works for me, but I'm currently on 18850. Can somebody running HEAD
have a look?
Today I'm also 18850 - the same WRONG result
Then I can't tell - is it possible to access your site from outside, so
that I can have a look? If not, then plz attach a complete traceback.

Bartek
Post by Tomasz Brzezina
------------------------------------------------------------------------
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
Tomasz Brzezina
2008-03-04 23:54:43 UTC
Permalink
Post by bartek
Post by bartek
- view Person_test in context of a Person object (to make it work for
real you have to add some categories to portal_categories/gender base
category)
Works for me, but I'm currently on 18850. Can somebody running HEAD have
a look?
Ok - works - misunderstandig the sentence: "in context of a Person
object" - but now I know that I would NEVER use ParallelListField. It's
ugly, awful and bad. I would use MultiListField without proxy until
someday somebody add MultiListField into base_viewFieldLibrary (or
anywhere else)
--
T.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3327 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080305/5999321e/attachment.bin>
Rafael Monnerat
2008-03-03 14:56:53 UTC
Permalink
Just some notes:

1 - Base_viewFieldLibrary is just a Library that contains fields to be
used by ProxyFields
2- for ERP5Form test does not show too much.
3- real context means that context is one erp5 document (content) like
erp5/portal_templates/1
4- About create ERP5 Form: http://www.erp5.org/HowToCreateNewForms
5- About ERP5 Form: http://www.erp5.org/ERP5Form
Post by Tomasz Brzezina
Post by bartek
This is normal :)
If you want to test a form, do it in some "real" context, appropriate
for the form.
(in real context it won't work neither)
------------------------------------------------------------------------
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
Loading...