In purchase.order.line
I added new field pln price
and changed unit price field to function:
'price_unit': fields.function(_amount_pln, string='Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
'plnprice': fields.float('PLN Price', digits_compute= dp.get_precision('PLN Price')),
Here is function:
def _amount_pln(self, cr, uid, ids, prop, arg, context=None):
res = {}
for line in self.browse(cr, uid, ids, context=context):
res[line.id] = line.plnprice * 0.25
return res
exchange value now is hardcoded, 0.25
as you see in _amount_pln
function
Then I added new field in purchase.order
class:
'exchange_value': fields.float('Exchange',readonly=False)
But how get this field value to my _amount_pln
function I don't know.
can you please help me how to resolve this problem?