[6.0] invalid date_stop in calendar view

Bug #768962 reported by Thibaut DIRLIK (Logica)
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Incomplete
Medium
OpenERP sa GTK client R&D
Odoo Web Client
Won't Fix
Undecided
Unassigned

Bug Description

In a calendar view, defined like this :

<record model="ir.ui.view" id="rent_order_rtz_calendar_view">
            <field name="name">rent.order.rtz.calendar</field>
            <field name="model">rent.order</field>
            <field name="type">calendar</field>
            <field name="priority" eval="14"/>
            <field name="arch" type="xml">
                <calendar string="Rent Orders" color="partner_id" date_start="date_out_shipping" date_stop="date_in_shipping">
                    <field name="partner_id"/>
                    <field name="description"/>
                </calendar>
            </field>
</record>

With, date_in_shipping = 22/04/11 00:00:00, the end date shown into the calendar is the 21/01/11. Setting the time to 1 minute, make the calendar show the end date correctly.

Seems that 22/04/11 00:00:00 is considered to be 21/04/11 !

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

Same result in GTK or Web client, with date_in_shipping being a fields.datetime. Note that the date_start is handled properly.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Thibaut,

Did you using any customization module because I did not find any module where this type of object or view is defined.

Thanks.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

I used this in a custoim module indeed, but this doesn't means it's not a bug. Moreover, date_stop is documentated here :

http://doc.openerp.com/v6.0/developer/2_6_views_events/views/calendar_view.html

Just define a simple model with 2 datestime dields (begin, end) and test it.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Thibaut,

I have tried the similar thing with invoice calender view but did not face any problem.
<?xml version="1.0"?>
<calendar string="Invoices" color="journal_id" date_start="date_invoice" date_stop="date_due">
                    <field name="partner_id"/>
                    <field name="amount_total"/>
                </calendar>

For your reference I am attaching a my end screen shot:

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

Did you use datetime fields with tim = 00:00:00 ?

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello,

I am confirming this issue for datetime field.

Thanks for reporting.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

assigning proper project becuase the issue tends to arise from both the clients (GTK & WEB).

affects: openobject-server → openobject-client
Changed in openobject-client:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP sa GTK client R&D (openerp-dev-gtk)
Changed in openobject-client-web:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
Revision history for this message
Ravi Gadhia (OpenERP) (rga-openerp) wrote :

Hello, Thibaut DIRLIK

       I create one event with start date: 09/05/2011 00:00:00 and end date: 10/05/2011 00:00:00 so it's one day event and it should only display on date 09/05/2011 in calender view (not on both date 09/05/2011 and 10/05/2011).
       if end date (deadline) have a time set to 00:00:00, this means the event should really end on the day before

correct me if i misunderstand something.

Changed in openobject-client:
status: Confirmed → Incomplete
Changed in openobject-client-web:
status: Confirmed → Incomplete
Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

From my point of view, 9/05 and 10/05 are two days. To obtain the result you are saying, the end should be 09/05/11 23:59:59. I encoutered this bug working on a renting module. I used datetime fields, but a customer wanted to handle only dates.

So I used date widgets to show datetime field. And when he sets the start the 09/05/11 and end the 10/05/11, he expects the rent to be of 2 days. Moreover, settings 09/05/11 00:00:01 will switch the calendar to a 2-day event !

So, from what you are saying, an event like this :

09/05/11 00:00:00 to 10/05/11 00:00:00 is one day on the calendar view, but
09/05/11 00:00:00 to 10/05/11 00:00:01 is two days.

I hope you understand my point of view ;-)

Thanks for working on this.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

yes, If you consider the real time scenario then in the above example given by Ravi its valid.

09/05/11 00:00:00 to 10/05/11 00:00:00 this means that the event started at midnight after 24:00:00(of 8/5) and ended at the next 24:00:00(9/5).

09/05/11 00:00:00 to 10/05/11 00:00:01 is two days. yes, because the event started at midnight after 24:00:00(of 8/5) and ended at the next starting of 00:00:01(10/5).

The case you use only date widget is then the client will replace by default the time part to 00:00:00 but this can be surely improved. + 1 for this.

Thanks !

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

This bug is being closed as Won't Fix in the OpenERP Web Client project, as it is not going to be developed further after the 6.0 series. It will be replaced in 6.1 by a newer and better web frontend known as the OpenERP Web project[1], so further R&D efforts on the 6.0 project would be wasted.
Bugs affecting customers in production of course continue to be handled via the OpenERP Enterprise (OPW) maintenance service.
You can find more details about this in the Bug Management FAQ[2].

Changed in openobject-client-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → nobody
importance: Medium → Undecided
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.