Letterhead (issue?) with new template engine

Folks - Loving the possibility to use CSS bootstrap for the new template engine, great addition!

As I am translating my templates, I am having an issue as in the company letterhead does not display in the new template engines, despite the "letterhead tick box" is marked. In the old templates the letterhead shows without any problems and it disappears when the tick is removed.

I am sure I am missing something obvious here, any suggestions on what I am doing wrong?

Thanks,
Fede
  




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0a18b012-1de9-4c70-bade-ff4b4802d178%40googlegroups.com.

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

Hi Federico,

I suppose you will need to add this in the code:

{%- from "templates/print_formats/standard_macros.html" import add_header -%}


<div class="page-break">
{{ add_header(0, 1, doc, letter_head, no_letterhead) }}

{# rest of your print format #}
</div>

You can have a look at how standard.html is written to get more ideas on how the whole thing works.


-Anand.


On Sat, Aug 30, 2014 at 6:45 AM, Federico Torreti <to...@gmail.com> wrote:
Folks - Loving the possibility to use CSS bootstrap for the new template engine, great addition!

As I am translating my templates, I am having an issue as in the company letterhead does not display in the new template engines, despite the "letterhead tick box" is marked. In the old templates the letterhead shows without any problems and it disappears when the tick is removed.

I am sure I am missing something obvious here, any suggestions on what I am doing wrong?

Thanks,
Fede




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0a18b012-1de9-4c70-bade-ff4b4802d178%40googlegroups.com.

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




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/CAAQzbF25MqWLmiS%2B9CqaWFceSKGffw%3D5jf%3DnAWK%2BHNwQEuRsDw%40mail.gmail.com.

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

This is what I needed.

How do I access the standard template in the hosted environment?
Before it was very easy and straightforward but now the new standard templates seem not to be there?

On Saturday, 30 August 2014 16:32:02 UTC+8, Anand Doshi wrote:
Hi Federico,

I suppose you will need to add this in the code:

{%- from "templates/print_formats/standard_macros.html" import add_header -%}


<div class=“page-break”>
    {{ add_header(0, 1, doc, letter_head, no_letterhead) }}
   
    {# rest of your print format #}
</div>

You can have a look at how standard.html is written to get more ideas on how the whole thing works.


-Anand.


On Sat, Aug 30, 2014 at 6:45 AM, Federico Torreti <to...@gmail.com> wrote:
Folks - Loving the possibility to use CSS bootstrap for the new template engine, great addition!

As I am translating my templates, I am having an issue as in the company letterhead does not display in the new template engines, despite the "letterhead tick box" is marked. In the old templates the letterhead shows without any problems and it disappears when the tick is removed.

I am sure I am missing something obvious here, any suggestions on what I am doing wrong?

Thanks,
Fede
  




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0a18b012-1de9-4c70-bade-ff4b4802d178%40googlegroups.com.

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




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/5abf369d-0827-4496-842e-2611a289ef29%40googlegroups.com.

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

Additionally - Any ideas why the following does not print any of the items in a quotation:

{%- for row in doc.entries -%}
        <tr>
            <td style="width: 3%;">{{ row.idx }}</td>
            <td style="width: 20%;">
                {{ row.item_name }}
                {% if row.item_code != row.item_name -%}
                <br>Item Code: {{ row.item_code}}
                {%- endif %}
            </td>
            <td style="width: 37%;">
                <div style="border: 0px;">{{ row.description }}</div></td>
            <td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.uom or row.stock_uom }}</td>
            <td style="width: 15%; text-align: right;">{{
                row.get_formatted("rate", doc) }}</td>
            <td style="width: 15%; text-align: right;">{{
                row.get_formatted("amount", doc) }}</td>
        </tr>
        {%- endfor -%}




On Saturday, 30 August 2014 17:34:34 UTC+8, Federico Torreti wrote:
This is what I needed.

How do I access the standard template in the hosted environment?
Before it was very easy and straightforward but now the new standard templates seem not to be there?

On Saturday, 30 August 2014 16:32:02 UTC+8, Anand Doshi wrote:
Hi Federico,

