openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #27847
[Bug 1169998] Re: [7.0] adding custom fields to stock.picking.out / stock.picking.in should either work or be prevented
Closed in 8.0, the stock.picking.* classes have been removed.
** Changed in: openobject-addons
Status: Confirmed => Fix Released
** Changed in: openobject-addons
Milestone: 7.0 => 8.0
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to Odoo Addons.
https://bugs.launchpad.net/bugs/1169998
Title:
[7.0] adding custom fields to stock.picking.out / stock.picking.in
should either work or be prevented
Status in Odoo Addons:
Fix Released
Bug description:
In the MP (that I approved...) https://code.launchpad.net/~openerp-dev
/openobject-addons/7.0-opw-590100-ado/+merge/154917 a regression was
introduced :
Before that MP, it was possible to add custom fields to
stock.picking.in and stock.picking.out, and to search these models
with a domain specific to this custom field.
Now, this crashes because we delegate the searching to stock.picking
which does not have that specific field. The read method is also
affected.
Among other side effects, the customized views using that new field
will fail to load.
Steps to reproduce on runbot:
* as admin/admin, using the web interface, add a Field to stock.picking.out (e.g a boolean field called reproduce_bug)
* visit the Delivery Orders view, and create a custom search on reproduce_bug is True
Expected: no lines (because no such delivery orders have been created
Actual: Error message saying that stock.picking has no field
reproduce_bug.
Server Traceback (most recent call last):
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/netsvc.py", line 293, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/addons/stock/stock.py", line 3005, in search
return self.pool.get('stock.picking').search(cr, user, args, offset, limit, order, context, count)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/orm.py", line 2354, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/orm.py", line 4843, in _search
query = self._where_calc(cr, user, args, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/orm.py", line 4674, in _where_calc
e = expression.expression(cr, user, domain, self, context)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/expression.py", line 641, in __init__
self.parse(cr, uid, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-7248/server/openerp/osv/expression.py", line 805, in parse
raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'x_reproduce_bug' in leaf "<osv.ExtendedLeaf: ('x_reproduce_bug', '=', True) on stock_picking (ctx: )>"
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1169998/+subscriptions