← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 694898] Re: [trunk] deleting line in editable tree view does not call on_change

 

On second thought, perhaps this was on GTK client, as the delete button in o2m could be red in some GTK themes.
In any case, I tested it in GTK and it seems to work, while in Web the behavior is a bit different: the change is not cached and takes effect immediately, and the form is refreshed, so any function fields should be refeshed.

Feel free to re-open this bug with more info if it is not fixed for you
after updating to the latest code.

** Project changed: openobject-client-web => openobject-client

** Changed in: openobject-client
   Importance: Low => Undecided

** Changed in: openobject-client
       Status: Confirmed => Invalid

** Changed in: openobject-client
    Milestone: 6.0-rc2 => None

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/694898

Title:
  [trunk] deleting line in editable tree view does not call on_change

Status in OpenObject GTK Client:
  Invalid

Bug description:
  I have an on_change function in a view, all it does is when a line
  changes in an editable tree view, it adds up the quantities and places
  that value into a field on the form.  So a list (tree) of quantities
  times lengths = total (form field).  The same behaviour is exhibited
  when tree view is not editable.

  Using add, and edit everything behaves as expected.
  However on_change is not called if I use the red delete button which I would expect.  The line has changed afterall.
  I manually inserted a bool field in to the form to test behaviour to call on_change and after using the one2many widget delete button and calling on_change manually everything updates as expected.

  If I exit the modal form, save the document, then go back in,
  everything works.

  The on_change function is embedded in the widget declaration in the
  form view.  The qty updated is product_uom_qty in sale.order.line.

  									<field colspan="3" mode="tree,form" name="cut_line"	nolabel="1" attrs="{'invisible':[('ctl_ok','=',0)]}" widget="one2many_list" on_change="onchange_cutlist(cut_line, manual_ok)">
  										<form string="Cut List">
  											<field name="qty" on_change="onchange_cut(qty,length)"/>
  											<field name="length" on_change="onchange_cut(qty,length)"/>
  											<field name="qty_subtotal"/>
  											<field name="name" />
  										</form>
  										<tree string="Cut List">
  											<field name="qty" on_change="onchange_cut(qty,length)"/>
  											<field name="length" on_change="onchange_cut(qty,length)"/>
  											<field name="qty_subtotal" />
  											<field name="name" />
  											<field name="sequence" invisible="True"/>
  										</tree>
  									</field>

  Using trunk - all todays revisions - but it has been like this for
  some time possibly forever.





References