[6.0/Trunk] base_action_rule - action scheduler doesn't accept some date fields

Bug #907723 reported by Yannick Vaucher @ Camptocamp
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 1

Bug Description

Hello,

module base_action_rule won't work on some object.

For example, many objects have a deadline date instead of a deadline datetime :

└─> egrep -rni "'date_deadline':.*fields" ./addons --include=*.py
./addons/crm_helpdesk/report/crm_helpdesk_report.py:56: 'date_deadline': fields.date('Deadline', select=True),
./addons/crm_helpdesk/crm_helpdesk.py:51: 'date_deadline': fields.date('Deadline'),
./addons/crm/crm_opportunity.py:50: 'date_deadline': fields.date('Expected Closing'),
./addons/crm/crm_meeting.py:69: 'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}),
./addons/crm_fundraising/crm_fundraising.py:41: 'date_deadline': fields.date('Deadline'),
./addons/event/event.py:318: 'date_deadline': fields.related('event_id','date_end', type='datetime', string="End Date", readonly=True),
./addons/document_ics/document_ics.py:331: 'date_deadline': fields.datetime('Deadline', help="Deadline Date is automatically\
./addons/base_calendar/base_calendar.py:1108: 'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}),
./addons/base_calendar/wizard/calendar_event_edit_all.py:88: 'date_deadline': fields.datetime('End Date', required=True),
./addons/hr_timesheet_invoice/report/report_analytic.py:38: 'date_deadline': fields.date('Deadline', readonly=True),
./addons/crm_claim/report/crm_claim_report.py:75: 'date_deadline': fields.date('Deadline', readonly=True, select=True),
./addons/crm_claim/crm_claim.py:51: 'date_deadline': fields.date('Deadline'),
./addons/project/report/project_report.py:37: 'date_deadline': fields.date('Deadline', readonly=True),
./addons/project/project.py:406: 'date_deadline': fields.date('Deadline',select=True),
./addons/survey/survey.py:714: 'date_deadline': fields.date("Deadline date"),
./addons/project_issue/project_issue.py:174: 'date_deadline': fields.date('Deadline'),

So trying to trigger on the deadline of a crm_opportunity, a crm_helpdesk, crm_claim, project or a survey will fail.

Attached is a patch to allow the use of those dates.

Regards,
Yannick

Tags: maintenance

Related branches

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Previous patch wasn't correct.

Here is the correct one.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :
Amit Parik (amit-parik)
summary: - [6.0] base_action_rule - action scheduler doesn't accept some date
+ [6.0/Trunk] base_action_rule - action scheduler doesn't accept some date
fields
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Nimesh Contractor(Open ERP) (nco-openerp) wrote :

Hello Yannick Vaucher,
                                    I have applied your patch , its works perfectly to resolve this problem.
                                   Thanks for the Good work !
                                   we have applied your patch to the trunk-bug-907723-nco
                                   revision : 6167
                                   revision ID : <email address hidden> authored to you.
                                   It will be merged soon in trunk

Thanks !
 NCO

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Hello,
Thanks for the commit in trunk

Please fix this in the 6.0 as well

Regards,
Yannick

tags: added: maintenance
Revision history for this message
Niels Huylebroeck (red15) wrote :

Can we get an ETA of arrival of this patch in 6.0 ?

Revision history for this message
Xavier ALT (dex-phx) wrote :

Hello Niels,

Patch as just landed on addons v6.0 stable branch with revision: <email address hidden>

Regards,
Xavier

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.