Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
If you put this in your rml report you get the address including the company name. Is it possible to do it without.
m2tecCompany <--- (not included)
3454 BV BarCity
A customer wants to do this
t.a.v FooFoo de Contact
3454 BV BarCity
I do this the manual way in sales order like this. But then you loose the localisation templates that display_address() provides.
<para style="terp_default_9">[[ (o.partner_id.is_company == False and o.partner_id.parent_id.name) or "" ]] </para>
<para style="terp_default_9">[[ (o.partner_id.is_company == True and o.partner_id.name) or "t.a.v. "]] [[ (o.partner_id.is_company == False and o.partner_id.name) or ""]] </para>
<para style="terp_default_9">[[ o.partner_id.street]]</para> -->
<para style="terp_default_9">[[ o.partner_id.zip]] [[ o.partner_id.city]] </para>
I have found you can change function definition in
def _display_address(self, cr, uid, address, without_company=False, context=None):
def _display_address(self, cr, uid, address, without_company=True, context=None):
I was unable to override the default value in de report like this. Which I would prefer instead of editing the source code. I'am not sure about other consequences of this.
<para style="terp_default_9">[[ display_address(o.partner_id, without_company=True)]]</para>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 6/12/14, 8:56 AM|
|Seen: 1524 times|
|Last updated: 3/16/15, 8:10 AM|