跳至内容
菜单
此问题已终结
4 回复
5358 查看

Hi :)

I would like to know if it's possible to have (with Odoo V9 community edition niglthly builds on Debian Jessy) different logo.

I would like to have a different logo printed on my pos ticket than the logo displayed on the web portal.

If someone have an idea it'll be nice, i'll read it carefully.

cheers.

Ev'Art

形象
丢弃

With web portal do you means on the website?

最佳答案

For that you can do it with this changes installed in a module:

In a .py

from openerp import models, field

class ext_website(models.Model):
_inherit = "website"

website_image = fields.Binary("Logo Image")

class website_config_settings(models.TransientModel):
_inherit = 'website.config.settings'

website_image = fields.Binary(related='website_id.website_image')

In an .xml

<record id="solt_view_website_config_settings" model="ir.ui.view">
<field name="name">Website Soltein settings</field>
<field name="model">website.config.settings</field>
<field name="inherit_id" ref="website.view_website_config_settings"/> 
<field name="arch" type="xml">
<xpath expr="//div[@name='social_media']" position="before">
<div>
<group>
<field name="website_image"/>
</group>
</div>
</xpath>
</field>
</record>

<template id="layout_menu_header" inherit_id="website.layout_logo_show" name="Soltein Menu Header">
<xpath expr="//img[@src='/logo.png']" position="replace">
<img t-att-src="website.image_url(website, 'website_image', None)" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name"/>
</xpath>
</template>

Put all of this in a module and install it. This will create a binary field to store the logo image for the website, in the menu "/Settings/Configuration/Website Settings" you could add the image in the field with label "Logo Image". After that just reload the page to see the logo changed

Hope this helps


形象
丢弃
编写者 最佳答案

Yes i mean website, the logo you have a the top of the left colomn in odoo web portal, admin, and so on. I have difined the company logo, this one is displayed everywhere. I'm not in multi company config. I would have a different logo on my receipt ticket of my POS than the one defined as company logo.

形象
丢弃
相关帖文 回复 查看 活动
6
5月 17
4935
1
7月 25
813
0
5月 24
1864
1
6月 23
5318
0
8月 22
2176