I suppose you will need to add this in the code:

{%- from "templates/print_formats/standard_macros.html" import add_header -%}


<div class=“page-break”>
    {{ add_header(0, 1, doc, letter_head, no_letterhead) }}
   
    {# rest of your print format #}
</div>

You can have a look at how standard.html is written to get more ideas on how the whole thing works.


-Anand.


On Sat, Aug 30, 2014 at 6:45 AM, Federico Torreti <to...@gmail.com> wrote:
Folks - Loving the possibility to use CSS bootstrap for the new template engine, great addition!

As I am translating my templates, I am having an issue as in the company letterhead does not display in the new template engines, despite the "letterhead tick box" is marked. In the old templates the letterhead shows without any problems and it disappears when the tick is removed.

I am sure I am missing something obvious here, any suggestions on what I am doing wrong?

Thanks,
Fede
  




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0a18b012-1de9-4c70-bade-ff4b4802d178%40googlegroups.com.

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




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/74ed809c-7b83-4fa2-8754-2d2f8967e57a%40googlegroups.com.

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

Standard.html is complicated and not an obvious candidate of an example for most simple use cases, since it uses a lot of pre-processing.


For your 2nd question, try using:

{%- for row in doc.quotation_details -%}


since the fieldname of "Quotation Item" Table field is "quotation_details". You can find this out from Setup > Customize > Customize Form and selecting Quotation. Maybe, we can standardize this.


You can also use:

{%- for row in doc.get(doc.fname) -%}

We store the Item Table's fieldname in doc.fname, so this should work for most erpnext transactions where both item table and tax table exists in the same form.


-Anand.



On Sat, Aug 30, 2014 at 3:29 PM, Federico Torreti <to…@gmail.com> wrote:

Additionally - Any ideas why the following does not print any of the items in a quotation:

{%- for row in doc.entries -%}
<tr>
<td style="width: 3%;">{{ row.idx }}</td>
<td style="width: 20%;">
{{ row.item_name }}
{% if row.item_code != row.item_name -%}
<br>Item Code: {{ row.item_code}}
{%- endif %}
</td>
<td style="width: 37%;">
<div style="border: 0px;">{{ row.description }}</div></td>
<td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.uom or row.stock_uom }}</td>
<td style="width: 15%; text-align: right;">{{
row.get_formatted("rate", doc) }}</td>
<td style="width: 15%; text-align: right;">{{
row.get_formatted("amount", doc) }}</td>
</tr>
{%- endfor -%}




On Saturday, 30 August 2014 17:34:34 UTC+8, Federico Torreti wrote:

This is what I needed.

How do I access the standard template in the hosted environment?
Before it was very easy and straightforward but now the new standard templates seem not to be there?

On Saturday, 30 August 2014 16:32:02 UTC+8, Anand Doshi wrote:

Hi Federico,

I suppose you will need to add this in the code:


{%- from "templates/print_formats/standard_macros.html" import add_header -%}


<div class="page-break">
{{ add_header(0, 1, doc, letter_head, no_letterhead) }}

{# rest of your print format #}
</div>

You can have a look at how standard.html is written to get more ideas on how the whole thing works.


-Anand.


On Sat, Aug 30, 2014 at 6:45 AM, Federico Torreti <to...@gmail.com> wrote:
Folks - Loving the possibility to use CSS bootstrap for the new template engine, great addition!

As I am translating my templates, I am having an issue as in the company letterhead does not display in the new template engines, despite the "letterhead tick box" is marked. In the old templates the letterhead shows without any problems and it disappears when the tick is removed.

I am sure I am missing something obvious here, any suggestions on what I am doing wrong?

Thanks,
Fede




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0a18b012-1de9-4c70-bade-ff4b4802d178%40googlegroups.com.

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




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/74ed809c-7b83-4fa2-8754-2d2f8967e57a%40googlegroups.com.

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



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/CAAQzbF0zC8oSm9oj%3DySezokgWBWU9Yx8-5EZHVf7D-fNMx%2BkkQ%40mail.gmail.com.

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