Guest User

missing FROM-clause

a guest
Jul 25th, 2013
34
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class InventoryLine(ModelSQL, ModelView):
  2.     'Stock Inventory Line'
  3.     __name__ = 'stock.inventory.line'
  4.    
  5.     product_code = fields.Function(
  6.         fields.Char('Code',
  7.             order_field='("product_product".code IS NULL) %(order)s, "product_product".code %(order)s'),
  8.         'get_product_code',
  9.         searcher='search_product_code')
  10.    
  11.     @classmethod
  12.     def search_product_code(cls, name, clause):
  13.         return [('product.code',) + tuple(clause[1:])]
  14.  
  15.     def get_product_code(self,name=''):
  16.         return self.product.code
RAW Paste Data