Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Guest House
    • Drankenhandelaar
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Solar Energy Systems
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC Services
    Others
    • Nonprofit Organization
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

How to display columns (street) of partners shipping address in sale order view

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
viewsformviewodoo10
2 Antwoorden
9794 Weergaven
Avatar
SEAN CALLAHAN

I would like to see a street + city of a partner underneath the delivery address selector on a sale order screen. I had another solution where I added a text field to sale.order and a onchange function, but I think theres a better way.


Here is what I have in the view:

<field name="partner_shipping_id">

                                <tree>

                                <field name="street" string="Street"/>

                                </tree>

                            </field>


I have also tried using mode=form but none of these seem to alter the default behavior of showing the delivery address contact name...

0
Avatar
Annuleer
Avatar
Open For Small Business Ltd
Beste antwoord

Rays way is one way, probably best if you are not wanting to write code.  But to make it display like the customer in the above screen shot then you just add the context key "show_address".  If you really wanted it like the above shot and just street and city on one line, then overriding name_get with a new context key say "show_street_city" is a more perfomant and neater way to do it as its all done in one function call.

Otherwise you end up with same issue when you want to do on pickings or invoices for example.

If you look at name_get in res_partner.py it will show you the already existing context keys and how they are formatted, so pretty straightforward.

1
Avatar
Annuleer
SEAN CALLAHAN
Auteur

the show address attribute doesnt show for when sale is in a unsaved state. I want my users to see the address and confirm it with a customer before hitting confirm sale/save

Open For Small Business Ltd

True, thats because the edit widget is only one line tall. You could still set a context key, to display on one line mind you. We just do that, and also make the whole address searchable, but then we got 80,000 delivery addresses, no one is searching by name, always by street or GEO.

Works out quite nice because as they type the address the search list narrows and they can see the address to pick.

SEAN CALLAHAN
Auteur

So you override get_name so that it displays street1+2+city etc, but what if the delivery address and base partner record are the same? How would you see the customer name?

Avatar
Ray Carnes
Beste antwoord

You can create a new field on the sale.order model to contain this data, and add that field to the view:


NEW FIELD:


ADDED TO THE VIEW:



Code for the field calculation:

for record in self:
  record['x_street_city'] = record.partner_shipping_id.street + " " + record.partner_shipping_id.city

0
Avatar
Annuleer
SEAN CALLAHAN
Auteur

this was similar to my first attempt, except I used one of the on change method: I need it to show while the sale is in a draft so that the user can pick a customer and without saving, have it show the delivery address (to confirm with customer before sale is processed). I think there must be a way of showing this without having to add another field though

Asad Asif

Hello,

Thanks for the above.

I am trying to do the some but its giving some error as dependencies is also required.

Can you please let me know what to add in dependencies?

Thanks

Ray Carnes (ray)

partner_shipping_id

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
odoo 10 : form for picking with only one field
views odoo10
Avatar
Avatar
Avatar
2
dec. 19
3649
How to hide fields in the create and edit popup view?
views odoo10
Avatar
0
nov. 18
3811
multiple models in one view (form view inside form view)
views formview
Avatar
Avatar
1
okt. 16
11407
[Odoo 10] what is the best way to duplicate an existing view? Opgelost
views xml odoo10
Avatar
Avatar
Avatar
2
nov. 23
8248
Can't create view (model not found) Opgelost
views models odoo10
Avatar
Avatar
Avatar
2
mei 23
8688
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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