I'm using odoo 9.0 community edition.
I modified the account.invoice.supplier.form view to give me an editable form when modifying/creating invoice lines rather than the standard inline editing. To do this I changed:
<tree string="Bill lines" editable="bottom">
to
<tree string="Bill lines">
I also did the same with account.invoice.form.
The view that now pops up when I click an invoice line is account.invoice.line.form.
The problem I'm getting when I do this from account.invoice.supplier.form, is that when I click the many2one dropdown to select a Product I get the following error:
Odoo Server Error
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 643, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 680, in dispatch result = self._call_function(**self.params) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 309, in checked_call result = self.endpoint(*a, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 959, in __call__ return self.method(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 509, in response_wrap response = f(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 892, in call_kw return self._call_kw(model, method, args, kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 884, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/product/product.py", line 1152, in name_search ids = self.search(cr, user, args, limit=limit, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/product/product.py", line 1184, in search return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1658, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4748, in _search query = self._where_calc(cr, user, args, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4519, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/usr/lib/python2.7/dist-packages/openerp/osv/expression.py", line 644, in __init__ self.parse(cr, uid, context=context) File "/usr/lib/python2.7/dist-packages/openerp/osv/expression.py", line 840, in parse raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf))) ValueError: Invalid field u'purchase_ok' in leaf "<osv.ExtendedLeaf: (u'purchase_ok', u'=', True) on product_product (ctx: )>"
This does not happen from account.invoice.form.
How can I get around this error? Why does it happen?