Discussion:
[Erp5-dev] Re: BaseTrade*_FiledLibrary - date-time fields
Shresth K
2007-06-19 11:25:14 UTC
Permalink
Found a way that may work but seems a bit cumbersome.

1. Copy the original to portal_skins/custom
2. Make changes to it.
3. Export the original and the modified one as xml.
4. Do a diff of the two and post the output.

Is this the correct and easiest way?

Shresth
I noticed that almost all the date fields in BaseTrade*_FiledLibrary forms
lack the following -
python: here.portal_preferences.getPreferredDateOrder()
in "Input order". Is my observation correct?
I would like to submit a patch for the same but am a novice at such
things.
Kindly guide me for the same so that I can help in whatever little way
possible.
Regards,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070619/b3c3989c/attachment.htm>
Shresth K
2007-06-19 10:59:06 UTC
Permalink
I noticed that almost all the date fields in BaseTrade*_FiledLibrary forms
lack the following -

python: here.portal_preferences.getPreferredDateOrder()

in "Input order". Is my observation correct?

I would like to submit a patch for the same but am a novice at such things.

Kindly guide me for the same so that I can help in whatever little way
possible.

Regards,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070619/ecc099f6/attachment.htm>
Łukasz Nowak
2007-06-19 11:34:03 UTC
Permalink
Hello,
I noticed that almost all the date fields in BaseTrade*_FiledLibrary
forms lack the following -
python: here.portal_preferences.getPreferredDateOrder()
in "Input order". Is my observation correct?
Hm. Why they shall be needed?
I would like to submit a patch for the same but am a novice at such things.
Kindly guide me for the same so that I can help in whatever little way
possible.
Use erp5_forge Business Template which will allow you to do svn diff on
checked out tree. More info is on wiki[1].

Luke
[1]http://www.erp5.org/HowToUseERP5Subversion
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''
Shresth K
2007-06-19 11:41:33 UTC
Permalink
Post by Łukasz Nowak
Hello,
I noticed that almost all the date fields in BaseTrade*_FiledLibrary
forms lack the following -
python: here.portal_preferences.getPreferredDateOrder()
in "Input order". Is my observation correct?
Hm. Why they shall be needed?
How else can users make their date order defined in preferences, be
effective in other modules that they access?
Post by Łukasz Nowak
I would like to submit a patch for the same but am a novice at such
things.
Kindly guide me for the same so that I can help in whatever little way
possible.
Use erp5_forge Business Template which will allow you to do svn diff on
checked out tree. More info is on wiki[1].
Thanks. Was just exploring this. Looks like the devil lies here. ;-)

Luke
Post by Łukasz Nowak
[1]http://www.erp5.org/HowToUseERP5Subversion
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070619/e0c36098/attachment.htm>
Łukasz Nowak
2007-06-19 11:52:32 UTC
Permalink
Hello,
Post by Shresth K
Post by Łukasz Nowak
Hm. Why they shall be needed?
How else can users make their date order defined in preferences, be
effective in other modules that they access?
You're right. I wasn't using it *and* misread your problem. I've seen it
is not working, but I think, that it wouldn't be needed to put such data
in every DateTime field. Maybe it is something obsolete or not yet
implemented...

Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''
Shresth K
2007-06-19 15:35:43 UTC
Permalink
Read everything at this link. Made it work. Can see the diff. But still
don't know how to extract/send that diff so as to submit a patch.
Post by Łukasz Nowak
Hello,
Post by Shresth K
Post by Łukasz Nowak
Hm. Why they shall be needed?
How else can users make their date order defined in preferences, be
effective in other modules that they access?
You're right. I wasn't using it *and* misread your problem. I've seen it
is not working, but I think, that it wouldn't be needed to put such data
in every DateTime field. Maybe it is something obsolete or not yet
implemented...
As I can see that Base*_FieldLibrary already provides a central location to
effect the changes througout Purchase, Sale or the like, I am yet not aware
of any other way of effecting such a configuration. Hence, one is not
required to "put such data in every DateTime field" . Yet I would like to
know if there is any better and yet a lower level setting that can make
things easier.

