Updating Value of one Item based on another Item

Hello All,
We are setting up ERP system for our jewellery store. First of all, for a newbie like me, this forum is very helpful and helped to cross lot of hurdles. Thank you.
Problem that I am currently facing:
As the gold rate varies daily, price has to be set based on that day’s Value. I tried using “Pricing Rule” but that only solves a part of my problem. An ornament, say if it weighs 10 gram, it will have 8 grams of gold and 2 grams of diamond. So, Pricing Rule couldnt be applied.

I tried creating a new Doctype called “Today Gold Rate” and used


This successfully pulls the value into the Item Entry. However, the problem here is when value is changed in “Today Gold Rate” that value is not getting updated in Item entry automatically.

Need help on below
I am trying to solve the issue by creating a new Item called “Gold Rate today”. If I could fetch the selling rate of this item into the other Items then, I believe this problem could be solved. Could someone guide me on how to fetch value of an Item and use it in another Item.



You can update the item’s gold_rate price from the validate method, You will need to write the python method to update item price.