Partner Show Address context for name_get

1.3k views Asked by At

I need to display the full address of a partner in a sale order for partner_invoice_id and partner_shipping_id

I have added show_address:1 in context and options='{"always_reload": True} like this

<field name="partner_invoice_id" 
         groups="sale.group_delivery_invoice_address" 
        context="{'default_type':'invoice', 'show_address': 1}"   
        options="{'always_reload': True}" />

<field name="partner_shipping_id"  
       context="{'default_type':'delivery', 'show_address': 1}"  
       on_change="onchange_delivery_id(company_id, partner_id, partner_shipping_id, fiscal_position)" 
       groups="sale.group_delivery_invoice_address" 
       options="{'always_reload': True}" />

but if I debug the name_get for this twice fields the context is {'lang': u'fr_FR', 'tz': u'Europe/Madrid', 'uid': 1} and so the full address is not displayed

I not understand why the context is not good

Cordially

1

There are 1 answers

2
DASADIYA CHAITANYA On

Just you can try from below way again and try to upgrade the module from your database and check the output from the screen.

<field name="partner_invoice_id" 
         groups="sale.group_delivery_invoice_address" 
        context="{'default_type':'invoice', 'show_address': 1}"   
       options="{&quot;always_reload&quot;: True}" />

<field name="partner_shipping_id"  
       context="{'default_type':'delivery', 'show_address': 1}"  
       on_change="onchange_delivery_id(company_id, partner_id, partner_shipping_id, fiscal_position)" 
       groups="sale.group_delivery_invoice_address" 
       options="{&quot;always_reload&quot;: True}" />

I hope this should helpful for you ..:)