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

Bug #756343 reported by Bruno Guibert on 2011-04-10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
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

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
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
Benjamin ujvari-Cseh (busceh) wrote :


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


Xavier ALT (dex-phx) wrote :


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

Should be available on next nightly build.


Benjamin ujvari-Cseh (busceh) wrote :

Thanks, works fine !


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers