跳至内容
Odoo 菜单
  • 登录
  • 免费试用
  • 应用程序
    财务
    • 会计
    • 发票
    • 费用
    • 电子表格 (BI)
    • 文档
    • 电子签名
    销售
    • 客户关系管理
    • 销售
    • POS 销售点管理-零售
    • POS 销售点管理 - 餐厅
    • 订阅
    • 租赁
    网站
    • 网站设计
    • 电子商务
    • 博客
    • 论坛
    • 在线客服
    • 在线学习
    供应链
    • 库存
    • 制造
    • 产品生命周期
    • 采购
    • 维护保养
    • 品控
    人力资源
    • 员工
    • 招聘
    • 休假
    • 评价
    • 内部推荐
    • 车队
    营销
    • 社媒营销
    • 电邮营销
    • 短信营销
    • 近期活动
    • 营销自动化
    • 网上调查
    服务
    • 项目管理
    • 工时单
    • 现场服务
    • 服务台
    • 排期
    • 预约
    生产力
    • 讨论
    • 批核
    • IoT物联网
    • VoIP
    • 知识库
    • WhatsApp
    第三方应用软件 Odoo 定制 Odoo云端平台
  • 行业
    零售
    • 书店
    • 服装店
    • 家具店
    • 食品杂货店
    • 五金店
    • 玩具店
    餐饮与酒店服务
    • 酒吧及酒馆
    • 餐厅
    • 快餐
    • 民宿
    • 饮品分销商
    • 酒店
    房地产
    • 房地产代理
    • 建筑师事务所
    • 建造业
    • 地产管理
    • 园艺
    • 业主协会
    咨询
    • 会计师事务所
    • Odoo合作伙伴
    • 市场推广公司
    • 律师事务所
    • 人才招聘
    • 审核 & 认证
    制造
    • 纺织
    • 金属
    • 家具
    • 食品
    • 啤酒厂
    • 企业礼品
    保健与健身
    • 体育俱乐部
    • 眼镜店
    • 健身中心
    • 健康从业者
    • 药房
    • 发型屋
    商贸服务
    • 维修人员
    • IT 硬件及支持
    • 太阳能系统
    • 鞋匠
    • 清洁服务
    • 暖通空调服务
    其他
    • 非营利组织
    • 环境机构
    • 广告牌租赁
    • 摄影服务
    • 自行车租赁
    • 软件经销商
    浏览所有行业
  • 社区
    学习
    • 教学视频
    • 文档
    • 认证
    • 培训
    • 博客
    • 播客
    赋能教育
    • 教育计划
    • 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:

  • 客户关系管理
  • e-Commerce
  • 会计
  • 库存
  • PoS
  • 项目
  • MRP
All apps
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
帮助

Is there any way to preview WebKit report layout while coding (maybe WYSIWYG Editor)?

订阅

此帖文有活动时,接收通知

此问题已终结
layoutwebkitpreviewwysiwyg
22 回复
45064 查看
形象
NSC

I consider to play with WebKit Reporting once again. What is really cumbersome with Reporting in general, is layouting. Therefore, the choice of my next reporting engine would depend on the availability of a graphical layout editor. It is not important, if all the report can be built with it, but for quicker and more comfortable layouting a layout preview is strongly required.

Up to now, I use ReportLab with OpenOffice Report Designer. Report Designer I only use for layout purposes - all the rest I do by directy working with the code, i. e. I build my layout with Report Designer, export it as .rml and push the latter to the directory of my custom report module. I would like to continue with this procedure using WebKit as Reporting Engine. I need not know how to set it up in OpenERP, but if there is any possibility of coding with layout preview.

9
形象
丢弃
形象
Fabrice Henrion (fhe)
最佳答案

Are you aware that the latest version of Odoo comes with a QWeb report engine that allows WYSIWYG edition just like for the CMS website builder? It sounds like this is what you are looking for. Create an Odoo Online account and check it out.

