Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Shipping address on the purchase order report

Odoberať

Get notified when there's activity on this post

This question has been flagged
shippingpurchase_orderwharehouse
2 Replies
10472 Zobrazenia
Avatar
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
Avatar
Zrušiť
Avatar
Waleed Ali Mohsen
Best Answer

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
Avatar
Zrušiť
Avatar
Noro
Autor Best Answer

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
Avatar
Zrušiť
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!

Registrácia
Related Posts Replies Zobrazenia Aktivita
How to setup a delivery method in purchase?
purchase shipping purchase_order
Avatar
Avatar
1
aug 17
8603
How can I differ the Billing address and the shipping address for a Purchase order? Solved
purchase shipping purchase_order billing
Avatar
Avatar
Avatar
Avatar
Avatar
5
apr 24
21060
Best way to automatically create and add a product to purchase.order.line ? Solved
product automated shipping purchase_order
Avatar
Avatar
Avatar
3
apr 15
8430
Odoo Default Shipping - Change to rate for Volume
shipping
Avatar
Avatar
1
aug 25
1268
Does anyone know if it's possible to make adding a shipping method/price mandatory?
shipping
Avatar
Avatar
1
júl 25
2035
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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