添加功能
This commit is contained in:
@@ -17,6 +17,7 @@ from odoo.addons.web.controllers.home import Home as WebHome
|
||||
MENU_BADGE_MODEL_FUNC_ENUM = {
|
||||
'base.menu_action_res_users': {'model': 'file.preview.test', 'func': 'get_menu_badge_count'},
|
||||
'yuthon_notice.yuthon_notice_menu1': {'model': 'yuthon.notice', 'func': 'get_no_read_count'},
|
||||
'purchase.purchase_order_view_tree': {'model': 'purchase.order', 'func': 'get_no_read_count'},
|
||||
'yuthon_property.yuthon_property_rent_list': {'model': 'property.rent.list', 'func': 'get_no_read_count'},
|
||||
'yuthon_property.yuthon_property_management_list': {'model': 'property.management.list', 'func': 'get_no_read_count'},
|
||||
'yuthon_property.yuthon_property_tariff_list': {'model': 'property.tariff.list', 'func': 'get_no_read_count'},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import purchase_fixed_assets
|
||||
from . import purchase_low_orders
|
||||
from . import purchase_service_orders
|
||||
from . import purchase_service_orders
|
||||
from . import inherit_purchase_order
|
||||
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class InheritPurchaseOrder(models.Model):
|
||||
_inherit = 'purchase.order'
|
||||
|
||||
def get_no_read_count(self):
|
||||
domain = [
|
||||
('company_id', '=', self.env.user.company_id.id),
|
||||
]
|
||||
return self.search_count(domain)
|
||||
|
||||
Reference in New Issue
Block a user