Here is how to test it (you must be on v7-SaaS4 or later so I recommend to try it on Odoo Online):

  1. First you have to know that the new QWeb engine allows to output PDF or HTML. It is only when the output is HTML that it can be modified in a WYSIWYG fashion.
  2. Let's assume the Sales module is installed on a fresh Odoo instance. By default, the output of a quotation document is PDF, you can test that by printing a quotation. We want to change this.
  3. Make sure your user has the technical feature checkbox checked and the 'website' module installed. Then go to Settings > Technical > Reports > Reports, then search "sale.order" and enter the record.
  4. Edit the Report Type from PDF to HTML, then Save.
  5. Go back to the Sales app and print a quotation.
  6. A popup appear (or your popup-blocker will notify you). You will see the quotation in that popup and a black bar at the top with the Edit button. You need to make sure you have the access right to edit this so I recommend you do this test as an admin.
  7. From there, it's pretty straightforward. You edit whatever you want. You have to realize that there are 2 types of edition on a record like this: editing this particular record, or editing the quotation template which will have an impact on all records. For example, if you edit a header, it will be a template edition.
13
形象
丢弃
Fabien Pinckaers (fp)

For Customize top menu, you can also use the HTML editor directly.

Luke Branch

Hi Fabrice, Thank you, this is exactly what I was looking for and has allowed me to add images to order lines and customise any report easily just using basic HTML/QWeb. This makes customisation extremely easy in v8.

Yenthe Van Ginneken (Mainframe Monkey)

Sadly this does not work in Odoo 8 (Version 9.0 Alpha 1). You will get an internal error, Internal Server Error "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

Infosis SpA

Does'nt work, the edit button comes up disable, it's there some workaround

Pascal de Clarens

Hi, Your solution seems exactly what i am looking for. Unfortunatly, after changind the pdf to html, when I print a quotation I get this error message: Uncaught SyntaxError: Unexpected end of input https://adret.odoo.com/web?#id=4&view_type=form&model=sale.order&menu_id=304&action=378:0 What did I miss? Thanks for your help

XaRz

Thanks for this. I was began to think that odoo has released de 8 version in early dev stage. This is a great great improvement. Thank you for taking your time to explain this. Regards PS: As GrupoCiTEC has mentioned you need to have the Web Designer module to be able to edit the html. Perhaps editing your answer would be great.

E.R. Spada

Hello Fabrice, I just pulled the latest v8 and the instructions that you provided do not work, nothing happens and nothing is noted in the log, I can get to a report by using the url e.g.http://localhost:8069/report/html/account.report_invoice/1 but not from the print menu? Is this still in development? TX ER

E.R. Spada

Sorry, I could see the pop-up blocker on saas, but was not notified on my local browser.... ER

Randy Risser

This does not seem to work anymore in v12 up. Is there a new way to go about this?

形象
GrupoCITEC
最佳答案

Hi, just to add that you need to have the 'website' module installed in order to see the EDIT button in the rendered html report

6
形象
丢弃
XaRz

ty! Great tip!

Damodar D.

Almost 5 hours lost before found this mandatory tip, thanks!

形象
Stefan Joachim
最佳答案

Hi,

I tried to change the layout (move boxes and delete lines), but I'm only able to delete text.
I use the odoo "Version 8.0" installed while using the script:
https://github.com/aschenkels-ictstudio/openerp-install-scripts/blob/master/odoo-v8/ubuntu-14-04/odoo_install.sh

Example, I try to move the customer address from right page site to the left. But I'm not able to do that. I see the "edit" button, and I see in the pull down menu "customize content".

My question, How can I change the layout totally free for printing a pdf report, in this case a invoice? Is ther a complete How to for beginners? I'm not a developer :-) But I'm able to edit HTML and CSS.

Thanks a lot for help

Stefan

 

2
形象
丢弃
形象
Annette Schoepgens
最佳答案

HI,

can it be, that this function is not given correctly at the latest Odoo v9 ?

I can change the report print view from PDF  to HTML and open the report. Then it's possible to change some text, but i cannot move/delete/add snippets on this report like website builder.

