changed values are not saved in o2m widgets GRAVE

Bug #509516 reported by Ferdinand
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KDE OpenObject Client
Fix Released
Undecided
Unassigned

Bug Description

although the form says - document saved - the changed values are not written

IMHO must have been introduced since Dec 17th as it didn't work last weak already

Revision history for this message
Ferdinand (office-chricar) wrote :

but it does not say modified after changing a field

Revision history for this message
Ferdinand (office-chricar) wrote :

sorry to say - koo is currently not usable (without loosing work)

Revision history for this message
Ferdinand (office-chricar) wrote :

adding records in m2o widget inside o2m adds data though

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Ferdinand, I also found this problem: After the dec 17th-18th changes sometimes the forms do not save the documents though Koo shows "document saved". If I press F5 after saving, the form is unchanged (the changes are lost).

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 509516] Re: changed values are not saved in o2m widgets GRAVE

A Dimecres, 20 de gener de 2010, Borja López Soilán (Pexego) va escriure:
> Ferdinand, I also found this problem: After the dec 17th-18th changes
> sometimes the forms do not save the documents though Koo shows "document
> saved". If I press F5 after saving, the form is unchanged (the changes
> are lost).
>

If you could find a reproducible test case that would be perfect.

--
Albert Cervera i Areny
http://www.NaN-tic.com
Mòbil: +34 669 40 40 18

Revision history for this message
Ferdinand (office-chricar) wrote :

Probably the TAB key

editable = "top"

click a field (date, text)
edit
* hit tab - does not trigger "Doc changed"
* use mouse instead - works

but this is not true for all forms (not many editable exists in standard OpenERP), but in one of mine it is reproducible.

Hope that helps

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :

A Dijous, 21 de gener de 2010, Ferdinand @ ChriCar va escriure:
> Probably the TAB key
>
> editable = "top"
>
> click a field (date, text)
> edit
> * hit tab - does not trigger "Doc changed"
> * use mouse instead - works
>
> but this is not true for all forms (not many editable exists in standard
> OpenERP), but in one of mine it is reproducible.

I fill working hours every day and it works for me ;-) so please,
can you take a look and see if there are any messages in the console?

Borja, have you seen it in any standard editable list?

>
> Hope that helps
>

--
Albert Cervera i Areny
http://www.NaN-tic.com
Mòbil: +34 669 40 40 18

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :
Download full text (3.5 KiB)

Sorry Albert, but I cant tell you a specific view where this does happens. I just happen to seen this 'not saving' on several screens yesterday.

What I can tell you is that I'm getting this kind of tracebacks on the Koo console since the optimizations:

------------------------------------
QTextCursor::setPosition: Position '7162' out of range
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/Dialogs/FormWidget.py", line 435, in updateStatus
    if self.model and self.screen.currentRecord() and self.screen.currentRecord().id:
  File "/usr/local/lib/python2.6/dist-packages/Koo/Screen/Screen.py", line 321, in currentRecord
    return self.group.modelByIndex( self._currentRecordPosition )
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line 546, in modelByIndex
    record = self.recordByIndex( row )
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line 589, in recordByIndex
    record = self.records[row]
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/Dialogs/FormWidget.py", line 435, in updateStatus
    if self.model and self.screen.currentRecord() and self.screen.currentRecord().id:
  File "/usr/local/lib/python2.6/dist-packages/Koo/Screen/Screen.py", line 321, in currentRecord
    return self.group.modelByIndex( self._currentRecordPosition )
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line 546, in modelByIndex
    record = self.recordByIndex( row )
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line 589, in recordByIndex
    record = self.records[row]
IndexError: list index out of range

---

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/Dialogs/FormWidget.py", line 434, in updateStatus
    if self.model and self.screen.currentRecord() and self.screen.currentRecord().id:
  File "/usr/local/lib/python2.6/dist-packages/Koo/Screen/Screen.py", line 351, in currentRecord
    return self.group.modelByIndex( self._currentRecordPosition )
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line 544, in modelByIndex
    record = self.recordByIndex( row )
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line 586, in recordByIndex
    record = self.records[row]
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/View/Tree/TreeView.py", line 261, in currentChanged
    if self.currentIndex == current:
