Discussion:
[Erp5-dev] ERP5 - start date error
pavel lstiburek
2012-10-11 09:05:10 UTC
Permalink
Hi,
i keep running into problems with start_date and stop_date.
Usualy it says me *Could not map those columns: set(['stop_date'])*
I coudnt search by it, but searching with creation_date is no problem.
Can someone tell how to fix this error, or where can i look for script that
defines start_date or stop_date?
--
Pavel Lstiburek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20121011/fd5ebbbc/attachment.htm>
Yusei TAHARA
2012-10-11 09:13:37 UTC
Permalink
Hi,

There are two sets of date time columns in catalog. One is
delivery.start_date and delivery.stop_date. The other one is
movement.start_date and movement.stop_date.

If you search movement type document like sale order line, sale
packing list line, you need to use "movement.start_date". And
if you search delivery type doucment like sale order, sale
packing list, then you need "delivery.start_date".

And then you also need to add listbox_delivery_start_date datetime
field to listbox to control datetime formating for example.

You can find many example implementations. One good example is
portal_skins/erp5_trade/SaleOrderModule_viewSaleOrderList in
erp5_trade business template.

Regards,
Yusei

On Thu, 11 Oct 2012 11:05:10 +0200
Post by pavel lstiburek
Hi,
i keep running into problems with start_date and stop_date.
Usualy it says me *Could not map those columns: set(['stop_date'])*
I coudnt search by it, but searching with creation_date is no problem.
Can someone tell how to fix this error, or where can i look for script that
defines start_date or stop_date?
--
Pavel Lstiburek
--
Yusei TAHARA <yusei at nexedi.com>
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
pavel lstiburek
2012-10-11 09:33:04 UTC
Permalink
Thanks, this will do most of times.
But what if i for example need to find all person older than 20. If try to
find it by date i get error.
Person is not movement or delivery. How to deal with such case?

Pavel Lstiburek

2012/10/11 Yusei TAHARA <yusei at nexedi.com>
Post by Yusei TAHARA
Hi,
There are two sets of date time columns in catalog. One is
delivery.start_date and delivery.stop_date. The other one is
movement.start_date and movement.stop_date.
If you search movement type document like sale order line, sale
packing list line, you need to use "movement.start_date". And
if you search delivery type doucment like sale order, sale
packing list, then you need "delivery.start_date".
And then you also need to add listbox_delivery_start_date datetime
field to listbox to control datetime formating for example.
You can find many example implementations. One good example is
portal_skins/erp5_trade/SaleOrderModule_viewSaleOrderList in
erp5_trade business template.
Regards,
Yusei
On Thu, 11 Oct 2012 11:05:10 +0200
Post by pavel lstiburek
Hi,
i keep running into problems with start_date and stop_date.
Usualy it says me *Could not map those columns: set(['stop_date'])*
I coudnt search by it, but searching with creation_date is no problem.
Can someone tell how to fix this error, or where can i look for script
that
Post by pavel lstiburek
defines start_date or stop_date?
--
Pavel Lstiburek
--
Yusei TAHARA <yusei at nexedi.com>
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
https://mail.tiolive.com/mailman/listinfo/erp5-dev
--
Pavel Lstiburek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20121011/833ecc86/attachment.htm>
Yusei TAHARA
2012-10-11 09:52:49 UTC
Permalink
Hi,

In such case, you first need to add a custom mysql table and
corresponding zsqlmethods to portal_catalog. Because portal_catalog
does not cover all properties of document. Only some specific
properties are searchable.

About person document, it has start_date, but it is not a
delivery/movement. Thus person's start_date is not indexed and it is
not searchable by default.

erp5_ingestion_mysql_innodb_catalog is a good example to know how
to extend catalog.

Regards,
Yusei