As for the patch, I managed to successfully work my way through erp5_forge
and subversion and can see the diff as well but still don't know how can I
submit such a diff output as a patch. Any help is most welcome.

Thanks,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070619/d2c9fcf0/attachment.htm>
Pelletier Vincent
2007-06-19 16:14:51 UTC
Permalink
Post by Shresth K
Read everything at this link. Made it work. Can see the diff. But still
don't know how to extract/send that diff so as to submit a patch.
Post by Łukasz Nowak
Hello,
Post by Shresth K
Post by Łukasz Nowak
Hm. Why they shall be needed?
How else can users make their date order defined in preferences, be
effective in other modules that they access?
You're right. I wasn't using it *and* misread your problem. I've seen it
is not working, but I think, that it wouldn't be needed to put such data
in every DateTime field. Maybe it is something obsolete or not yet
implemented...
As I can see that Base*_FieldLibrary already provides a central location to
effect the changes througout Purchase, Sale or the like, I am yet not aware
of any other way of effecting such a configuration. Hence, one is not
required to "put such data in every DateTime field" . Yet I would like to
know if there is any better and yet a lower level setting that can make
things easier.
As for the patch, I managed to successfully work my way through erp5_forge
and subversion and can see the diff as well but still don't know how can I
submit such a diff output as a patch. Any help is most welcome.
Hi.

Thanks for your - future - contribution !

When you click on the "Subversion" tab, the business template gets rebuilt and
exported to the working copy. So once the diff tree gets displayed, that
export is over and you can get the text diff by issuing the usual "svn diff"
command in the working copy.

If you did not install the business template from the same working copy, it is
very likely that the diff will be poluted by reversed patches. It would be
much appreciated if you clean the diff before sending it, or at least
restrict it to the files you modified (they should be somewhere below the
SkinTemplateItem folder).
--
Vincent Pelletier
Shresth K
2007-06-20 15:40:16 UTC
Permalink
--snip--
Post by Pelletier Vincent
Thanks for your - future - contribution !
When you click on the "Subversion" tab, the business template gets rebuilt and
exported to the working copy. So once the diff tree gets displayed, that
export is over and you can get the text diff by issuing the usual "svn diff"
command in the working copy.
If you did not install the business template from the same working copy, it is
very likely that the diff will be poluted by reversed patches. It would be
much appreciated if you clean the diff before sending it, or at least
restrict it to the files you modified (they should be somewhere below the
SkinTemplateItem folder).
This is the strategy I decided to follow:
1. "svn up" for the latest erp5_trade BT
2. In the template tool download by providing URL and then Install it (This
happened smoothly, with several objects being Backed up, removed, upgraded
as per default options)
3. Made the changes to the ERP5 Forms that I thought were wrong (Till here
everything is smooth)
4. Copy/Paste the Installed erp5_trade BT or download the same erp5_tarde BT
from the same URL as above, and check the Subversion tab (This results in
the error below)

Site Error

An error was encountered while publishing this resource.
Error Type: IOError
Error Value: [Errno 2] No such file or directory:
'/var/lib/zope/Constraint/DuplicateInventory.py'

As it is evident, it seems the latest erp5_trade bt has broken a few things
as DuplicateInventory.py was removed. Even by manual addition, to advance
forward, I landed up with several portal_workflow_chains missing.

Have I done anything wrong or is the latest erp5_trade a bit broken(ulikely
as I see that the Unit tests a going through fine)?

Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070620/6c315dd3/attachment.htm>
Aurélien Calonne
2007-06-21 11:27:06 UTC
Permalink
Post by Shresth K
Site Error
An error was encountered while publishing this resource.
Error Type: IOError
'/var/lib/zope/Constraint/Dupl icateInventory.py'
As it is evident, it seems the latest erp5_trade bt has broken a few
things as DuplicateInventory.py was removed. Even by manual addition, to
advance forward, I landed up with several portal_workflow_chains missing.
Have I done anything wrong or is the latest erp5_trade a bit
broken(ulikely as I see that the Unit tests a going through fine)?
For me, this look more like a typo error in your business template
definition. Go to the "Details" tab and check that you have
DuplicateInventory.py in Constraint field and not Dupl icateInventory.py


