Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Community: Framework

by
Ermin Trevisan
- 04/28/2016 06:23:57
Please stop spamming the list! Don't you read the comments you have
already got several times?

On 27.04.2016 11:56, omar frikha wrote:
> my object is to create a module to display all product variant so I
> chose a product template
> i try this code aims do not function
> class.py
> 
> product_mod class (models.Model)
>     _name = "product.product.inherit"
>     _inherit = "product.product"
>       produit_templet = fields.Many2one ( "product.template")
>     var = fields.One2many ( "product.product ',' name ')
>     @ api.multi
>     def produit_get_var (self):
>         produit_obj self.env = [ 'product.product']
>         self.pr 
>         produit_obj.search products = ([( 'product_templ_id', '=='
> self.produit_templet.id )])
>         i = 1
>         for products produced in:
>             
>             produit.write ({ 'id': [(0.0, { 'produit.id
> ' :( i)})]})
>             i + = 1
>         return True
> 
> view.xml
> 
>