*** This bug is a duplicate of bug 672469 ***
    https://bugs.launchpad.net/bugs/672469

opererp-server: 6.0.4
openerp-client: 6.0.4
ubuntu: 12.4
firefox: 14.0.1


>>> import xmlrpclib
>>> user = "cubells"
>>> passwd = "cubellspw"
>>> db = "cubellsdb"
>>> sock_common = xmlrpclib.ServerProxy ('http://localhost:8069/xmlrpc/common')
>>> uid = sock_common.login(db, user, passwd)
>>> sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
>>> product_template = {
... 'name': 'Cheese burger',
... 'supply_method': 'buy',
... 'list_price': 4.5,
... 'purchase_ok' : True,
... 'type' : 'product',
... 'procure_method': 'make_to_stock',
... 'sale_ok': True,
... 'uom_id': 1,
... 'company_id': 1,
... 'uom_po_id': 1,
... 'categ_id': 1,
... 'rental': False,
... }
>>> product_id = sock.execute(db, uid, passwd, 'product.template', 'create', 
>>> product_template)
>>> product_product = {
... 'product_template_id': product_id,
... 'default_code': 123456,
... 'name_template': 'Cheese burger',
... 'active': True,
... }
>>> product_id = sock.execute(db, uid, passwd, 'product.product', 'create', 
>>> product_product)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault warning -- 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: name - name]: 'Traceback (most recent call last):\n  
File "/usr/local/lib/python2.7/dist-packages/openerp-server/netsvc.py", line 
489, in dispatch\n    result = 
ExportService.getService(service_name).dispatch(method, auth, params)\n  File 
"/usr/local/lib/python2.7/dist-packages/openerp-server/service/web_services.py",
 line 599, in dispatch\n    res = fn(db, uid, *params)\n  File 
"/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py", line 154, 
in wrapper\n    self.abortResponse(1, _(\'Integrity Error\'), \'warning\', 
msg)\n  File "/usr/local/lib/python2.7/dist-packages/openerp-server/netsvc.py", 
line 70, in abortResponse\n    raise Exception("%s -- %s\\n\\n%s"%(origin, 
description, details))\nException: warning -- Integrity Error\n\nThe operation 
cannot be completed, probably due to the following:\n- deletion: you may be 
trying to delete a record while other records still reference it\n- 
creation/update: a mandatory field is not correctly set\n\n[object with 
reference: name - name]\n'>
>>>

Openerp server log says:


ERROR:db.cursor:bad query: insert into "product_template" 
(id,"supply_method","list_price","standard_price","mes_type","uom_id","cost_method","categ_id","uos_coeff","sale_delay","procure_method","sale_ok","purchase_ok","company_id","produce_delay","uom_po_id","rental","type",create_uid,create_date)
 values 
(2627,'buy','1.00','1.00','fixed',1,'standard',1,1.0,7.0,'make_to_stock','True','True',1,1.0,1,'False','consu',3,now())
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/sql_db.py", line 
131, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/673525

Title:
  [sale] integrity error reference name - name

Status in OpenERP Addons (modules):
  In Progress

Bug description:
  Version: trunk
  Addon: sale
  Step: installation
  Language: German


  Traceback (most recent call last):
    File 
"d:\openerp\win-installer-trunk\trunk\client\bin\widget\view\form_gtk\parser.py",
 line 123, in button_clicked
      model.get_button_action(self.form.screen, id, self.attrs)
    File 
"D:\openerp\win-installer-trunk\trunk\client\bin\widget\model\record.py", line 
372, in get_button_action
      self.resource,attrs['name'], [id], context)
    File "D:\openerp\win-installer-trunk\trunk\client\bin\rpc.py", line 185, in 
rpc_exec_auth
      return sock.exec_auth(method, *args)
    File "D:\openerp\win-installer-trunk\trunk\client\bin\rpc.py", line 119, in 
exec_auth
      res = self.execute(method, self._uid, self._passwd, *args)
    File "D:\openerp\win-installer-trunk\trunk\client\bin\rpc.py", line 136, in 
execute
      raise e
  tiny_socket.Myexception: ('warning -- Integrity Error\n\nThe operation cannot 
be completed, probably due to the following:\n- deletion: you may be trying to 
delete a record while other records still reference it\n- creation/update: a 
mandatory field is not correctly set\n\n[object with reference: name - name]', 
'Traceb
  ack (most recent call last):\n  File 
"D:\\openerp\\win-installer-trunk\\trunk\\server\\bin\\netsvc.py", line 489, in 
dispatch\n    result = ExportService.getService(service_name).dispatch(method, 
auth, params)\n  File 
"D:\\openerp\\win-installer-trunk\\trunk\\server\\bin\\service\\web_services.py",
 line 586, in dispatc
  h\n    res = fn(db, uid, *params)\n  File 
"D:\\openerp\\win-installer-trunk\\trunk\\server\\bin\\osv\\osv.py", line 88, 
in wrapper\n    self.abortResponse(1, _(\'Integrity Error\'), \'warning\', 
msg)\n  File "D:\\openerp\\win-installer-trunk\\trunk\\server\\bin\\netsvc.py", 
line 70, in abortResponse\n    raise Exceptio
  n("%s -- %s\\n\\n%s"%(origin, description, details))\nException: warning -- 
Integrity Error\n\nThe operation cannot be completed, probably due to the 
following:\n- deletion: you may be trying to delete a record while other 
records still reference it\n- creation/update: a mandatory field is not 
correctly set\n\n[object
  with reference: name - name]\n')

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/673525/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-india
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-india
More help   : https://help.launchpad.net/ListHelp

Reply via email to