Community mailing list archives

community@mail.odoo.com

Re: Community

by
omar
- 04/26/2016 10:50:30
hello community ,

I'm create a new python class:

class product_mod(models.Model):
    _name="product.product.inherit"
    _inherit="product.product"
    
    produit=fields.Many2one("product.template")
    @api.depends('produit')
    def move_line_get(self, cr):
        res = []
        cr.execute('SELECT * FROM product_product;')
        for t in cr.dictfetchall():
            if (t.product_template_id==self.produit.id):
                res.append(id.name
        return res

how i can display the content of the object "res" in table editable ?

  • Re: Community

    by
    Martin Trigaux (mat)
    - 04/26/2016 11:15:11 - 0