In Domain how to call default method:-
def _get_lotproduct(self, cr, uid, context=None):
lot_obj = self.pool.get('stock.production.lot')
lotids = lot_obj.search(cr, uid, [])
product_id = []
for val in lot_obj.browse(cr, uid, lotids):
product_id.append(val.product_id.id)
return product_id[0]
'product_id': fields.many2one('product.product', 'Product', domain="[('product_id','=',_get_lotproduct)]"),
_defaults = {
'product_id' : _get_lotproduct
}
domain="[('product_id','=',_get_lotproduct)]" Is it possible to call default method in domain?