Suppose, You have a field name free_quantity in purchase.order.line and you have a filed with the same name in the account.move.line and you want to pass the field value to the account.move.line.
Solution: You have a function name def _prepare_account_move_line in purchase.order.line, inherit it and pass your value in it like
def _prepare_account_move_line(self, move):
res = super(PurchaseOrderLine, self)._prepare_account_move_line(move)
res.update({
'free_quantity': self.free_quantity
})
return res
or,
def _prepare_account_move_line(self, move):
res = super(PurchaseOrderLine, self)._prepare_account_move_line(move)
res["free_quantity"] = self.free_quantity
return res
Hope it will help. Thanks