Odooers论坛

欢迎!

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


0

v16 : show_address doesn't works with invoice partner

形象
odoo
形象
丢弃
4 答案
0
形象
odoo
最佳答案

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 注释
形象
丢弃
形象
odoo
-

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

形象
odoo
-

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

形象
odoo
-

Always the same problem after updated account module

形象
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 ?

形象
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.

形象
odoo
-

I have updated my answer.

形象
odoo
-

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

0
形象
odoo
最佳答案

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 :)

形象
丢弃
0
形象
odoo
最佳答案

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.

形象
丢弃
0
形象
odoo
最佳答案

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 注释
形象
丢弃
形象
odoo
-

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

形象
odoo
-

Where can i set billing address format ?

形象
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.

形象
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

形象
odoo
-

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

形象
odoo
-

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