Hi, I am a beginner and do not know that failure can have my code. I'm trying to pass a value from a field in the wizard to a field one2many from parent form. No errors, but it adds nothing. The function is called from a button at the wizard. Please, I need to know that in my code fails
Here is the code:
wizard_box.py
# -*- coding: utf-8 -*-
from openerp import models, fields, api
import openerp.exceptions
class wizard_box(models.TransientModel):
_name = 'test_am.wizard_box'
name = fields.Char(string="Box")
@api.one
def assing_value(self): self.env['test_am.delivery_note'].write({'assing_box': (0, 0,{'name': 'self.name'})})
models.py
class test_am_delivery_note(models.Model):
_name = 'test_am.delivery_note'
assing_box = fields.One2many('test_am.box','name', 'Boxes')
Thanks for the help in advance!