Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Shipping address on the purchase order report

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
shippingpurchase_orderwharehouse
2 Răspunsuri
10470 Vizualizări
Imagine profil
Noro

Hello, 

I would like to solve following problem:

I have 2 warehouses(WH1 and WH2) and to 2 receipts operations in inventory (Mycompany : Receipts WH1 and MyCompnay: receipts WH2).

When Procurement team generates new PO, I would like to have an option which warehouse should receive it. 

I found the dropship option which doesn't solve the problem completely since we have to choose from the all contacts.

Instead I want to have a address of chosen warehouse under the shipping address on the PO.


Can you please give me any hint how to solve it?

My gut tells I have to look around "default_location_dest_id"  variable.


Thanks in advance

BR/

N


------------------------------------------------------

Update:

To sort out my problem, based on the hint given by @Waleed Mohsen, I modified report_purchaseorder_document following way

#This part was here
<t t-if="o.dest_address_id">
<t t-set="information_block">
<strong>Shipping address:</strong>
<div t-if="o.dest_address_id">
<div t-field="o.dest_address_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}" name="purchase_shipping_address"/>
</div>
</t>
</t>

#I added else so then it is not customer address then use the warehouse address:

<t t-else="">
<t t-set="information_block">
<strong>Shipping address:</strong>
<div t-field="o.picking_type_id.warehouse_id.partner_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}"/>
</t>
</t>



1
Imagine profil
Abandonează
Imagine profil
Waleed Ali Mohsen
Cel mai bun răspuns

It's available out of box if you enabled multi warehouses and multi locations.

You already create 2 receipts operations in inventory (Mycompany : Receipts WH1 and MyCompnay: receipts WH2). 

In Mycompany : Receipts WH1  you will set the Default Destination Location to your warehouse e.g WH1/stock.

In Mycompany : Receipts WH2  you will set the Default Destination Location to your warehouse e.g WH2/stock.

Then in ​Requests for Quotation, Deliveries and invoices tab, you will be able to select the operation from Delivery to fields as you can see from the below screenshot:

Delivery To

Update Answer:

By the way shipping address used only for customers.

In Odoo 12, as per help on the field it will only used for drop ship (when you want the vendor to ship to customer) and you said it will not work with you. If you want to purchase for your company so your company address in showing in PO but not as shipping address.

dest_address_id = fields.Many2one('res.partner', string='Drop Ship Address', states=READONLY_STATES,

help="Put an address if you want to deliver directly from the vendor to the customer. "

"Otherwise, keep empty to deliver to your own company.")

Other solution: since you are already configured two receipt operations and already determine the default destination location for each operation and you want to show it in the printed PO, so you can show the Default Destination Location in the report, you have to inherit the purchase order report and show field :

o.picking_type_id.default_location_dest_id.display_name

From this o.picking_type_id.default_location_dest_id you can access all location fields and from it you can get Partner field/whse fields.

This field default_location_dest_id is from stock.location so you can enable developer mode -> settings -> technical -> Database structure -> models and search for stock.location and you will get all fields.

For example, if set the owner in you location so you can get it using partner_id fields and from it you can get the address

o.picking_type_id.default_location_dest_id.partner_id


Hope this will help you.

0
Imagine profil
Abandonează
Imagine profil
Noro
Autor Cel mai bun răspuns

Hi Waleed, 

Thank you for your reply. 

The problem is that actual shipping address is not showing purchase order when I print it.

From the report view there is this code:

<t t-if="o.dest_address_id">
<t t-set="information_block">
<strong>Shipping address:</strong>
<div t-if="o.dest_address_id">
<div t-field="o.dest_address_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}" name="purchase_shipping_address"/>
</div> </t>
</t>

where dest_address_id is false, if I want goods to be delivered in one of my warehouse.

I dig and found following in the "Fields view get": 

<field name="dest_address_id" attrs="{'invisible': [('default_location_dest_id_usage', '!=', 'customer')], 'required': [('default_location_dest_id_usage', '=', 'customer')]}" can_create="true" can_write="true" modifiers="{'invisible':[['default_location_dest_id_usage','!=','customer']],'readonly':[['state','in',['purchase','done','cancel']]],'required':[['default_location_dest_id_usage','=','customer']]}"/>

seems either where should be way to customize it from admin, or I have modify this piece of code. but not sure how i can do it.

p.s. I am sorry I am kind of new here :)


thanks,

N


0
Imagine profil
Abandonează
Waleed Ali Mohsen

You can setup shipping address from vendor screen, open vendor screen and from Contact and Addresses tab press on create button and select shipping address and all data and save it, then when you create a PO and select this vendor the shipping address will be shown on the printed PO as below:

https://i.ibb.co/L1CG7B2/Image-4.png

Noro
Autor

Thanks a lot but it didn't work for me. no idea why.

I setup shipping address in my company contacts and I setup shipping address for the vendor.

When I print PO it shows nothing.

Waleed Ali Mohsen

What the version you are using? from my side I'm using v 11 and I created a new DB and installed purchase app and created a new purchase order and I can see the shipping address for my company without adding any shipping addresses.

Noro
Autor

I am using V12.

searched everything through the internet found nothing...

Waleed Ali Mohsen

By the way shipping address used only for customers.

In Odoo 12, as per help on the field it will only used for drop ship (when you want the vendor to ship to customer) and you said it will not work with you. If you want to purchase for your company so your company address in showing in PO but not as shipping address.

dest_address_id = fields.Many2one('res.partner', string='Drop Ship Address', states=READONLY_STATES,

help="Put an address if you want to deliver directly from the vendor to the customer. "

"Otherwise, keep empty to deliver to your own company.")

Other solution: since you are already configured two receipt operations and already determine the default destination location for each operation and you want to show it in the printed PO, so you can show the Default Destination Location in the report, you have to inherit the purchase order report and show field :

o.picking_type_id.default_location_dest_id.display_name

Noro
Autor

Thanks Mate, this was really helpful. I am almost there :)

Now it shows the name of the stock and I am trying to print physical address of that stock.

any hint where i can find all options available for default_location_dest_id?

thanks a lot

Waleed Ali Mohsen

From this o.picking_type_id.default_location_dest_id you can access all location fields and from it you can get Partner field/whse fields.

This field default_location_dest_id is from stock.location so you can enable developer mode -> settings -> technical -> Database structure -> models and search for stock.location and you will get all fields.

For example, if set the owner in you location so you can get it using partner_id fields and from it you can get the address

o.picking_type_id.default_location_dest_id.partner_id

Noro
Autor

Thanks mate, i just sorted it out

if someone interested this was what I have looking for:

o.picking_type_id.warehouse_id.partner_id

I will mark your previous reply as an answer for me!

Thanks

Waleed Ali Mohsen

You are welcome. I have updated the answer, so if anyone looking for same he will get it easily.

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

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to setup a delivery method in purchase?
purchase shipping purchase_order
Imagine profil
Imagine profil
1
aug. 17
8603
How can I differ the Billing address and the shipping address for a Purchase order? Rezolvat
purchase shipping purchase_order billing
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
apr. 24
21059
Best way to automatically create and add a product to purchase.order.line ? Rezolvat
product automated shipping purchase_order
Imagine profil
Imagine profil
Imagine profil
3
apr. 15
8428
Odoo Default Shipping - Change to rate for Volume
shipping
Imagine profil
Imagine profil
1
aug. 25
1265
Does anyone know if it's possible to make adding a shipping method/price mandatory?
shipping
Imagine profil
Imagine profil
1
iul. 25
2035
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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