c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #12667
[Bug 694898] Re: [trunk] deleting line in editable tree view does not call on_change
Hi Sorry, forgot about this one.
it was in gtk, and using rev 1763 (due to a different regression in rev
1764) it still exists. It is the onchange function that is applied to
the widget that does not seem to be called when a line within the widget
is deleted. I will try and rewrite the line onchange function so it
changes the parent directly from the line.
--
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