odoo-website

How to create a custom template for the website navigation odoo 13

蓝咒 提交于 2020-08-09 07:20:05
问题 How to create a custom odoo walker for the website navbar Similar to what Wordpress allows to create a html template which them odoo uses to add the menus so I can design the navigation <nav> <div class="logo"></div> <ul> <!-- odoo menu items---> <!-- formatting---> <!-- <li class="nav-item"><a href="$link"> $name </a></li>---> </ul> <div> <ul> <li><a href="$myaccount_link">$name</a></li> <li><a href="$logout_link"> $name</a></li> </ul> </div> </nav> Is there a similar function in odoo if not

how to display binary field data in website using a controller odoo 13

99封情书 提交于 2020-07-23 06:45:29
问题 I was creating a controller to gets information from custom module and wonted to display the pdf or image on the website how to get the url. I was able to download it using this return http.send_file(maybefiel, filename='sdsdds', as_attachment=False) but I wonted to display it can you please help 回答1: You can access a binary field using the following path: your_url/web/content/model_name/id/field_name For example, the field name of a user's profile picture is called " image ", so, the URL

how to display binary field data in website using a controller odoo 13

半城伤御伤魂 提交于 2020-07-23 06:43:48
问题 I was creating a controller to gets information from custom module and wonted to display the pdf or image on the website how to get the url. I was able to download it using this return http.send_file(maybefiel, filename='sdsdds', as_attachment=False) but I wonted to display it can you please help 回答1: You can access a binary field using the following path: your_url/web/content/model_name/id/field_name For example, the field name of a user's profile picture is called " image ", so, the URL

Images are not shown in Odoo v9.0

試著忘記壹切 提交于 2019-12-12 18:27:16
问题 I was evaluating Odoo v9.0 by pulling odoo v9.0 branch in my system and found that it is having some problem in showing the images. It prompts up with an error "Could not display the selected Image". If you open the product form view or company form view it comes up with the error. Even if you try to save new image to a product, after saving the image again it comes with the same error and image is not displayed. The same issue is with the odoo e-commerce website, where no images are seen. I

How to use if in Odoo template language

不打扰是莪最后的温柔 提交于 2019-12-07 07:05:29
问题 I'm trying to use the same functionality as in Django: <div class="item {% if condition == True %}active{% endif %}"> In Odoo I have: <t t-foreach="list" t-as="l"> <a t-attf-href="/downloads/{{l.id}}" class="list-group-item"><t t-esc="l.name"/></a> </t> And I need to append class "active" if "c.id = cat_id" how it's done in Odoo? I'm using: <t t-foreach="categories" t-as="c"> <t t-if="c.id == category_id"> <a t-attf-href="/downloads/{{c.id}}" class="list-group-item active"><t t-esc="c.name"/>

How to use if in Odoo template language

十年热恋 提交于 2019-12-05 17:57:36
I'm trying to use the same functionality as in Django: <div class="item {% if condition == True %}active{% endif %}"> In Odoo I have: <t t-foreach="list" t-as="l"> <a t-attf-href="/downloads/{{l.id}}" class="list-group-item"><t t-esc="l.name"/></a> </t> And I need to append class "active" if "c.id = cat_id" how it's done in Odoo? I'm using: <t t-foreach="categories" t-as="c"> <t t-if="c.id == category_id"> <a t-attf-href="/downloads/{{c.id}}" class="list-group-item active"><t t-esc="c.name"/></a> </t> <t t-if="c.id != category_id"> <a t-attf-href="/downloads/{{c.id}}" class="list-group-item">

ERROR openerp.addons.website.models.ir_http: 500 Internal Server Error: after logout from odoo

给你一囗甜甜゛ 提交于 2019-12-04 02:01:47
问题 I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works. but when i install website module of odoo and after i log out from odoo it show following error: "500: Internal Server Error" and my log: "Traceback (most recent call last): File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception

ERROR openerp.addons.website.models.ir_http: 500 Internal Server Error: after logout from odoo

泄露秘密 提交于 2019-12-01 12:54:42
I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works. but when i install website module of odoo and after i log out from odoo it show following error: "500: Internal Server Error" and my log: "Traceback (most recent call last): File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception return request._handle_exception(exception) File "/opt/odoo96/openerp/http.py", line 738, in _handle