MRP error when processing a procurement order with large message

Bug #1111049 reported by Renato Lima - http://www.akretion.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Hello Guys,

I'm using OpenERP Addons revision #8616, when I try process a procurement order this error happens:

  File "/opt/openerp/prod/addons/procurement/procurement.py", line 370, in _check_make_to_stock_product
    cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
  File "/opt/openerp/prod/server/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/prod/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
DataError: value too long for type character varying(124)

You can reproduce this error while trying to process any procurement order with a product with a long name, because product name is copied to name field in procurement order, if you look /opt/openerp/prod/addons/procurement/procurement.py, lines 369, 370:

message = _("Procurement '%s' is in exception: ") % (procurement.name) + message
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))

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.