Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

v16 : show_address doesn't works with invoice partner

Subscribe

Get notified when there's activity on this post

This question has been flagged
4 Replies
2963 Views
Avatar
"Vincent DUBREIL"

Hello,

i've got a problem with option "show_address"

In the sale order view sale.view_order_form, i want to display partner_shipping_id and partner_invoice_id and display their address.

To display, i deleted the attribute groups and for the address, i added the option "show_address" with the value 1 like on the lines below

It works for shipping address but not for invoice address and i don't understand why?!?

Note : here i modified directly the original view but it is only for the example. I will crearte an inherited view after

Note2 : I deleted the first "


group name="partner_details">


field name="partner_id" widget="res_partner_many2one" context="{'res_partner_search_mode': 'customer', 'show_address': 1, 'show_vat': True}" options="{"always_reload": True}"/>


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


field name="partner_shipping_id" context="{'default_type':'delivery', 'show_address': 1}" options="{"always_reload": True}"/>


/group>


0
Avatar
Discard
Avatar
Niyas Raphy (Walnut Software Solutions)
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

0
Avatar
Discard
"Vincent DUBREIL"
Author

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

Niyas Raphy (Walnut Software Solutions)

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

"Vincent DUBREIL"
Author

Always the same problem after updated account module

Niyas Raphy (Walnut Software Solutions)

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 ?

"Vincent DUBREIL"
Author

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.

Waleed Ali Mohsen

I have updated my answer.

"Vincent DUBREIL"
Author

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

Avatar
Russell Briggs
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 :)

0
Avatar
Discard
Avatar
Waleed Ali Mohsen
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.

0
Avatar
Discard
Avatar
"Vincent DUBREIL"
Author 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

0
Avatar
Discard
Waleed Ali Mohsen

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

"Vincent DUBREIL"
Author

Where can i set billing address format ?

Waleed Ali Mohsen

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.

"Vincent DUBREIL"
Author

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

Waleed Ali Mohsen

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

"Vincent DUBREIL"
Author

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

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now