This is my function. I am able to create a new quatation on clicking a button in my indent form and also able to see the indent sequence in quatation. But I am not able to update product line in indent in purchase order line. Can any1 help me out here..? @api.multi
- def action_rfq(self):
- rfq_obj = self.env['purchase.order']
- for order in self.product_lines:
- rfq_id = rfq_obj.create({
- 'series': self.name,
- 'order_line': ({
'product_id': order.product_id.id, 'name': order.name, 'product_qty': order.product_uom_qty, 'product_uom': order.product_uom.id, 'price_unit': order.price_unit, 'date_planned': datetime.now(), 'order_id': order.indent_id.id, }) })
'product_id': order.product_id.id, 'name': order.name, 'product_qty': order.product_uom_qty, 'product_uom': order.product_uom.id, 'price_unit': order.price_unit, 'date_planned': datetime.now(), 'order_id': order.indent_id.id, }) }) return rfq_id