Hi,
I'm working in a custom module to create BOMs.
This is the code:
@classmethod
def create_curtain_bom(cls, products):
for product in products:
lista = {'productA':quantity,'productB':quantity}
bomid = 10
pool = Pool()
Input = pool.get('production.bom.input')
to_create_inputs = []
for li in lista:
to_create_outputs.append({'product':li,
'bom':bomid,
'quantity':lista[li],
'uom':17})
if to_create_inputs:
Input.create(to_create_inputs)
My doubt is how i need to sent the parameters for .create() function,
'cause it's give me the follow message when it is called:
AttributeError: 'str' object has no attribute 'iterkeys'
I would appreciate if someone tell me how the parameters to create need to
be sent.
Thanks in advance!