Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    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
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

Get image of warehouse in qweb report + display shipping and billing address

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
invoicedatabaseqwebmodelsreport
2 Відповіді
4719 Переглядів
Аватар
T. Gundacker

Hello odoo Family,



I am really new to odoo and qweb but I have to modify the standard account.invoice report for our company. I am familiar with HTML, so qweb itself is not a problem, however I really struggle with implementing additional data to the report. We use odoo version 9.0e.


This is my situation:

We have several warehouses in odoo. Each of them has a unique image (logo) attached to it's address (res.partner?). This logo should also appear in the account.invoice report when the products of that report are linked to that specific warehouse.

I think I'm doing something terribly wrong here, but this what I have so far:

<img t-if="o.invoice_line_ids[0].product_id.warehouse_id.partner_id.image" t-att-src="'data:image/png;base64,%s' % o.invoice_line_ids[0].product_id.warehouse_id.partner_id.image" align="right" style="max-height: 20px;"/>I don't think that I can load the stock model that easily in qweb's account.invoice model? I am only using the first product of the report to identify the warehouse because this always works in our environment.

So my initial question here is:

How can I get the image of the warehouse of the first product in the report?




The second thing is the following:

How can I get the shipping address and the billing address of the specific order. Everything I tried din't work out as expected and I get despaired of this more and more...


Best reagards,


Timo

0
Аватар
Відмінити
Аватар
Art
Найкраща відповідь

I'm using v10 and currently working on creating account_invoice report. Regarding your 2nd question here is a piece of code that puts billing address in my report:

<div class="col-xs-6">        							
    <strong>Billing Address:</strong>
    <div t-if="o.partner_id.parent_id">
        <span t-field="o.partner_id.parent_id"/>
    </div>
    <div t-field="o.partner_id.name"/>
    <div t-field="o.partner_id.street"/>
    <div t-field="o.partner_id.street2"/>  
    <div>
        <span t-field="o.partner_id.city"/><span t-if="o.partner_id.state_id.code">, </span><span t-field="o.partner_id.state_id.code"/> <span t-field="o.partner_id.zip"/>
    </div>
    <div t-if="o.partner_id.country_id.code != 'US'">
        <span t-field="o.partner_id.country_id"/> </div>
    <div t-field="o.partner_id.vat"/>
</div>

it takes address from 'res.partner' form.

But I'm having a problem with the shipping address. For some reason it puts exactly the same info as in Billing address. So my billing address = shipping address now.

However, here is a code that works for the shipping address in v8:

<div class="col-xs-6" t-if="o.address_shipping_id">							
    <strong>Shipped Address:</strong>
    <div t-if="o.address_shipping_id.parent_id">
        <span t-field="o.address_shipping_id.parent_id"/>
    </div>
    <div t-field="o.address_shipping_id.name"/>
    <div t-field="o.address_shipping_id.street"/>
    <div t-field="o.address_shipping_id.street2"/>  
    <div>
        <span t-field="o.address_shipping_id.city"/><span t-if="o.address_shipping_id.state_id.code">, </span><span t-field="o.address_shipping_id.state_id.code"/> <span t-field="o.address_shipping_id.zip"/>
    </div>
    <div t-if="o.address_shipping_id.country_id.code != 'US'">
        <span t-field="o.address_shipping_id.country_id"/>
    </div>
</div>

 double check the IDs, because 'address_shipping_id' doesn't exist in v10 and I'm not sure if it does in v9.

Hope it'll help.

1
Аватар
Відмінити
Аватар
T. Gundacker
Автор Найкраща відповідь

To be honest I can't find a customer invoice form, I guess you mean the account.invoice form. There doesn't appear anything at all unfortunately :-(.


I am really confused right now...


Best regards,

Timo

0
Аватар
Відмінити
Art

I created a custom module just to create this report. For my shipping address I used 'partner_shipping_id', which I guess exists in v9.

<div t-field="o.partner_shipping_id.name"/>

<div t-field="o.partner_shipping_id.street"/>

<div t-field="o.partner_shipping_id.street2"/>

<div t-field="o.partner_shipping_id.street3"/>

<div>

<span t-field="o.partner_shipping_id.city"/><span t-if="o.partner_shipping_id.state_id.code">, </span><span t-field="o.partner_shipping_id.state_id.code"/> <span t-field="o.partner_shipping_id.zip"/>

</div>

But still my both addresses are the same on the report. I think I'm using wrong IDs.

What exactly you don't know how? How to add shipping address to your report or create a module?

Art

So to make things work I went to Sales->Configuration->Settings and in Quotation and Sales I switched from Invoicing and shipping addresses are always the same (Example: services companies) to Display 3 fields on sales orders: customer, invoice address, delivery address

Art

After you made those changes in the sales settings it added a "Delivery Address" to Customer Invoice form. Hover over that field in the developer mode and look at its id. What does it show?

Art

@T. Gundacker, in v10 you can get to this form in several ways: 1) Accounting module -> Sales menu -> Customer invoices -> Create new; 2) in developer mode in the drop-down box click on Open View then in the search box type in "account.invoice.form" and you will see the list of views, click on the one with the "account.invoice_form" external ID and it will open this form for you. After that you'll be able to see the id of "Delivery Address" field.

I'm sure in v9 it's pretty similar.

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

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Invoice on basic layout
pdf invoice qweb report
Аватар
0
квіт. 24
2646
how to get passed values from qweb report
invoice xml qweb report
Аватар
Аватар
1
серп. 23
7482
How do I replace the <div class="page"> on the Odoo built-in invoice PDF template in Odoo v8? Вирішено
invoice qweb report customise
Аватар
Аватар
2
квіт. 18
20361
QWEB REPORTING : Create a module to replace the invoice report Вирішено
invoice module qweb report
Аватар
Аватар
Аватар
Аватар
Аватар
4
серп. 17
23015
Print picking reference/movement order in invoice
invoice qweb picking report
Аватар
Аватар
1
жовт. 15
7751
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція 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