← Back to team overview

openerp-india team mailing list archive

[Bug 1079548] Re: Message field(char) not proper on procurement as per the coding convention.

 

Hi thanks for the reply - i am also using it, however it says the
'character' is invalid - syntax error.

-- 
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:
  Message field(char) not proper on procurement as per the coding
  convention.

Status in OpenERP Addons (modules):
  Fix Committed

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