4

我已经能够通过激活开发者模式来更改通用 Odoo 徽标。然后点击它自己的标志和“编辑公司数据”,选择标志。

但这不适用于 POS。徽标仍然是默认的 Odoo 徽标。如何改变它?

如何更改 POS / 销售点的标志?

4

2 回答 2

6

我认为最好为它创建一个模块而不是编辑核心代码。

创建一个模块,例如:test_pos

在下面添加代码

test_pos/__openerp__.py

{
    'name': 'Company POS LOGO',
    'version': '1.0.0',
    'category': 'web',
    'sequence': 3,
    'author': 'LOYAL',
    'depends': ['web','point_of_sale','mail'
    ],
    'data': [
        # 'change_view.xml',
        'templates.xml',

    ],
    'qweb':['static/src/xml/poschange.xml'],
    'installable': True,
    'application': True,
    'auto_install': False,
}

创建 poschange.xml 和下面的代码

test_pos/static/src/xml/poschange.xml

<?xml version="1.0" encoding="utf-8"?>
<templates id='template' xmlspace='preserve'>
<t t-extend="Chrome">
    <t t-jquery=".pos-logo" t-operation="replace">
      <img class="pos-logo" src="/test_pos/static/src/img/logo.png" />  
    </t>
  </t>

</templates>

添加要替换为 pos 徽标的图像

/test_pos/static/src/img/

于 2017-03-03T17:16:20.827 回答
1

在此处输入图像描述

这是这个的简单解决方案。

只需要替换路径中的logo.png文件point_of_sale module.

**point_of_sale/static/src/img/logo.png**
于 2017-03-03T10:44:44.310 回答