Add views to documents like POS

Hello ,
how do i get the name of doc in .py file?

example

User list contains :

Admin
Ahmad
Jack

when i click on Jack
its redirect my to page and its contain html
and says "Welcome Jack ! "

Try frappe.get_list. Have you read the developer guide: https://frappe.io/docs

-Anand.

You will have to customize your own list.

The kind of designs you are changing are highly unrecommended and will surely break upgrades. I hope your client knows what they are doing.

Ok my true scenario
i created doc type
Orders
in Order list i made my modification to fit the requirement as normal ,
now the order element it self i want to change the view of it (like POS in erpnext )
so in order.py i need to get which element selected from the order list ?
which command do i use in the order.py

sorry for the bad example

What iam trying to achieve is when i click on the element

https://drive.google.com/file/d/0B0UEVfVFw42hdE1CZDdXbm9mMTg/view?usp=sharing

it get me to the page of it so i can get its info

https://drive.google.com/file/d/0B0UEVfVFw42hY3Y0M2FROENRR28/view?usp=sharing

What you are trying to do is again using non-standard layouts and these are all likely to break.

You can add a new “view” to the form and do this. Check:

https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/doctype/sales_invoice/pos.js

https://github.com/frappe/erpnext/blob/develop/erpnext/public/js/transaction.js#L104

The philosophy of ERPNext is to use highly standardized views as much as possible and I would not recommend you going that path.

1 Like