RuntimeError: underlying C/C++ object has been deleted
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/Model/KooModel.py", line 506, in parent
    parent = group.parent.group
AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/View/Tree/TreeView.py", line 261, in currentChanged
    if self.currentIndex == current:
RuntimeError: underlying C/C++ object has been deleted
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Koo/View/Tree/TreeView.py", line 261, in current...

Read more...

Revision history for this message
Ferdinand (office-chricar) wrote :

i know timesheet works

forgot to say the o2m is located on a page inside a notebook

    <record model="ir.ui.view" id="chricar_top_tenant_form1">
      <field name="name">chricar.top.form1</field>
      <field name="model">chricar.top</field>
      <field name="inherit_id" ref="chricar_top.chricar_top_form"/>
      <field name="arch" type="xml">
        <notebook colspan="4" position="inside">
          <page string="Tenants">
            <field name="tenant_ids" widget="one2many_list" colspan="4" nolabel="1">
              <tree string="Tenant" editable="top">
                <field name="partner_id" />
...snip

Revision history for this message
Ferdinand (office-chricar) wrote :

the form has some pages

Example 1
* (A) change a field above the notebook or a text field on a page but not in o2m -> "Document modified"
* (B) change a field in the o2m on page in notebook
> save only (A) is saved

Example 2
* (A) change a field above the notebook or a text field not in o2m -> "Document modified"
> save (works as usual)
* (B) change a field in the o2m on page in notebook -> "Document modified"
> save (B) is correctly saved

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :
Download full text (4.0 KiB)

Yes, I'm getting those too, but that's due to latest performance improvements
that brought some regressions. I need to find the time to fix them. However,
the problem you're talking about here was there before those changes, if I
understood correctly.

A Dijous, 21 de gener de 2010, Borja López Soilán (Pexego) va escriure:
> Sorry Albert, but I cant tell you a specific view where this does
> happens. I just happen to seen this 'not saving' on several screens
> yesterday.
>
> What I can tell you is that I'm getting this kind of tracebacks on the
> Koo console since the optimizations:
>
> ------------------------------------
> QTextCursor::setPosition: Position '7162' out of range
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/Koo/Dialogs/FormWidget.py",
> line 435, in updateStatus if self.model and self.screen.currentRecord()
> and self.screen.currentRecord().id: File
> "/usr/local/lib/python2.6/dist-packages/Koo/Screen/Screen.py", line 321,
> in currentRecord return self.group.modelByIndex(
> self._currentRecordPosition )
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line
> 546, in modelByIndex record = self.recordByIndex( row )
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line
> 589, in recordByIndex record = self.records[row]
> IndexError: list index out of range
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/Koo/Dialogs/FormWidget.py",
> line 435, in updateStatus if self.model and self.screen.currentRecord()
> and self.screen.currentRecord().id: File
> "/usr/local/lib/python2.6/dist-packages/Koo/Screen/Screen.py", line 321,
> in currentRecord return self.group.modelByIndex(
> self._currentRecordPosition )
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line
> 546, in modelByIndex record = self.recordByIndex( row )
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line
> 589, in recordByIndex record = self.records[row]
> IndexError: list index out of range
>
> ---
>
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/Koo/Dialogs/FormWidget.py",
> line 434, in updateStatus if self.model and self.screen.currentRecord()
> and self.screen.currentRecord().id: File
> "/usr/local/lib/python2.6/dist-packages/Koo/Screen/Screen.py", line 351,
> in currentRecord return self.group.modelByIndex(
> self._currentRecordPosition )
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line
> 544, in modelByIndex record = self.recordByIndex( row )
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/Group.py", line
> 586, in recordByIndex record = self.records[row]
> IndexError: list index out of range
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/Koo/View/Tree/TreeView.py",
> line 261, in currentChanged if self.currentIndex == current:
> RuntimeError: underlying C/C++ object has been deleted
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/Koo/Model/KooModel.py", line
> 506, in parent parent = group.parent.group
> AttributeError: 'N...

Read more...

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Albert, I didn't noticed any of these problems before the performance improvements.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :

Fixed in r1314. That was a bug in PyQt since 4.7. Fortunately easy to workarround.

Changed in openobject-client-kde:
status: New → Fix Released
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.