Duplicated Doctype, but code doesn't carry over

Hello everyone,

I have duplicated a default doctype, but the code did not carry over. It does not calculate the totals or autofill any information. I would like to have a custom doctype with the same functionality as a default doctype. Is this possible and if so how would I go about doing this?

I know you can add custom scripts, but that requires a large amount of coding to get the same functionality as the default doctype.

Any help is appreciated.

Thanks

@JohnDoe I am Also facing this issue? Did you found any solution to this?

Hi,

Duplicating Doctype will not automatically copy the underlying codes. You need to manually copy/re-write the code as per your need.

Can I know the purpose of duplicating complete Doctype? Normally, you can handle the changes you need with Customize Form Option.

Thanks,

Divyesh Mangroliya

Hi Thanks for your reply.
Basically my need is proforma invoice as there is no doctype called proforma invoice i am duplicating quotation. When i look for proforma in the frappe forum i saw that achieve this using copying the quotation doctype.

Hi,

For this you do not need to copy. Basically, Quotation doctype can be used as a Proforma Invoice, Just Change the Print Title from Quotation to Proforma Invoice in Print Format.

Thanks,

Divyesh Mangroliya

Hy
I am not only looking for print format basically i need both quotation and proforma report as well. how i can create separate proforma report?

Hi,

This still can be achieved. Just Add one Custom Field in Quotation Doctype as follows:

Field Name: Type
Field Type: Select
Options: Quotation
Proforma Invoice

With this you can generate reports based on type.

You can give the first Quotation and later while converting to Proforma Invoice, you can duplicate Quotation and change type field to Proforma Invoice and save and send to the Customer.

Thanks,

Divyesh Mangroliya

Hy,
Thanks for your valuable time and reply. I hope this is a great idea. I will try it
Regards
Jassim d