--
Aur?lien
Shresth K
2007-06-21 12:59:17 UTC
Permalink
Post by Shresth K
Post by Shresth K
Site Error
An error was encountered while publishing this resource.
Error Type: IOError
'/var/lib/zope/Constraint/Dupl icateInventory.py'
As it is evident, it seems the latest erp5_trade bt has broken a few
things as DuplicateInventory.py was removed. Even by manual addition, to
advance forward, I landed up with several portal_workflow_chains
missing.
Post by Shresth K
Have I done anything wrong or is the latest erp5_trade a bit
broken(ulikely as I see that the Unit tests a going through fine)?
For me, this look more like a typo error in your business template
definition. Go to the "Details" tab and check that you have
DuplicateInventory.py in Constraint field and not Dupl icateInventory.py
No, it wasn't the typo. May be the mistake was introduced while I wrote the
mail.
I have had a very hard time trying to upgrade from r14629 to the latest.
r14733
While upgrading and clicking on subversion, I faced some of these problems:
1. As explained above Constraint/DuplicateInventory.py was missing. So I
added it manually.
2. Then all Allowed Content Types, Hidden Content Types and PropertySheets
for all the trade related portal types were missing.
I proceeded manually by correcting each of those with the hope that I could
catch the 'ghost' but couldn't proceed further when it said that
'PropertySheet DuplicateInventory missing for portal type Inventory' as no
such PropertySheet exists as per my findings.

Hence, my plan to upgrade the BT failed miserably, so I tried the crude way
again:

1. I un-installed erp5_trade.
2. Did an 'svn up' for the latest erp5_trade, downloaded it into
portal_templates via URL and then installed it.
3. Now by clicking on Subversion I should not be getting any modified files
since it is the latest working copy that is installed. Yet there are many
files that are listed there.
Now can anyone explain this or should I have updated other BTs as well?

I am now going to make the changes to the BaseTrade*_FieldLibrary and try to
generate the patches.

Thanks,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070621/b773f5e2/attachment.htm>
Shresth K
2007-06-21 13:13:20 UTC
Permalink
the mail.
I have had a very hard time trying to upgrade from r14629 to the latest.
r14733
1. As explained above Constraint/DuplicateInventory.py was missing. So I
added it manually.
2. Then all Allowed Content Types, Hidden Content Types and PropertySheets
for all the trade related portal types were missing.
I proceeded manually by correcting each of those with the hope that I
could catch the 'ghost' but couldn't proceed further when it said that
'PropertySheet DuplicateInventory missing for portal type Inventory' as no
such PropertySheet exists as per my findings.
Hence, my plan to upgrade the BT failed miserably, so I tried the crude
1. I un-installed erp5_trade.
2. Did an 'svn up' for the latest erp5_trade, downloaded it into
portal_templates via URL and then installed it.
3. Now by clicking on Subversion I should not be getting any modified
files since it is the latest working copy that is installed. Yet there are
many files that are listed there.
Now can anyone explain this or should I have updated other BTs as well?
Just to help you help me - Most of the svn diff(s) return something like
this:

