[6.1] Try to create a new state on Leads have trackback

Bug #1038176 reported by Mantavya Gajjar (Open ERP)
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Status tracked in Trunk
6.1
Fix Committed
Medium
OpenERP Publisher's Warranty Team
Trunk
Invalid
Medium
OpenERP Publisher's Warranty Team

Bug Description

Try to create a state on leads have trackback on the console

2012-08-17 17:17:47,242 2228 ERROR None openerp.sql_db: bad query: insert into "res_country_state" (id,"name",create_uid,create_date) values (54,'Goa',1,(now() at time zone 'UTC'))
Traceback (most recent call last):
  File "/home/mga/openerp/server/trunk/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "code" violates not-null constraint

2012-08-17 17:17:47,249 2228 ERROR trunk openerp.netsvc: Integrity Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: code - code]

Tags: maintenance

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Team (openerp-dev)
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Medium
assignee: OpenERP R&D Team (openerp-dev) → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Folks,

I have checked this issue again with trunk as well as stable ,Its problem of web-client.
It's produce when many2one has multiple required field ,
web-client sent only one value "name" or _rec_name at quick create for remaining column it send
null value. Quick create functionality only available with web client.

So I am assigning this issue to web team.

Thanks!

affects: openobject-addons → openerp-web
Changed in openerp-web:
assignee: OpenERP R&D Addons Team 1 (openerp-dev-addons1) → OpenERP R&D Web Team (openerp-dev-web)
Revision history for this message
Kevin Deldycke (kevin-deldycke-deactivatedaccount) wrote :

I would like to leverage my OPW enterprise contract to fix this issue, so I've just sent to OpenERP's official support a formal ticket.

Changed in openerp-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello,

I have checked the issue and found that it is due to quick create option which is enabled for the many2one field which has other required field than _rec_name, actually the design of quick_create is something like this, when user tried to create a record using quick create so name_create is called which will considers the _rec_name and whatever data you have entered in many2one field will going to consider as a _rec_name field data, now with that it will going to create record but if there are other fields required so create will raise an Not Null Constraint and will raise exception, so web-client will get response fail for quick create and will call slow create(i.e. it will open form view for that model).

If there are many field than _rec_name than its better to disable the quick create option(if other required field are not filled with default value), because you are sure that it never going to quick create, hence I have set quick_create=false which will always call slow create and saves one RPC call for quick create.

Thanks.

Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello,

Sorry forget to tell that it has been fixed in lp:~openerp-dev/openobject-addons/6.1-opw-578339-msh.

Soon it will merged in stable version 6.1.

Thanks.

Changed in openerp-web:
status: Confirmed → Fix Committed
summary: - Try to create a new state on Leads have trackback
+ [6.1] Try to create a new state on Leads have trackback
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.