Перейти к содержимому
Odoo Меню
  • Войти
  • Попробовать бесплатно
  • Модули
    Финансы
    • Бухгалтерия
    • Выставление счетов
    • Расходы
    • Таблицы
    • Документооборот
    • Подпись
    Продажи
    • CRM
    • Продажи
    • POS Магазин
    • POS Ресторан
    • Подписки
    • Аренда
    Вебсайты
    • Конструктор вебсайтов
    • eCommerce
    • Блог
    • Форум
    • Онлайн-чат
    • Электронное обучение
    Логистика
    • Склад
    • Производство
    • PLM
    • Закупки
    • Обслуживание
    • Качество
    Отдел кадров
    • Сотрудники
    • Подбор персонала
    • Отпуска
    • Оценка персонала
    • Реферальная программа
    • Автопарк
    Маркетинг
    • SMM
    • E-mail рассылки
    • СМС рассылки
    • Мероприятия
    • Автоматизация маркетинга
    • Опросы
    Услуги
    • Проекты
    • Табели
    • Выездной сервис
    • Поддержка
    • Планирование
    • Встречи
    Продуктивность
    • Обсуждения
    • Согласование
    • IoT
    • VoIP-телефония
    • Knowledge
    • WhatsApp
    Сторонние приложения Модуль Студия Odoo Платформа Odoo Cloud
  • Индустрии
    Розничная торговля
    • Книжный магазин
    • Магазин одежды
    • Мебельный магазин
    • Продуктовый магазин
    • Строительный магазин
    • Магазин игрушек
    Гостинично-ресторанный бизнес
    • Бар и паб
    • Ресторан
    • Фастфуд
    • Гостевой дом
    • Дистрибьютор напитков
    • Отель
    Недвижимость
    • Агентство недвижимости
    • Архитектурное бюро
    • Строительство
    • Управление недвижимостью
    • Ландшафтный дизайн
    • Товарищество собственников жилья
    Консалтинг
    • Бухгалтерская фирма
    • Партнер Odoo
    • Маркетинговое агентство
    • Юридическая фирма
    • Подбор персонала
    • Аудиторское бюро
    Производство
    • Текстиль
    • Металл
    • Мебель
    • Продукты питания
    • Пивоварня
    • Корпоративные сувениры
    Здоровье и фитнес
    • Спортивный комплекс
    • Магазин оптики
    • Фитнес-клуб
    • Велнес-центр
    • Аптека
    • Салон красоты
    Услуги
    • Специалист по бытовым услугам
    • Продажа и обслуживание IT-оборудования
    • Солнечные энергосистемы
    • Производство обуви
    • Клининг
    • Системы ОВКВ
    Прочее
    • Некоммерческая организация
    • Консалтинг в сфере устойчивого развития
    • Аренда рекламных щитов
    • Бизнес по фотосъемке
    • Прокат велосипедов
    • Реселлер программного обеспечения
    Все индустрии
  • Community
    Обучение
    • Видео уроки
    • Документация
    • Сертификация
    • Тренинг
    • Блог
    • Подкаст
    Образование и развитие
    • Образовательная программа
    • Деловая игра Scale Up!
    • Экскурсия в офис Odoo
    ПО
    • Скачать
    • Сравнить версии
    • Релизы
    Сотрудничество
    • Github
    • Форум
    • Мероприятия
    • Перевод
    • Стать партнером
    • Услуги для партнеров
    • Зарегистрировать бухгалтерскую фирму
    Услуги
    • Найти партнера
    • Найти бухгалтера
    • Встреча с экспертом
    • Услуги по внедрению
    • Отзывы клиентов
    • Поддержка
    • Обновления
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Заказать демонстрацию
  • Цены
  • Поддержка

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

  • CRM
  • e-Commerce
  • Бухгалтерия
  • Склад
  • PoS
  • Проекты
  • MRP
All apps
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Все посты Люди Значки
Теги (Смотреть все)
odoo accounting v14 pos v15
Об этом форуме
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Все посты Люди Значки
Теги (Смотреть все)
odoo accounting v14 pos v15
Об этом форуме
Помощь

Shipping address on the purchase order report

Подписаться

Получайте уведомления о появлении активности в этом посте

Этот вопрос был отмечен
shippingpurchase_orderwharehouse
2 Ответы
10467 Представления
Аватар
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
Аватар
Отменить
Аватар
Waleed Ali Mohsen
Лучший ответ

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
Аватар
Отменить
Аватар
Noro
Автор Лучший ответ

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
Аватар
Отменить
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
Автор

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
Автор

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
Автор

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
Автор

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.

Не оставайтесь в стороне – присоединяйтесь к обсуждению!

Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!

Регистрация
Похожие посты Ответы Просмотры Активность
How to setup a delivery method in purchase?
purchase shipping purchase_order
Аватар
Аватар
1
авг. 17
8599
How can I differ the Billing address and the shipping address for a Purchase order? Решено
purchase shipping purchase_order billing
Аватар
Аватар
Аватар
Аватар
Аватар
5
апр. 24
21054
Best way to automatically create and add a product to purchase.order.line ? Решено
product automated shipping purchase_order
Аватар
Аватар
Аватар
3
апр. 15
8427
Odoo Default Shipping - Change to rate for Volume
shipping
Аватар
Аватар
1
авг. 25
1264
Does anyone know if it's possible to make adding a shipping method/price mandatory?
shipping
Аватар
Аватар
1
июл. 25
2033
Сообщество
  • Видео уроки
  • Документация
  • Форум
Открытый исходный код
  • Скачать
  • Github
  • Runbot
  • Перевод
Услуги
  • Хостинг Odoo.sh
  • Поддержка
  • Обновление
  • Индивидуальные решения по доработке
  • Образование
  • Найти бухгалтера
  • Найти партнера
  • Стать партнером
О нас
  • Наша компания
  • Активы бренда
  • Cвяжитесь с нами
  • Вакансии
  • Мероприятия
  • Подкаст
  • Блог
  • Клиенты
  • Правовые документы • Конфиденциальность
  • Безопасность
الْعَرَبيّة 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 – это набор бизнес-модулей с открытым исходным кодом, который закроет все потребности вашей компании: CRM, E-commerce, Бухгалтерия, Склад, POS, управление проектами и др.

Odoo сочетает в себе простоту использования и полную интеграцию всех бизнес-процессов в одной системе.

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