Перейти к содержимому
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
Об этом форуме
Помощь

How to get pdf file while printing report in odoo 10?

Подписаться

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

Этот вопрос был отмечен
reportodoo
8932 Представления
Аватар
KLN

I have used this code but not working returning empty PDF file in odoo 10

result = self.env['report'].sudo().get_pdf([order.id], 'equipment_management.report_gatepass')



full report template xml code:



<?xml version="1.0" encoding="utf-8"?>
  <openerp>
    <data>
      <report id="equipment_action"
          model="calibration.details"
          string="Gatepass "
          report_type="qweb-pdf"
          name="equipment_management.report_gatepass"
          file="equipment_management.report_gatepass"
          />

      <record id="paperformats" model="report.paperformat">
          <field name="name">European A4 low margins</field>
          <field name="default" eval="True" />
          <field name="format">A4</field>
          <field name="page_height">0</field>
          <field name="page_width">0</field>
          <field name="orientation">Portrait</field>
          <field name="margin_top">20</field>
          <field name="margin_bottom">20</field>
          <field name="margin_left">20</field>
          <field name="margin_right">20</field>
          <field name="header_line" eval="False" />
          <field name="header_spacing">10</field>
          <field name="dpi">90</field>
      </record>

      <record id="equipment_management.equipment_action" model="ir.actions.report.xml">
          <field name="paperformat_id" ref="equipment_management.paperformats" />
      </record>
      <template id="report_gatepass">
          <t t-call="report.html_container">
          <t t-set="counter" t-value="001"/>
            <t t-foreach="docs" t-as="o">
                <div class="page">
                    <style>
                        .box{
                        background: black;
                        max-width: 250px;
                        text-align:center;
                        color:white;}
                    </style>
                    <div class="row">
                        <table width="100%" cellpadding="0px" cellspacing="0px" style="border:1px solid black">
                            <tr style="border-bottom:1px solid black">
                                <td width="20%" valign="top" align="center" padding="15px">
                                    <img t-att-src="'data:image/png;base64,%s' % res_company.logo" height="100px" width="90px" />
                                </td>
                                <td width= "80%">
                                    <div style="font-size:18px;"><center><b><t t-if="res_company.name" t-esc="res_company.name"/></b></center></div>
                                    <div style="font-size:12px;"><center><t t-if="res_company.rml_header1" t-esc="res_company.rml_header1"/></center></div>
                                    <div style="font-size:12px"><center><t t-if="res_company.street" t-esc ="res_company.street"/>  <t t-if="res_company.street2" t-esc ="res_company.street2"/>  <t t-if="res_company.state_id" t-esc ="res_company.state_id.name"/>  <t t-if="res_company.country_id" t-esc ="res_company.country_id.name"/></center></div>
                                    <div style="font-size:12px"><center>Tel No.<t t-if="res_company.phone" t-esc ="res_company.phone"/>,  Fax<t t-if="res_company.fax" t-esc ="res_company.fax"/>,  Email <t t-if="res_company.email" t-esc ="res_company.email"/>,  Website <t t-if="res_company.website" t-esc ="res_company.website"/></center></div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" width="100%" style="font-size:24px"><center><div class="box"><strong>GATEPASS</strong></div></center></td>
                            </tr>
                            <tr style="border-bottom:1px solid black">
                                <td colspan="2" width="100%" style="font-size:14px"><center><strong>(NIWE-Returnable Material)</strong></center></td>
                            </tr>
                            <tr style="border-bottom:1px solid black">
                                <td colspan="2">
                                    <table width="100%" cellpadding="0px" cellspacing="0px">
                                        <tr>
                                            <td width="25%" style="font-size:14px;line-height:300%;"><center><strong>Reference No.:</strong></center></td>
                                            <td width="25%" style="font-size:14px;line-height:300%;text-align:left;"><strong><t t-esc="o.name"/></strong></td>
                                            <td width="25%" style="font-size:14px;line-height:300%;"><center><strong>Date:</strong></center></td>
                                            <td width="25%" style="font-size:14px;line-height:300%;text-align:left"><strong><span t-field="o.date" t-field-options='{"format": "dd-MM-y"}'/></strong></td>
                                        </tr>
                                    </table>
                                </td>  
                            </tr>
                            <tr style="border-bottom:1px solid black">
                                <td colspan="2">
                                    <table width="100%" cellpadding="0px" cellspacing="0px" style="font-size:12px">
                                        <tr style="border-bottom:1px solid black;height:50px;">
                                            <td width="5%" style="text-align:center;border-right:1px solid black">1</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">Name and Designation of the Person taking the Material</td>
                                            <td width="42%" style="padding-left:5px"><t t-if="o.responsible_person.name" t-esc="o.responsible_person.name"/></td>
                                        </tr>
                                        <tr style="border-bottom:1px solid black;height:60px;">                                        
                                            <td width="5%" style="text-align:center;border-right:1px solid black">2</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">Address of supplier taking material out of NIWE Campus(with phone No.)</td>
                                            <td width="42%" style="padding-left:5px">
                                            <div style="font-size:12px"><t t-if="o.responsible_person.street" t-esc ="o.responsible_person.street"/></div>
                                            <div><t t-if="o.responsible_person.street2" t-esc ="o.responsible_person.street2"/></div>
                                            <div><t t-if="o.responsible_person.state_id" t-esc ="o.responsible_person.state_id.name"/> </div>
                                            <div><t t-if="o.responsible_person.country_id" t-esc ="o.responsible_person.country_id.name"/></div>
                                            <div style="font-size:12px"><t t-if="o.responsible_person.phone" t-esc ="o.responsible_person.phone"/></div>
                                            <div><t t-if="o.responsible_person.mobile" t-esc ="o.responsible_person.mobile"/></div>
                                            </td>
                                        </tr>
                                        <tr style="border-bottom:1px solid black;height:60px;">
                                            <td width="5%" style="text-align:center;border-right:1px solid black">3</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">Description of items with its serial Number and Quantity etc.,</td>
                                            <td width="42%" style="padding-left:5px">
                                                <div><b>Name:</b><t t-if="o.instrument.name" t-esc="o.instrument.name"/></div>
                                                <div><b>Serial No:</b><t t-if="o.serial" t-esc="o.serial"/></div>
                                                <div><b>Description:</b><t t-if="o.instrument.description" t-esc="o.instrument.description"/></div>
                                            </td>
                                        </tr>
                                        <tr style="border-bottom:1px solid black;height:60px;">
                                            <td width="5%" style="text-align:center;border-right:1px solid black">4</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">Purpose for which the Material(s) in/are being taken out</td>
                                            <td width="42%" style="padding-left:5px"><t t-if="o.purpose" t-esc="o.purpose"/></td>
                                        </tr>
                                        <tr style="border-bottom:1px solid black;height:60px;">
                                            <td width="5%" style="text-align:center;border-right:1px solid black">5</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">Probable date of return of Material if any</td>
                                            <td width="42%" style="padding-left:5px"><t t-if="o.date_of_return"><span t-field="o.date_of_return" t-field-options='{"format": "dd-MM-y"}'/></t></td>
                                        </tr>
                                        <tr style="border-bottom:1px solid black;height:60px;">
                                            <td width="5%" style="text-align:center;border-right:1px solid black">6</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">NIWE-officer responsible for inspection Returning the Material</td>
                                            <td width="42%" style="padding-left:5px"><t t-if="o.officer.name" t-esc="o.officer.name"/></td>
                                        </tr>
                                        <tr style="height:60px;">
                                            <td width="5%" style="text-align:center;border-right:1px solid black">7</td>
                                            <td width="53%" style="padding-left:5px;border-right:1px solid black">Any other Informations</td>
                                            <td width="42%" style="padding-left:5px"><t t-if="o.other_info" t-esc="o.other_info"/></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <table style="font-size:12px" width="100%">
                            <tr>
                                <br/><br/><br/><br/>
                            </tr>
                            <tr>
                                <td width="35%" style="text-align:left"><span><div>Signature of the person taking the</div>
                                <div>Material out NIWE Campus</div></span></td>
                                <td width="35%"><span><div>Signature of the Officer/Material</div><div style="text-align:center">Indenter</div></span></td>
                                <td width="30%" style="text-align:right">Signature of Head/Project Leader</td>
                            </tr>
                        </table>
                        <table style="font-size:12px" width="100%">
                            <tr>
                                <br/><br/><br/><br/>
                            </tr>
                            <tr>
                                <td width="50%" style="text-align:left">Authorized Signatory</td>
                                <td width="50%" style="text-align:right"><span>Signature of Security Officer/Security
                                <div>Guard on duty in NIWE</div></span></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </t>
          </t>
      </template>
</data>
</openerp>

0
Аватар
Отменить
Pravitha

can you post the python function you wrote to invoke the call to print report

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

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

Регистрация
Похожие посты Ответы Просмотры Активность
How can I create and save a report in the attachments?
report odoo
Аватар
0
сент. 24
2566
Odoo Report - getting currently singular active ID
report odoo
Аватар
0
мар. 18
4371
Problem of printing odoo reports in a VPS Решено
report odoo
Аватар
1
нояб. 16
3884
How to make a button print with two choices in odoo
report odoo
Аватар
Аватар
1
янв. 16
5168
How to call report from button (Odoo) Решено
report odoo
Аватар
Аватар
1
окт. 15
18686
Сообщество
  • Видео уроки
  • Документация
  • Форум
Открытый исходный код
  • Скачать
  • 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