openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #18020
[Bug 1079548] Re: Error: Product - not enough stock - when convert from Quotation to Sales Order
Hello,
This is hard to reproduce when our procurement exception's message will become more than 124 then this error will raised.
Increasing the size is not a good way, cause 124 is enough size for message.
But as per my "Opinion" size 124 is not good as per the coding
convention it should be 128.
That's why I am confirming this issue. *Please Set the field size to 128
instead of 124*.
Thanks for the reporting!
** Changed in: openobject-addons
Importance: Undecided => Low
** Changed in: openobject-addons
Status: Incomplete => Confirmed
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP R&D Addons Team 2 (openerp-dev-addons2)
--
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/1079548
Title:
Error: Product - not enough stock - when convert from Quotation to
Sales Order
Status in OpenERP Addons (modules):
Confirmed
Bug description:
On trunk build 14921
Following error occur when trying to convert from Quotation --> Sales Order
(to confirm order, given my product has a very long name)
<pre>
File "/opt/openerp7/server/openerp/tools/safe_eval.py", line 242, in safe_eval
return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
File "", line 1, in <module>
File "/opt/openerp7/server/openerp/osv/orm.py", line 375, in function_proxy
return attr(self._cr, self._uid, [self._id], *args, **kwargs)
File "/opt/openerp7/addons/procurement/procurement.py", line 255, in check_make_to_stock
ok = ok and self._check_make_to_stock_product(cr, uid, procurement, context)
File "/opt/openerp7/addons/procurement/procurement.py", line 396, in _check_make_to_stock_product
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
File "/opt/openerp7/server/openerp/sql_db.py", line 162, in wrapper
return f(self, *args, **kwargs)
File "/opt/openerp7/server/openerp/sql_db.py", line 227, in execute
res = self._obj.execute(query, params)
DataError: value too long for type character varying(124)
</pre>
Steps:
=====
1. New Quotation
2. Add product with very long name
3. Confirm order
Problem:
========
In procurement.py --> object = procurement.order, field "message" has length only 124, which I guess not enough when the message is logged.
Solution:
========
I try changing length to 1024 and repeat the process. It works now.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1079548/+subscriptions
References