Hi,
Hi Team,
I’ve created FrappeBench and have installed ERPNext on Ubuntu Server 14.04.
I’m creating a demo for a client that is a dealer for vehicles.
The dealer gets orders for vehicles on the demand side and gets vehicles dispatched by the manufacturer on the supply side.
Now, the vehicles that are coming needs to be allocated to the appropriate Sales Orders.
Since each vehicle is unique, we’ll need to track the serial numbers of the vehicles.
Once a vehicle is allocated to a particular Sales Order, the vehicle needs to go for registration with the appropriate RTO office.
So, the way I am approaching this is the following:
In the DocType “Serial No”, I have created a custom field called “Allocated To” and have selected Link as the Field type, with Sales Order" in the options. This part is easy and works as required.
Now, as soon as a Serial Number is allocated to a particular Sales Order, I want the corresponding “rto_office” field (I have created a mandatory Custom field in “Sales Order”) from the Sales Order to get fetched and populated to the Serial Number record.
Once this is done, it is easy to transfer the appropriate vehicles to the appropriate “Pre-Registration” warehouses of the appropriate RTO Offices.
What is the best way of accomplishing this?
I have tried Custom Script “cur_frm.add_fetch(‘Sales Order’, ‘rto_office’, ‘rto_office’)” in the Serial Number document, where RTO Office is a Custom field. Needless to state “RTO Office” is a custom field in “Sales Order” DocType and that part is getting populated without any problems. “RTO Office” is another custom field in “Serial No”.
Please help.
Thanks
Jay