Try ERPNext Buy Support Partners Foundation

Not getting the Name of a doctype field instead getting the AutoName of it?

In Library Management app development. I want the ArticleName on the article page, where as i am getting the Auto Name(ART000001) and

also in
frappe@derp:~/frappe-bench/apps/library_management/library_management/library_management/doctype/article$ nano list_item.html
the code you have given is not working for me in-terms of rendering the page as required.

Also i am not getting the image on the page of article
Name- image _view DataType- image Options- image

Naming: In Article doctype, if you specify article_name in Auto Name field, the system will create autoname based on actual article name.

Article Image: You have to add another field with Field Type as Attach. After attaching an image file, it will show in image_view field.

In Article doctype, in Naming col the Auto Name field i have given is ART.#######
which is why on the Article page display i am getting ART00000001 and 02. Where as i want to get the actual article_name say “You Can Win” and “Playing It My Way” on Article page.

About the image display i have give it as follows

You should set article_name instead of ART.####### in Autoname field.

And for image field, it looks correct, it should show the image after uploading. Just make sure, you have specified image in options of image_view field, no new line after that.

Hello Nabin,

I am new to work on ERPNext and have started with development of the Library Management system, that you have give for understanding at a initial level and as you can see, i am not getting the article_name in place of Artilce Page view where as i am getting the AutoName (ART0000001) also not getting the image and the html format code that you have given is not working in my case but ya i have developed the App successfully.

Now what i want to implement additionally is i want the transaction_date to be restricted to the current system date(No previous or Next date should be selectable)So accordingly I tried to make changes in Library_Transaction.py as well as in Library_Transaction.js but i guess i am going wrong somewhere and so can you please help me to get the correct solution and where and what I should write to get it done.

I tried a lot but not getting it so please help me with it, in advance thanks a bunch for your help and support for previous answers also.

Regards,Dinesh D.JagtapM: +91.976.276.6631Securiace Technologies

https://securiace.com

Regarding naming, you have to put field:article_name in Autoname field.

And the result is:

For date validation, please share you code via pastebin / github gist, then we can check into it, what have you done.

Thanks for your support and the solution but date validation is left and
for date validation, i have shared my code at

You should write the following code in validate:

form frappe.utils import nowdate
if self.transaction_date != nowdate():
    frappe.throw(_("Transaction can only be made at current date"))

@nabinhait- After making changes not getting the solution correctly, please check the updated code

Looks like indentation issue. Try https://gist.github.com/nabinhait/9cd5964d5a3e0be63632

Have a look for One more time please. Not getting yet.

I have tries in my local system and it is raising exception properly.

May be you are making changes in different branch / bench.

Ok will check thanks a bunch, for your Kind replies.

I tried running this command
---->python -mtrace --trace library_transaction.py
and got this error
----->ImportError: No module named frappe

@djagtap are you able to render list_item for article? Please help me, see my topic [Frappe tutorial] Did I create the file in the right path?