Clear PO/PR/PI effect

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

You also have to delete data from related child tables and internal tables like gl entry, stock ledger entry, bin etc. You should reset naming series for those forms as well. We always recommend to start fresh when you go to real data entry mode.

On 21 Aug 2014 08:13, "Nguyen Do Le Bao" <na...@gmail.com> wrote:
Hi guys,

For the purpose of testing, i will write scripts to delete:
1. All PO/PR/PI
2. All SO/DN/SI

I will just use sql to delete those tables.
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically.
Is this correct ? Anything to take note of ?

Thanks



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CA%2BCj7thfDiNJkdGYFv%3DdSnAMbQNFSnPY798GqC9Bb1jwu6_n-Q%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/437BB2DD-752D-4A21-8BD2-4FEE2B48E0EA%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(. 
Even if I can automate that, the data must pass validation. :| 

On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Why not write relative tests, that do not depend on initial data.

We were doing this before, but its not a good way to write tests!

On 21-Aug-2014, at 2:48 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(. 
Even if I can automate that, the data must pass validation. :| 

On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9AEA9F35-AFF8-4598-9BB1-A7E040FC9628%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Good points, thought about that. 
So if I can make the whole test do sth like: 
- Create a PO (use server code or API call to create)
- Use this PO to do what ever tests on it
- In the end, discard this PO and its PR/PI 
This should work better right ?  

Btw, another question: Previous ERPNext has the button to backup, then it sends to my email both DB & Files. 
Not sure if it's still available for current version ?

On Thursday, August 21, 2014 5:23:35 PM UTC+8, rushabh wrote:
Why not write relative tests, that do not depend on initial data.

We were doing this before, but its not a good way to write tests!

On 21-Aug-2014, at 2:48 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(. 
Even if I can automate that, the data must pass validation. :| 

On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/30e4455f-6360-46a8-8034-7edafc126345%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On 21-Aug-2014, at 3:02 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Good points, thought about that. 
So if I can make the whole test do sth like: 
- Create a PO (use server code or API call to create)
- Use this PO to do what ever tests on it
- In the end, discard this PO and its PR/PI 
This should work better right ?  

Yeah


Btw, another question: Previous ERPNext has the button to backup, then it sends to my email both DB & Files. 
Not sure if it's still available for current version ?

Yeah! just noticed - I am not sure - let me ask someone :)


On Thursday, August 21, 2014 5:23:35 PM UTC+8, rushabh wrote:
Why not write relative tests, that do not depend on initial data.

We were doing this before, but its not a good way to write tests!

On 21-Aug-2014, at 2:48 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(. 
Even if I can automate that, the data must pass validation. :| 

On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/30e4455f-6360-46a8-8034-7edafc126345%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/F5E065C3-0778-4A15-A595-A4DE8C614C4B%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

It is there in Setup / System / Download Backup.


-Anand

On Thursday, August 21, 2014, Rushabh Mehta <rm…@gmail.com> wrote:


On 21-Aug-2014, at 3:02 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Good points, thought about that.
So if I can make the whole test do sth like:
- Create a PO (use server code or API call to create)
- Use this PO to do what ever tests on it
- In the end, discard this PO and its PR/PI
This should work better right ?

Yeah


Btw, another question: Previous ERPNext has the button to backup, then it sends to my email both DB & Files.
Not sure if it's still available for current version ?

Yeah! just noticed - I am not sure - let me ask someone :)


On Thursday, August 21, 2014 5:23:35 PM UTC+8, rushabh wrote:
Why not write relative tests, that do not depend on initial data.

We were doing this before, but its not a good way to write tests!

On 21-Aug-2014, at 2:48 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(.
Even if I can automate that, the data must pass validation. :|

On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys,

For the purpose of testing, i will write scripts to delete:
1. All PO/PR/PI
2. All SO/DN/SI

I will just use sql to delete those tables.
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically.
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/30e4455f-6360-46a8-8034-7edafc126345%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/F5E065C3-0778-4A15-A595-A4DE8C614C4B%40gmail.com.

For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF12pAgy5V_BA008Md2TVxywg04hAk31uaQ8EQ%3DcAgX%2B4w%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Thank you, guys! 

Successfully writing test for Customized RPC calls using frappe client. Once I reorganised this, I think it can provide some examples for frappe test documentation.

Just a quick check if I use the frappe client to delete PO/PR docs via  frappe.client.delete, all those related table are also handled properly right ?

-Nathan

On Friday, August 22, 2014 3:24:37 PM UTC+8, Anand Doshi wrote:
It is there in Setup / System / Download Backup. 

-Anand

On Thursday, August 21, 2014, Rushabh Mehta <rm...@gmail.com> wrote:

On 21-Aug-2014, at 3:02 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Good points, thought about that. 
So if I can make the whole test do sth like: 
- Create a PO (use server code or API call to create)
- Use this PO to do what ever tests on it
- In the end, discard this PO and its PR/PI 
This should work better right ?  

Yeah


Btw, another question: Previous ERPNext has the button to backup, then it sends to my email both DB & Files. 
Not sure if it's still available for current version ?

Yeah! just noticed - I am not sure - let me ask someone :)


On Thursday, August 21, 2014 5:23:35 PM UTC+8, rushabh wrote:
Why not write relative tests, that do not depend on initial data.

We were doing this before, but its not a good way to write tests!

On 21-Aug-2014, at 2:48 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(. 
Even if I can automate that, the data must pass validation. :| 

On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:

On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

For the purpose of testing, i will write scripts to delete: 
1. All PO/PR/PI 
2. All SO/DN/SI

I will just use sql to delete those tables. 
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically. 
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.


Thanks



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/30e4455f-6360-46a8-8034-7edafc126345%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/F5E065C3-0778-4A15-A595-A4DE8C614C4B%40gmail.com.

For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f22dbafb-7b5e-410c-8e62-0dc5a73a7b79%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Nathan,

Yes. frappe.client.delete will delete child table records too and will also perform related validations + calls on_trash method of controller.

-Anand.


On Mon, Sep 1, 2014 at 8:11 AM, Nguyen Do Le Bao <na...@gmail.com> wrote:
Thank you, guys!

Successfully writing test for Customized RPC calls using frappe client. Once I reorganised this, I think it can provide some examples for frappe test documentation.

Just a quick check if I use the frappe client to delete PO/PR docs via frappe.client.delete, all those related table are also handled properly right ?

-Nathan

On Friday, August 22, 2014 3:24:37 PM UTC+8, Anand Doshi wrote:
It is there in Setup / System / Download Backup.


-Anand

On Thursday, August 21, 2014, Rushabh Mehta <rm…@gmail.com> wrote:


On 21-Aug-2014, at 3:02 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Good points, thought about that.
So if I can make the whole test do sth like:
- Create a PO (use server code or API call to create)
- Use this PO to do what ever tests on it
- In the end, discard this PO and its PR/PI
This should work better right ?

Yeah


Btw, another question: Previous ERPNext has the button to backup, then it sends to my email both DB & Files.
Not sure if it's still available for current version ?

Yeah! just noticed - I am not sure - let me ask someone :)


On Thursday, August 21, 2014 5:23:35 PM UTC+8, rushabh wrote:
Why not write relative tests, that do not depend on initial data.

We were doing this before, but its not a good way to write tests!

On 21-Aug-2014, at 2:48 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Rather than delete the whole database is there another way ? Like if we know the only tables that are affected ?

Cos, that means re setup the db with Company/Item Master and everything again for every test :(.

Even if I can automate that, the data must pass validation. :expressionless:


On Thursday, August 21, 2014 3:00:23 PM UTC+8, rushabh wrote:


On 21-Aug-2014, at 8:13 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys,

For the purpose of testing, i will write scripts to delete:
1. All PO/PR/PI
2. All SO/DN/SI

I will just use sql to delete those tables.
AFAIK, this shouldn't affect any thing else since all the reports are generated dynamically.
Is this correct ? Anything to take note of ?

Bad idea - you have to make sure there are no data integrity issues

Better to test and discard databases.



Thanks



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/722e556e-5573-48b2-a887-4ddb42802b75%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a750d889-56d2-4ae4-b34d-f210481acc7c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/30e4455f-6360-46a8-8034-7edafc126345%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/F5E065C3-0778-4A15-A595-A4DE8C614C4B%40gmail.com.

For more options, visit https://groups.google.com/d/optout.



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.

  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.

  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email

  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f22dbafb-7b5e-410c-8e62-0dc5a73a7b79%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF3vpUYd_-12TxOT5XKqEk7MP7TSzDB6G8fj9g%3DFAt85_Q%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.