Dear All,
I've installed the latest V8 from GitHub.
Created a Database with Demo data.
One of the Product configuration is as follows:
Type : Stockable
Costing Method : Real Price
Inventory Valuation : Real Time
Stock Input & Output accounts set in internal category.
I've created the Purchase Order.
In Warehouse --> All Operations --> Ready to Transfer Menu, I filtered the Partner name "delta".
Selected the IN document to transfer the material.
Entered the required Qty, and lot number in the wizard.
On APPLYing the transfer results in following Error message :
Traceback (most recent call last):
File "/home/Odoo/OdooERP/OdooERP/openerp/http.py", line 500, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/Odoo/OdooERP/OdooERP/openerp/http.py", line 517, in dispatch
result = self._call_function(**self.params)
File "/home/Odoo/OdooERP/OdooERP/openerp/http.py", line 283, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/http.py", line 280, in checked_call
return self.endpoint(*a, **kw)
File "/home/Odoo/OdooERP/OdooERP/openerp/http.py", line 733, in __call__
return self.method(*args, **kw)
File "/home/Odoo/OdooERP/OdooERP/openerp/http.py", line 376, in response_wrap
response = f(*args, **kw)
File "/home/Odoo/OdooERP/OdooERP/addons/web/controllers/main.py", line 952, in call_button
action = self._call_kw(model, method, args, {})
File "/home/Odoo/OdooERP/OdooERP/addons/web/controllers/main.py", line 940, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 391, in old_api
result = new_api(recs, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 395, in new_api
result = [method(rec, *args, **kwargs) for rec in self]
File "/home/Odoo/OdooERP/OdooERP/addons/stock/wizard/stock_transfer_details.py", line 106, in do_detailed_transfer
self.picking_id.do_transfer()
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 552, in new_api
result = method(self._model, cr, uid, self.ids, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock/stock.py", line 1368, in do_transfer
self.pool.get('stock.move').action_done(cr, uid, todo_move_ids, context=context)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock_account/stock_account.py", line 263, in action_done
res = super(stock_move, self).action_done(cr, uid, ids, context=context)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock/stock.py", line 2299, in action_done
quant_obj.quants_move(cr, uid, quants, move, ops.location_dest_id, location_from=ops.location_id, lot_id=ops.lot_id.id, owner_id=ops.owner_id.id, src_package_id=ops.package_id.id, dest_package_id=quant_dest_package_id, context=context)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock/stock.py", line 402, in quants_move
quant = self._quant_create(cr, uid, qty, move, lot_id=lot_id, owner_id=owner_id, src_package_id=src_package_id, dest_package_id=dest_package_id, force_location_from=location_from, force_location_to=location_to, context=context)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock_account/stock_account.py", line 148, in _quant_create
self._account_entry_move(cr, uid, [quant], move, context)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock_account/stock_account.py", line 132, in _account_entry_move
self._create_account_move_line(cr, uid, quants, move, acc_src, acc_valuation, journal_id, context=ctx)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/stock_account/stock_account.py", line 244, in _create_account_move_line
'ref': move.picking_id and move.picking_id.name}, context=context)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/addons/account/account.py", line 1384, in create
result = super(account_move, self).create(cr, uid, vals, c)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 332, in old_api
result = method(recs, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/models.py", line 3965, in create
record = self.browse(self._create(old_vals))
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 235, in wrapper
return new_api(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/api.py", line 464, in new_api
result = method(self._model, cr, uid, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/models.py", line 4103, in _create
tuple([u[2] for u in updates if len(u) > 2])
File "/home/Odoo/OdooERP/OdooERP/openerp/sql_db.py", line 158, in wrapper
return f(self, *args, **kwargs)
File "/home/Odoo/OdooERP/OdooERP/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "delta"
LINE 1: ...ate") VALUES(nextval('account_move_id_seq'), '/', 'delta', 19...
If we process the transfer, without searching for the Partner, then there is no such Error messages.
But this is not possible in Realtime, as there will be hundreds of Purchase Orders in process, and to find out a
particular one we need to search and process.
If the Product's Inventory Valuation setting is changed to PERIODICAL, this Error message is not prompted.
In certain cases, instead of this Error message, the Following Warning screen appears :
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: Partner - res.partner]
In the Server side, the following message is appeared :
openerp.sql_db: bad query: INSERT INTO "account_move" ("id", "name", "partner_id", "company_id", "journal_id", "state", "period_id", "date", "ref", "to_check", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('account_move_id_seq'), '/', '749', 9, 34, 'draft', 11, '2014-10-20 20:00:03', 'PA-IN/DXB/14/10/00029', false, 117, 117, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Traceback (most recent call last):
File "/home/Odoo/OdooERP/OdooERP/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
IntegrityError: insert or update on table "account_move" violates foreign key constraint "account_move_partner_id_fkey"
DETAIL: Key (partner_id)=(749) is not present in table "res_partner".
Please help.