The left toolbar (from websuite builder) just pop in for a 1/10 second and then pop out. No change to become back the toolbar.

I've seen this on a youtube video and i think thats a great tool to edit the reports.

Thank you

Marco

0
形象
丢弃
形象
Tankgirl
最佳答案

As we are discussing the layout of the reports here, I want to ask my question here.
Is there a way (a WYSIWYG way) to edit external_layout_footer and external_layout_header?

I have tried editing it inside a report (with the way explained here) , but when I save it, the header becomes totally different. I don't think this is the right way to edit this.

I know how to edit the header and footer in code mode by the way.

0
形象
丢弃
形象
Thomas Fossoul
最佳答案

Hi,

Do you know if this is possible to edit localy the document when you are on the html editor then save it as pdf ?  

So i need to have the normal template of the sale order (for instance) then i would like edit it just before sending it to the customer (or save it as pdf) without edit the template used each time a generate a sale order...

 

 

 

0
形象
丢弃
形象
NSC
编写者 最佳答案

Fabrice, I have just tried what you told, popup opens, but without any toolbar or edit button... What am I doing wrong? I am logged in as admin user and report to print is set to html...

0
形象
丢弃
XaRz

You need to install the web designer module! :)

形象
Torvald Baade Bringsvor
最佳答案

Has there been some change here in the latest 8.0rc1 branch? The edit button comes up disabled here...

0
形象
丢弃
形象
NSC
编写者 最佳答案

Thank you very much, Fabrice! This helps me very much to estimate how to proceed!

At the moment, I have a custom module with 3 different customized rml report templates inside. As I use OpenERP/Odoo Community Version and have some custom modules which also change data models (res.partner where I added some additional fields to), I will need a bit of time to upgrade to v8, because data migration will not be too easy-going. But in the meantime, I could try to convert my .rml templates to HTML code what I think to be not too easy-going, too, but I suppose or hope it will be possible. If not, I have to take the predesigned webkit templates and modify them within v8 to approach my current .rml layout. For that purpose, the information you gave above will be very helpful to me. Maybe I will try like that first. Then I can change to webkit within my v7, install new custom webkit report module designed by the help of v8, copy modified header code where it belongs to (maybe it can also be placed to my custom module - up to now, I have not found out, how to) and my webkit migration should be finished. Whenever I need to change layout, I can do this using v8 till time will have come to change to v8 entirely.

0
形象
丢弃
形象
mohsel
最佳答案

Thank you Fabrice, your guide is clear and very helpful, but how can i modify the html templates ? for more technicals customization like adding an amount_to_text field ?

0
形象
丢弃
Luke Branch

@mohsel, i've been doing some custom work on the saleorder, invoice, and other documents by adding the customisations to a custom module thanks to the tips from Fabrice on QWeb. Please provide some more information on what exactly you'd like to achieve in regards to customisations and i'd be happy to provide you with whatever information I can to help.

喜欢讨论吗?不要只阅读,加入进来!

立即创建账户,享受专属功能,与我们的精彩社区互动!

注册
相关帖文 回复 查看 活动
How do I start using WebKit reports? 已解决
layout reporting webkit
形象
形象
形象
2
9月 15
17375
Css layout of webkit reports - do DIV margins work?
layout webkit reports
形象
0
3月 15
2845
Document Layout Discrepancy Between PDF and Web Preview (Odoo v17)
configuration invoice layout preview document_page
形象
0
8月 24
1824
Document Layout customize
layout
形象
形象
1
1月 25
2353
v18 Document layout Problem 已解决
layout
形象
形象
2
12月 24
3468
社区
  • 教学视频
  • 文档
  • 论坛
开源
  • 下载
  • 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致力于为企业管理提供高效智能的开源解决方案,是全球业内高速成长的软件服务商之一,逾七百五十万用户选择Odoo进行数字化升级。通过一系列全业务链覆盖、高度集成、简单易用的商业应用,助力企业实现信息化改革、降本增效并释放公司增长潜力。

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