The email invoice funtionality that leverages the print project (http://drupal.org/project/print) no longer functions.
There is a call to _print_get_template() at lines 538 & 614, but this function no longer appears to exist in print.pages.inc

essbee

CommentFileSizeAuthor
#3 erp-print_fix.patch19.27 KBleenx

Comments

singularo’s picture

You may need to use an older version of the print module for now I suspect.

We're looking at re-writing the way things print with the d7 port, its a bit convoluted at the moment.

singularo’s picture

Status: Active » Closed (won't fix)
leenx’s picture

StatusFileSize
new19.27 KB

I know this has been marked as won't fix, but I did a bit of work, that is working for me and might help others.

This patch works with print modules 6.x-1.14. Think there might still be a bug or two to work out, but I don't get any errors and the basic stuff is working.

Hope this help somebody else.

colorado’s picture

After using your patch I get the following error when using the mail link for a quote:

Fatal error: Call to undefined function mimemail() in /home/colorado/public_html/erp/profiles/drupalerp/modules/erp/erp_email/erp_email.module on line 507

It is referring to this line in your code:

// send email
mimemail( $from_email, $to_addresses, $params['subject'], $params['body'], FALSE, $params['headers'], drupal_html_to_text(decode_entities($params['body'])), $attachments );

Any ideas?

Thank you for sharing the patch.

leenx’s picture

Greetings ...

You need to add the mimemail module to your Drupal install. I did not want to hand craft mime objects. I will put that in the notes.

Thanks
LeeT

leenx’s picture

As noted believe, my patch needs the mimemail module

Did not want to have to keep updating this code, so just use a module that does this work already.

colorado’s picture

Thank you very much leenx. Now there are no more errors, and I am returned to the quote page after sending. However I don't receive any email.

I am using print 6.x-1.14, and the StratosERP downloaded from http://stratoserp.com/quick-start. The erp files I patched were ones I downloaded from the most recent dev here on d.o

I noticed that you have your own more recent profile posted, but I don't use drush or .make files.

Is there somewhere I can download your latest complete site roll-up as a tar or zip?

leenx’s picture

Greetings ...

Not sure if this will help or make things harder - http://files.leenx.org/erp/20120421a/test/erp.tar.bz2

That is my dev's build, not tested this week, seeing that I am working on some funky functionality, that I don't see getting merged.

Pity you not using drush or drush make to build your platforms, it really makes things easier.

Best of luck.

Mailed
LeeT

colorado’s picture

Thank you so much leenx, you are so helpful and responsive!

I didn't get your just-posted dev build working so well. So I went back to the StratosERP build I was having trouble with before. After much troubleshooting, I finally figured out that the patches above (erp-print_fix.patch), along with print module v6.x-1.14, and installing/enabling mimemail (and enabling it in its own module setting) still did not work.

However, it DID work once I installed the erp_leenx theme and set erp_leenx_print.css as the stylesheet for the print module to use.

Halleluja! and thanks again so very much for your help.

leenx’s picture

Good to hear you making progress.

Should really look at rolling all the patches and running some unit tests and get ERP6 in shape for a new release, but I don't think Simon is focusing much on the ERP6 version.

You should also look at using print 6.x-1.15.

Let us know how the rest of your deployment goes.

Thanks
LeeT