$ svn diff
SkinTemplateItem/portal_skins/erp5_trade/TradeCondition_getDueDate.xml
Index:
SkinTemplateItem/portal_skins/erp5_trade/TradeCondition_getDueDate.xml
===================================================================
---
SkinTemplateItem/portal_skins/erp5_trade/TradeCondition_getDueDate.xml
(revision 14909)
+++
SkinTemplateItem/portal_skins/erp5_trade/TradeCondition_getDueDate.xml
(working copy)
@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <global name="PythonScript" module="
Products.PythonScripts.PythonScript"/>
- <tuple/>
+ <tuple>
+ <string>Products.PythonScripts.PythonScript</string>
+ <string>PythonScript</string>
+ </tuple>
+ <none/>
</tuple>
</pickle>
<pickle>
@@ -167,7 +170,6 @@
<string>context</string>
<string>case</string>
<string>due_date</string>
- <string>_inplacevar_</string>
<string>peom</string>
<string>pt</string>
<string>pat</string>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070621/23071f38/attachment.htm>
Aurélien Calonne
2007-06-21 13:38:24 UTC
Permalink
On 21/06/07, *Shresth K* <shresth.k at gmail.com
No, it wasn't the typo. May be the mistake was introduced while I
wrote the mail.
I have had a very hard time trying to upgrade from r14629 to the
latest. r14733
1. As explained above Constraint/DuplicateInventory.py was missing.
So I added it manually.
2. Then all Allowed Content Types, Hidden Content Types and
PropertySheets for all the trade related portal types were missing.
I proceeded manually by correcting each of those with the hope that
I could catch the 'ghost' but couldn't proceed further when it said
that 'PropertySheet DuplicateInventory missing for portal type
Inventory' as no such PropertySheet exists as per my findings.
Hence, my plan to upgrade the BT failed miserably, so I tried the
1. I un-installed erp5_trade.
2. Did an 'svn up' for the latest erp5_trade, downloaded it into
portal_templates via URL and then installed it.
3. Now by clicking on Subversion I should not be getting any
modified files since it is the latest working copy that is
installed. Yet there are many files that are listed there.
Now can anyone explain this or should I have updated other BTs as well?
This is usual, because same business template built from different do
not result in the stricly the same xml code. And this does'nt matter.
Differences can be due to python version or zope version, and also the
Zope Products you have installed.

So you should not take care of these differences.

--
Aur?lien
Shresth K
2007-06-22 16:33:21 UTC
Permalink
Post by Aurélien Calonne
On 21/06/07, *Shresth K* <shresth.k at gmail.com
No, it wasn't the typo. May be the mistake was introduced while I
wrote the mail.
I have had a very hard time trying to upgrade from r14629 to the
latest. r14733
1. As explained above Constraint/DuplicateInventory.py was missing.
So I added it manually.
2. Then all Allowed Content Types, Hidden Content Types and
PropertySheets for all the trade related portal types were missing.
I proceeded manually by correcting each of those with the hope that
I could catch the 'ghost' but couldn't proceed further when it said
that 'PropertySheet DuplicateInventory missing for portal type
Inventory' as no such PropertySheet exists as per my findings.
Hence, my plan to upgrade the BT failed miserably, so I tried the
1. I un-installed erp5_trade.
2. Did an 'svn up' for the latest erp5_trade, downloaded it into
portal_templates via URL and then installed it.
3. Now by clicking on Subversion I should not be getting any
modified files since it is the latest working copy that is
installed. Yet there are many files that are listed there.
Now can anyone explain this or should I have updated other BTs as
well?
This is usual, because same business template built from different do
not result in the stricly the same xml code. And this does'nt matter.
Differences can be due to python version or zope version, and also the
Zope Products you have installed.
So you should not take care of these differences.
Thanks for clarifying.
I still have a lot of reason to bother as I tried the upgrade path several
times and each time it resulted in an unstable system.
If anyone has some spare time kindly confirm or erase my fears with respect
to the upgrade by doing one yourself.

If you need any further information to help reproduce the same scenario, all
possible information shall be provided from my side.

Thanks,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070622/7865814e/attachment.htm>
Shresth K
2007-06-26 18:04:09 UTC
Permalink
Herein are attached the patches applicable for
BaseTradePurchase_FieldLibrary/

Hope it is correct and useful. Once confirmed, I may be able to proceed with
further such patches.

Regards,
Shresth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070626/148b209b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BaseTradePurchase_FieldLibrary.tar.gz
Type: application/x-gzip
Size: 815 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070626/148b209b/attachment.bin>
Loading...