Перейти к содержимому
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 change the report type from pdf to html in code

Подписаться

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

Этот вопрос был отмечен
invoicereports
8 Ответы
12093 Представления
Аватар
Sameer Ahmad

Hi,

In the accounting app under the customers and in the invoice section, i want to print invoices but the challenge is that when i click on print, it directly downloads the report(PDF) but i want to show the preview first and then download if needed. I know this can be achieved by changing the report type to html from pdf in UI but i want to make code level changes to achieve this and I tried changing the report type to qweb-html from qweb-pdf  in the report_invoice.xml file but it didn't have any effect and now i'm stuck and confused what to do and where to start. Any guidance or help is  appreciated.

Thank you!

0
Аватар
Отменить
OdooBot
Hi,
My karma wont allow commenting but yeah I've tried changing it to qweb-html from qweb-pdf and also upgraded the appropriate app but no luck. The reports are still in pdf and didn't get changed to html

Cheers,
Sameer Ahmad.


On Wednesday, 27 February, 2019, 1:02:27 pm IST, Cybrosys Techno Solutions Pvt.Ltd <odoo@cybrosys.com> wrote:


View Forum Post Odoo S.A.

A new question How to change the report type from pdf to html in code on Help has been posted. Click here to access the question :

See question


Sent by Odoo S.A. using Odoo.

Cybrosys Techno Solutions Pvt.Ltd

Can you check in a fresh database and see. Might be some custom code, creates the issue

Sameer Ahmad
Автор

Hi Cybrosys,

As I'm building a custom app, I've tried the solution given by Mitul and it worked just fine :) but i'm still confused as to why your approach and very similar to your approach was my approach didn't work

Cybrosys Techno Solutions Pvt.Ltd

Nice to hear that you got a solution, so you have tried in the custom code, not inside the default code? we just thought you have edited the core and checked. Anyway, you have got a solution. :)

Sameer Ahmad
Автор

I firstly tried in custom code then when it didn't work i went back and tried in base code to verify whether my approach was right or not. Then when the base code version also didn't give out any result i thought my approach was wrong and approached the forums.

I have just started learning odoo and still at the very beginning stages and i'm glad to see your prompt answers whenever i post a question in the forum. Please keep up this good work and guide novices like us :) A million thanks from newbie's like me

Аватар
Mitul Shingala
Лучший ответ

hello 

try like below code into your module for changing the report type .

<record id="account.account_invoices" model="ir.actions.report">
        <field name="report_type" eval="'qweb-html'"/>
    </record>
2
Аватар
Отменить
Аватар
Cybrosys Techno Solutions Pvt.Ltd
Лучший ответ

Hi,

What you have done is the right way, to change the PDF to HTML as you have told you can do it either from the front end or from the backend. While doing it from the backend what we have to do is to change the qweb-pdf to qweb-html


Make sure that you have upgraded the correct module. In the case of accounting report upgrade the module with name Invoicing(technical name account)

After upgrading the module after the changes in the code,


Type is changed to the HTML. In your case check the report tag is not rewritten in other places and the file contains have no noupdate="1"

Thanks


2
Аватар
Отменить
Аватар
Se
Лучший ответ

good community (Y)

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

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

Регистрация
Похожие посты Ответы Просмотры Активность
Invoice pdf report from API endpoint is not getting
invoice reports
Аватар
Аватар
1
сент. 24
3081
Customer Details on the left Решено
invoice reports v17
Аватар
Аватар
2
апр. 24
2571
Odoo 16. Report same report has two different faces.
invoice reports odoo16features
Аватар
Аватар
1
дек. 23
2640
Strip string from a field with defined separator in invoice report
invoice custom reports
Аватар
0
мар. 22
2
Override account_invoices report to use different template Решено
invoice templates reports
Аватар
Аватар
2
июн. 20
6670
Сообщество
  • Видео уроки
  • Документация
  • Форум
Открытый исходный код
  • Скачать
  • 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