This question has been flagged
1 Reply
4770 Views

When the document is printed, information about the company is displayed in the footer. I want the city and country to be on the same line. What can be done?

https://prnt\.sc/Dca4YaSkSfB8

I've\ highlighted\ in\ bold\ the\ line\ of\ code\ that\ adds\ company\ information\.

Code:





\ \ \ \ \ \ \ \
" rel="ugc">o.env.context.get('lang')">































Avatar
Discard
Author

I dont know why I cant edit question
Code:
<?xml version="1.0"?>
<t t-name="web.external_layout_clean">
<div t-attf-class="header o_company_#{company.id}_layout" t-att-style="report_header_style">
</div>

<div t-attf-class="article o_report_layout_clean o_company_#{company.id}_layout" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">
<t t-call="web.address_layout"/>
<t t-raw="0"/>
</div>

<div t-attf-class="footer o_clean_footer o_company_#{company.id}_layout">
<div class="row mt8">
<div class="col-5 text-left">
<span class="company_address" t-field="company.partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;], &quot;no_marker&quot;: true}"/>
</div>
</div>
</div>
</t>

Line with company information:
<span class="company_address" t-field="company.partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;], &quot;no_marker&quot;: true}"/>

Move the information from footer and add it inside the header.

Author

Sudhir Arya,
This doesn't answer my question. I don't need to move the information to header. In this code, I deliberately removed it to make it easier to find the desired line.
I need the city and country to be written on the same line. Look at the screenshot - there they are in different lines, but need on the same line prnt.sc/Dca4YaSkSfB8

I didn't answer your question. I simply just gave a comment on your question because I was not sure that my opinion will help :)

======================================
It can be done as Siddharth said but then you will have to do it in multiple country records in your contacts belong to multiple countries. Otherwise, you can replace the <span class="company_address" and display the address in a single row.

Best Answer

Hello Nikita,

You can update format of address for specific country by following below steps :

Activate the debug mode

go to the menu Contacts -> Localization -> countries -> select countries and open the form view.

Under the "Advanced Address Formatting":

Modify the field "Layout in reports" and set your address format like below.

%(street)s 
%(street2)s
%(city)s %(state_code)s %(zip)s %(country_name)s


Avatar
Discard