Odoo 10.0更改POS徽标

Sid*_*ang 4 openerp odoo-website odoo-9 odoo-view

我已经能够通过激活开发者模式来更改General Odoo徽标.然后单击自己的徽标和"编辑公司数据",选择徽标.

但这不适用于POS.徽标仍然是默认的Odoo徽标.怎么改呢?

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

小智 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,
}
Run Code Online (Sandbox Code Playgroud)

创建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>
Run Code Online (Sandbox Code Playgroud)

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

/ test_pos /静态/ src目录/ IMG /