On Thu, 11 Oct 2012 11:33:04 +0200
Post by pavel lstiburek
Thanks, this will do most of times.
But what if i for example need to find all person older than 20. If try to
find it by date i get error.
Person is not movement or delivery. How to deal with such case?
Pavel Lstiburek
2012/10/11 Yusei TAHARA <yusei at nexedi.com>
Post by Yusei TAHARA
Hi,
There are two sets of date time columns in catalog. One is
delivery.start_date and delivery.stop_date. The other one is
movement.start_date and movement.stop_date.
If you search movement type document like sale order line, sale
packing list line, you need to use "movement.start_date". And
if you search delivery type doucment like sale order, sale
packing list, then you need "delivery.start_date".
And then you also need to add listbox_delivery_start_date datetime
field to listbox to control datetime formating for example.
You can find many example implementations. One good example is
portal_skins/erp5_trade/SaleOrderModule_viewSaleOrderList in
erp5_trade business template.
Regards,
Yusei
On Thu, 11 Oct 2012 11:05:10 +0200
Post by pavel lstiburek
Hi,
i keep running into problems with start_date and stop_date.
Usualy it says me *Could not map those columns: set(['stop_date'])*
I coudnt search by it, but searching with creation_date is no problem.
Can someone tell how to fix this error, or where can i look for script
that
Post by pavel lstiburek
defines start_date or stop_date?
--
Pavel Lstiburek
--
Yusei TAHARA <yusei at nexedi.com>
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
https://mail.tiolive.com/mailman/listinfo/erp5-dev
--
Pavel Lstiburek
--
Yusei TAHARA <yusei at nexedi.com>
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
pavel lstiburek
2012-10-11 09:57:29 UTC
Permalink
Thanks again for help.

2012/10/11 Yusei TAHARA <yusei at nexedi.com>
Post by Yusei TAHARA
Hi,
In such case, you first need to add a custom mysql table and
corresponding zsqlmethods to portal_catalog. Because portal_catalog
does not cover all properties of document. Only some specific
properties are searchable.
About person document, it has start_date, but it is not a
delivery/movement. Thus person's start_date is not indexed and it is
not searchable by default.
erp5_ingestion_mysql_innodb_catalog is a good example to know how
to extend catalog.
Regards,
Yusei
On Thu, 11 Oct 2012 11:33:04 +0200
Post by pavel lstiburek
Thanks, this will do most of times.
But what if i for example need to find all person older than 20. If try
to
Post by pavel lstiburek
find it by date i get error.
Person is not movement or delivery. How to deal with such case?
Pavel Lstiburek
2012/10/11 Yusei TAHARA <yusei at nexedi.com>
Post by Yusei TAHARA
Hi,
There are two sets of date time columns in catalog. One is
delivery.start_date and delivery.stop_date. The other one is
movement.start_date and movement.stop_date.
If you search movement type document like sale order line, sale
packing list line, you need to use "movement.start_date". And
if you search delivery type doucment like sale order, sale
packing list, then you need "delivery.start_date".
And then you also need to add listbox_delivery_start_date datetime
field to listbox to control datetime formating for example.
You can find many example implementations. One good example is
portal_skins/erp5_trade/SaleOrderModule_viewSaleOrderList in
erp5_trade business template.
Regards,
Yusei
On Thu, 11 Oct 2012 11:05:10 +0200
Post by pavel lstiburek
Hi,
i keep running into problems with start_date and stop_date.
Usualy it says me *Could not map those columns: set(['stop_date'])*
I coudnt search by it, but searching with creation_date is no
problem.
Post by pavel lstiburek
Post by Yusei TAHARA
Post by pavel lstiburek
Can someone tell how to fix this error, or where can i look for
script
Post by pavel lstiburek
Post by Yusei TAHARA
that
Post by pavel lstiburek
defines start_date or stop_date?
--
Pavel Lstiburek
--
Yusei TAHARA <yusei at nexedi.com>
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
https://mail.tiolive.com/mailman/listinfo/erp5-dev
--
Pavel Lstiburek
--
Yusei TAHARA <yusei at nexedi.com>
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
https://mail.tiolive.com/mailman/listinfo/erp5-dev
--
Pavel Lstiburek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20121011/d24f660e/attachment.htm>
Loading...