Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

v16 : show_address doesn't works with invoice partner

Avatar
odoo
Avatar
Discard
4 Answers
0
Avatar
odoo
Best Answer

HI,

Most probably you are not using the latest source code of odoo 16, that's why you are getting this issue.

Please update the source code, it will resolve the issue. 
As there is multiple partner_invoice_id field in the form view, both the fields should have the groups (one with !)  attribute, which was initially missing and later added.

Thanks

7 Comments
Avatar
Discard
Avatar
odoo
-

Hi Niyas,
Forgot to indicate that i'm using odoo.sh also i'm on the latest version of Odoo 16

Avatar
odoo
-

okay, then please upgrade the account module in your db and it will be okay

Avatar
odoo
-

Always the same problem after updated account module

Avatar
odoo
-

unfortunately you have to cross check the issue further more, as it is working fine with @Waleed in his local, it is expected to work for you.

Do the following checks:
* is the version settings is kept to latest of 16 in the odoo sh settings ?
* make sure the account module is upgrade (technical name: account, ie INvoicing app)
* there will be two partner_invoice_id field in the form view, ensure both the field has groups attributes set ?

Avatar
odoo
-

I checked these 3 points again and everything is ok but the problem is still there.
I did this on an instance without customization directly in the source view.
I did the same things in another instance with customization in an inherited view, same problem
I do not understand anything.

Avatar
odoo
-

I have updated my answer.

Avatar
odoo
-

Thank you for your help Niyas
I would never found the problem without

0
Avatar
odoo
Best Answer

For the record, since the above answers are an utter mess....

The issue with "show_address : 1" not working is caused by the following:

1. You need to add widget="res_partner_many2one" to the field tag

2. You need to add options="{'always_reload': True}"

Doing those two things should resolve the issue :)

Avatar
Discard
0
Avatar
odoo
Best Answer

I have tried the below xml in original view and its working but it showing the address after saving the record:


<field name="partner_invoice_id" 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}" options="{&quot;always_reload&quot;: True}"/>


The customer field shows the address once the partner changed and I think this cause because of change_default in python field definition. 

Results


The partner_invoice_id field in sale order sheet restricted to users which have "Delivery Address" group so you need to add this group to your current logged in user to be able to see it the address details.

Avatar
Discard
0
Avatar
odoo
Best Answer

Hi Waleed,

I copied and pasted your code but it still doesn't work. For me too, the delivery addresses is only displayed after saving the record but still nothing for the billing address.


Don't understand why.

Yet I am on a new instance without customization

6 Comments
Avatar
Discard
Avatar
odoo
-

Make sure you have street, street2, city and country is set for the billing address

Avatar
odoo
-

Where can i set billing address format ?

Avatar
odoo
-

I mean you need to check the billing address contact in Contacts App and make sure the street, street2, city and country is not empty.

Avatar
odoo
-

I had not added a billing address to my contact.
So I added it but it still doesn't work if I select the invoice address in the partner_invoice_id field

Avatar
odoo
-

You need to check if you have inherited view override this field

Avatar
odoo
-

I have the same result whether I modify the source view or override it with an inherited view