There is a big issue with invoices generated in some circumstances, for example on anonymous orders. Sometimes the line items are not included in this view and you just see the message "No line items found"!
But this is not a commerce_billy_mail.module or commerce_billy.module bug. It's a problem within the entity permission concept, that leads to this.
There are already some discussions about that, which I'd like to mention:
#2138157: sending invoice on "Completing the checkout process" event
http://www.drupalcommerce.org/discussions/976/no-line-items-found-email-...
#1811972: Commerce Line Item Anonymous Access Permissions
#1333174: Line Items missing from email
The solution (at least for my case) was mentioned in this issues: Disabling SQL Query Rewriting for the "Line Items" view. For example look here: https://drupal.org/comment/6063012#comment-6063012
The main problem is being discussed here and I think it's related:
#2155713: commerce_entity_access_query_alter can add crazy conditions if the base table does not match the entity type
| Comment | File | Size | Author |
|---|---|---|---|
| drupal commerce billy no line items found.PNG | 24.86 KB | anybody |
Comments
Comment #1
erlendoos commentedAs a workaround: allow users to view own orders.
Comment #2
shaneonabike commentedCould we add this to the frontpage or README instructions also. I was adjusting some settings to limit anonymous users and it was less than clear that by removing Anonymous folks to view their own orders that this no longer works (even for admins to generate the orders believe it or not)
Comment #3
anybodyPlease check if the problem still exists. It should be solved with this issue from my point of view:
#2155713: commerce_entity_access_query_alter can add crazy conditions if the base table does not match the entity type.
It should not be required to add this to documentation if it works cleanly from core.
Comment #4
aleksijohansson commentedLatest version of Drupal Commerce and Commerce Billy Mail beta3 and the issue is still here. Adding permission for anonymous to view orders of the type solves the issue and the line items are shown on the invoice.
Comment #5
anybodyThanks a lot for your reply. This is not a problem of this module but of Drupal Views and Drupal Commerce.
We can't do anything about it here. Your workaround is correct.
See #1541206: No line items in order for customer for further links and details!