Accounting firms are often connected to customer's company, so often single company database. To know easily in which company they work we think that it should be better to show the name of the company on the top for them. A systray item is therefore generated at the location of the company selector. It is visible only when there is a single company (so no company selector) and only when accounting firms mode is on, i.e. the setting field is set to either one of these values ('customer Invoices', 'Vendor Bills', 'Customer Invoices and Vendor Bills')
closes odoo/odoo#108928
Task: 3110453
Pr: 108928
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
12 lines
327 B
Python
12 lines
327 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models
|
|
|
|
|
|
class IrHttp(models.AbstractModel):
|
|
_inherit = 'ir.http'
|
|
|
|
def session_info(self):
|
|
result = super(IrHttp, self).session_info()
|
|
result['is_quick_edit_mode_enabled'] = self.env.user._is_internal() and self.env.company.quick_edit_mode
|
|
return result
|