odoo关联表查询方法

testinfo=self.env['product.attribute.value'].search([('product_ids.product_tmpl_id','=',2047)])
        for id in testinfo:
            print id.name
            print id.price_extra
            print id.attribute_id.name

 

posted @ 2016-08-24 16:22  屌丝IT男  阅读(1673)  评论(0)    收藏  举报