Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Community: Framework

by
Skillteam, Houssine BAKKALI
- 04/27/2016 06:07:27
In fact you already get some comments from Martin.

So I don't think that someone can help you if you don't listen to the given anwsers and advises...

You should probably read the doc as Martin suggested

2016-04-27 11:56 GMT+02:00 omar frikha <omarfrikha59@gmail.com>:
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

<Button name = "produit_get_var" type = "object" string = "product var" class = "oe_highlight oe_inline" />
<Notebook>
<String page = "variant product">
<Field name = "var">
<Tree create = "false" delete = "false" editable = "bottom">
<Field name = 'name' />
</ Tree>
<Form>
<Group>
<Field name = 'name' />
</ Group> </ form>
</ Field>
</ Page> </ notebook>

how i do doing in this position

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe