diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index a28ab7f47..38b3fc7ac 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -399,7 +399,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): partners = self.env['res.partner'].search([]) bus_message = {'type': 'wkf_notify'} notifications = [[partner, 'sun_badge_menu.reload_menu_data', [bus_message]] for partner in partners] - self.env["bus.bus"]._sendmany(notifications) + # self.env["bus.bus"]._sendmany(notifications) # 浏览器叮咚 def add_comment(self): self.ensure_one() diff --git a/sun_badge_menu/static/src/webclient/actions/client_actions.js b/sun_badge_menu/static/src/webclient/actions/client_actions.js index 535100536..8c0ee3426 100644 --- a/sun_badge_menu/static/src/webclient/actions/client_actions.js +++ b/sun_badge_menu/static/src/webclient/actions/client_actions.js @@ -9,9 +9,9 @@ import {escape, sprintf} from "@web/core/utils/strings"; import {Component, markup, onMounted, xml} from "@odoo/owl"; -export function clickRefreshButton() { - document.querySelector('button[name="sh_refresh"].sh_refresh')?.click(); -} +// export function clickRefreshButton() { +// document.querySelector('button[name="sh_refresh"].sh_refresh')?.click(); +// } /** * Client action to go back home. */ diff --git a/sun_badge_menu/static/src/webclient/navbar/navbar.js b/sun_badge_menu/static/src/webclient/navbar/navbar.js index e9feaa542..f7011b82d 100644 --- a/sun_badge_menu/static/src/webclient/navbar/navbar.js +++ b/sun_badge_menu/static/src/webclient/navbar/navbar.js @@ -5,7 +5,7 @@ import { patch } from "@web/core/utils/patch"; import { deepCopy } from "@web/core/utils/objects"; import { useService } from "@web/core/utils/hooks"; import { url } from "@web/core/utils/urls"; -import { clickRefreshButton } from "../actions/client_actions" +// import { clickRefreshButton } from "../actions/client_actions" const WKF_NOTIFY_TYPE = 'wkf_notify' @@ -28,13 +28,19 @@ patch(NavBar.prototype, { for (const d of detail) { if (d?.type === WKF_NOTIFY_TYPE) { this.menuService.reload(); - return this.audio.play() - .then(() => { - clickRefreshButton(); - }).catch((e) => { - console.log(e) - }); + return this.audio.play().catch((e) => { + console.log(e) + }); } + // if (d?.type === WKF_NOTIFY_TYPE) { + // this.menuService.reload(); + // return this.audio.play() + // .then(() => { + // clickRefreshButton(); + // }).catch((e) => { + // console.log(e) + // }); + // } } const oldMenuApps = deepCopy(this.menuService.getApps()) @@ -63,7 +69,7 @@ patch(NavBar.prototype, { } } } - clickRefreshButton(); + // clickRefreshButton(); }, 300) }); } diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 374722864..54e711ee6 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -35,14 +35,14 @@ class PropertyRentalWizard(models.Model): rent_id = self.env['property.rent.list'].search([ ('contract_id', '=', record.id), ('property_id', '=', property_id), - ('due_date', '>=', first_day_of_month), + ('due_date', '>', first_day_of_month), ('due_date', '<=', last_day_of_month), ]) # 判断是否有已生成应收 existing_receivable = self.env['property.accounts.receivable'].search([ ('lessee_id', '=', record.lessee_id.id), - ('due_date', '>=', first_day_of_month), + ('due_date', '>', first_day_of_month), ('due_date', '<=', last_day_of_month), ('management_type_id.name', '=', '租金'), ('contract_id', '=', record.id),