O2M: D&D should not call write if the model is not saved.

Bug #756343 reported by Bruno Guibert
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
OpenERP sa GTK client R&D

Bug Description

 for example in the product supplier view.
I add a new line of supplier and when i try to reorder lines with drag and drop without saving the new lines, I obtain this message.

ERROR:db.cursor:bad query: insert into "product_supplierinfo" (id,"name","product_uom","sequence","company_id","qty","delay","min_qty","product_code","product_name",create_uid,create_date) values (34,2,1,1,1,0.0,1,0.0,NULL,NULL,1,now())
Traceback (most recent call last):
  File "/media/StorageForDev/workspace/oerp_602/server/bin/sql_db.py", line 131, in execute
    res = self._obj.execute(query, params)
IntegrityError: ERREUR: une valeur NULL viole la contrainte NOT NULL de la colonne « product_id »

This error is only in the GTK client.

I observe this bug on ubuntu 10.04 and on debian squeeze, in all V6.0 until this message.

Bruno Guibert
Héonium.

Related branches

summary: - error in o2m fields when use dragndrop
+ O2M: D&D should not call write if the model is not saved.
Changed in openobject-client:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
status: Confirmed → In Progress
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Bruno Guibert,

Thanks for the report ! It has been improved @ lp:~openerp-dev/openobject-client/trunk-bug-756343-nch with revision-info as 1867 <email address hidden> and will be merged soon to the trunk client.

Thanks !

Changed in openobject-client:
status: In Progress → Fix Committed
Changed in openobject-client:
status: Fix Committed → Fix Released
Revision history for this message
Benjamin ujvari-Cseh (busceh) wrote :

Hello,

It seems windows builds for gtk client doesn't contain this fix.
Can you do something for this ?

Regards

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

Hi,

Fix backported on v6.0 branch with revision-id: <email address hidden>

Should be available on next nightly build.

Regards

Revision history for this message
Benjamin ujvari-Cseh (busceh) wrote :

Thanks, works fine !

Regards,
Benjamin

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.