statusbar widget does not trigger on_change function

Bug #1175960 reported by PabloCM on 2013-05-03
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Committed
Wishlist
OpenERP Publisher's Warranty Team

Bug Description

OpenERP 7.0 nightly build: 20130417-232500

Description:
If you have a clickable statusbar widget, changing the stage does not trigger the on_change function.
I have found this problem trying to use the new unified state/stage feature introduced with OE7.0 myself, but you can see how it is already happening in the CRM module. Leads have a clickable statusbar with an on_change function defined in crm/crm_lead_view.xml:102 but that function is only called manually from the python code in the server side when the user clicks the "Cancel case" button (which calls case_cancel->case_set->stage_set->onchange_function).

Steps to reproduce:
1- Create an empty database
2- Install CRM app
3- Run the server in a debugging environment and set a breakpoint inside the onchange_stage_id function (crm/crm_lead.py:332)
4- Create a lead (you will reach the breakpoint when creating it, that's fine, just continue)
5- Click on any stage on the statusbar. You will see how the on_change function isn't called.
6- Save the lead if you hadn't yet and click on the "Cancel case" button. You will see how the function is called server side (check stack)

Whenever you click on the satusbar, the record is beign saved with a different stage_id, so it is changing and the on_change function should have been called.

Related branches

Changed in openerp-web:
status: New → Confirmed
Amit Parik (amit-parik) on 2013-06-13
Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Low
Houssine (houssine-bakkali) wrote :

Hi,

This also happen with the kanban view.

Changed in openerp-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openerp-web:
status: Confirmed → Fix Committed

Hello,

Sorry but this is not a bug.
We want the statusbar to act as button and not as a field. A simple reason is the ability to click on it in readonly mode (should not be possible to click as we need a discard button). For objects such as task or tickets, we do not want to do "edit-change status-save", we want to do the action in one click (as you drop from one stage to the other in kanban view).
The patch is not wrong itself (even if it does not seem to take care of edit mode, it should) but I will reject it as we do not want to merge this in standard version.

Regards

Changed in openerp-web:
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers