diff --git a/addons/bus/websocket.py b/addons/bus/websocket.py index e2c899da423..30d27bc5cb8 100644 --- a/addons/bus/websocket.py +++ b/addons/bus/websocket.py @@ -834,6 +834,7 @@ class WebsocketConnectionHandler: try: response = cls._get_handshake_response(request.httprequest.headers) socket = request.httprequest._HTTPRequest__environ['socket'] + # socket = request.httprequest._HTTPRequest__environ['werkzeug.socket'] session, db, httprequest = request.session, request.db, request.httprequest response.call_on_close(lambda: cls._serve_forever( Websocket(socket, session), diff --git a/addons/hr/models/hr_employee.py b/addons/hr/models/hr_employee.py index 2f531f75ebf..1043c4362c8 100644 --- a/addons/hr/models/hr_employee.py +++ b/addons/hr/models/hr_employee.py @@ -80,7 +80,7 @@ class HrEmployeePrivate(models.Model): birthday = fields.Date('Date of Birth', groups="hr.group_hr_user", tracking=True) ssnid = fields.Char('SSN No', help='Social Security Number', groups="hr.group_hr_user", tracking=True) sinid = fields.Char('SIN No', help='Social Insurance Number', groups="hr.group_hr_user", tracking=True) - identification_id = fields.Char(string='Identification No', groups="hr.group_hr_user", tracking=True) + identification_id = fields.Char(string='Identification No', tracking=True) passport_id = fields.Char('Passport No', groups="hr.group_hr_user", tracking=True) bank_account_id = fields.Many2one( 'res.partner.bank', 'Bank Account Number', diff --git a/addons/hr_attendance/models/hr_attendance.py b/addons/hr_attendance/models/hr_attendance.py index 3ca36e37116..cd995ec0abe 100644 --- a/addons/hr_attendance/models/hr_attendance.py +++ b/addons/hr_attendance/models/hr_attendance.py @@ -32,7 +32,7 @@ class HrAttendance(models.Model): employee_id = fields.Many2one('hr.employee', string="Employee", default=_default_employee, required=True, ondelete='cascade', index=True) department_id = fields.Many2one('hr.department', string="Department", related="employee_id.department_id", readonly=True) - check_in = fields.Datetime(string="Check In", default=fields.Datetime.now, required=True, tracking=True) + check_in = fields.Datetime(string="Check In", tracking=True) check_out = fields.Datetime(string="Check Out", tracking=True) worked_hours = fields.Float(string='Worked Hours', compute='_compute_worked_hours', store=True, readonly=True) color = fields.Integer(compute='_compute_color') diff --git a/addons/hr_attendance/models/hr_employee.py b/addons/hr_attendance/models/hr_employee.py index 8dd238df67d..0e752cf336d 100644 --- a/addons/hr_attendance/models/hr_employee.py +++ b/addons/hr_attendance/models/hr_employee.py @@ -98,13 +98,13 @@ class HrEmployee(models.Model): end_tz = now_tz end_naive = end_tz.astimezone(pytz.utc).replace(tzinfo=None) - hours = sum( - att.worked_hours or 0 - for att in employee.attendance_ids.filtered( - lambda att: att.check_in >= start_naive and att.check_out and att.check_out <= end_naive - ) - ) - + # hours = sum( + # att.worked_hours or 0 + # for att in employee.attendance_ids.filtered( + # lambda att: att.check_in >= start_naive and att.check_out and att.check_out <= end_naive + # ) + # ) + hours = 0 employee.hours_last_month = round(hours, 2) employee.hours_last_month_display = "%g" % employee.hours_last_month diff --git a/addons/hr_contract/i18n/zh_CN.po b/addons/hr_contract/i18n/zh_CN.po index 3c4b0cbbfcc..ed7dccf6f31 100644 --- a/addons/hr_contract/i18n/zh_CN.po +++ b/addons/hr_contract/i18n/zh_CN.po @@ -246,7 +246,7 @@ msgstr "日历不匹配: 员工日历与合约日历不匹配。可能会导 #: model:ir.model.fields.selection,name:hr_contract.selection__hr_contract__state__cancel #: model:ir.model.fields.selection,name:hr_contract.selection__hr_contract_history__state__cancel msgid "Cancelled" -msgstr "已取消" +msgstr "已中止" #. module: hr_contract #: model:ir.model,name:hr_contract.model_res_company diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index b34bdc7aa2b..60a0ec926e0 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -4422,7 +4422,7 @@ class MailThread(models.AbstractModel): payload = self._notify_by_web_push_prepare_payload(message, msg_vals=msg_vals) payload = self._truncate_payload(payload) - if len(devices) < MAX_DIRECT_PUSH: + if False: session = Session() devices_to_unlink = set() for device in devices: diff --git a/addons/mail/models/models.py b/addons/mail/models/models.py index ddfbb9a4b11..675b4ef5309 100644 --- a/addons/mail/models/models.py +++ b/addons/mail/models/models.py @@ -176,13 +176,15 @@ class BaseModel(models.AbstractModel): def _mail_track_get_field_sequence(self, fname): """ Find tracking sequence of a given field, given their name. Current parameter 'tracking' should be an integer, but attributes with True - are still supported; old naming 'track_sequence' also. """ - sequence = getattr( - self._fields[fname], 'tracking', - getattr(self._fields[fname], 'track_sequence', 100) - ) - if sequence is True: - sequence = 100 + are still supported; old naming 'track_sequence' also. + 此文件因物业水电表日期字段报keyerror做屏蔽暂时解决 + """ + # sequence = getattr( + # self._fields[fname], 'tracking', + # getattr(self._fields[fname], 'track_sequence', 100) + # ) + # if sequence is True: + sequence = 100 return sequence def _message_get_default_recipients(self): diff --git a/addons/maintenance/views/maintenance_views.xml b/addons/maintenance/views/maintenance_views.xml index e360ca00bdb..08e3d26ab0f 100644 --- a/addons/maintenance/views/maintenance_views.xml +++ b/addons/maintenance/views/maintenance_views.xml @@ -569,8 +569,7 @@ + '|', '|', '|', ('name', 'ilike', self), ('model', 'ilike', self), ('serial_no', 'ilike', self), ('partner_ref', 'ilike', self)]"/> @@ -599,9 +598,9 @@ - + - Equipment + 固定资产 maintenance.equipment kanban,tree,form diff --git a/addons/purchase_stock/__manifest__.py b/addons/purchase_stock/__manifest__.py index 16ef01ac165..d438c5410e7 100644 --- a/addons/purchase_stock/__manifest__.py +++ b/addons/purchase_stock/__manifest__.py @@ -10,7 +10,7 @@ 'depends': ['stock_account', 'purchase'], 'data': [ 'security/ir.model.access.csv', - 'data/purchase_stock_data.xml', + # 'data/purchase_stock_data.xml', 'data/mail_templates.xml', 'report/vendor_delay_report.xml', 'views/purchase_views.xml', diff --git a/addons/web/static/src/core/confirmation_dialog/confirmation_dialog.js b/addons/web/static/src/core/confirmation_dialog/confirmation_dialog.js index bf9cf603f79..46460a8c419 100644 --- a/addons/web/static/src/core/confirmation_dialog/confirmation_dialog.js +++ b/addons/web/static/src/core/confirmation_dialog/confirmation_dialog.js @@ -7,10 +7,7 @@ import { useChildRef } from "@web/core/utils/hooks"; import { Component } from "@odoo/owl"; export const deleteConfirmationMessage = _t( - `Ready to make your record disappear into thin air? Are you sure? -It will be gone forever! - -Think twice before you click that 'Delete' button!` + `你确定要删除吗?` ); export class ConfirmationDialog extends Component { diff --git a/addons/web/static/src/views/calendar/calendar_controller.js b/addons/web/static/src/views/calendar/calendar_controller.js index 107b291fcbe..2c72c9805c0 100644 --- a/addons/web/static/src/views/calendar/calendar_controller.js +++ b/addons/web/static/src/views/calendar/calendar_controller.js @@ -323,7 +323,7 @@ export class CalendarController extends Component { } deleteRecord(record) { this.displayDialog(ConfirmationDialog, { - title: _t("Bye-bye, record!"), + title: _t(" "), body: deleteConfirmationMessage, confirm: () => { this.model.unlinkRecord(record.id); diff --git a/addons/web/static/src/views/form/form_status_indicator/form_status_indicator.xml b/addons/web/static/src/views/form/form_status_indicator/form_status_indicator.xml index ca12d8932d0..1c58dfdb2a9 100644 --- a/addons/web/static/src/views/form/form_status_indicator/form_status_indicator.xml +++ b/addons/web/static/src/views/form/form_status_indicator/form_status_indicator.xml @@ -10,20 +10,22 @@ data-hotkey="s" t-on-click.stop="save" data-tooltip="Save manually" - aria-label="Save manually" + style="background-color: blue !important;color: white !important;" + aria-label="Save manually" t-ref="save"> - + - + + + this.model.root.deleteRecords(), diff --git a/addons/web/static/src/views/list/list_renderer.js b/addons/web/static/src/views/list/list_renderer.js index 7c0c27e3f40..2b7311eb3cb 100644 --- a/addons/web/static/src/views/list/list_renderer.js +++ b/addons/web/static/src/views/list/list_renderer.js @@ -983,7 +983,7 @@ export class ListRenderer extends Component { } get getEmptyRowIds() { - let nbEmptyRow = Math.max(0, 4 - this.props.list.records.length); + let nbEmptyRow = Math.max(0, 1 - this.props.list.records.length); if (nbEmptyRow > 0 && this.displayRowCreates) { nbEmptyRow -= 1; } diff --git a/addons/web/static/src/views/view_dialogs/select_create_dialog.js b/addons/web/static/src/views/view_dialogs/select_create_dialog.js index 776dcdad2e3..a7943ef0bdc 100644 --- a/addons/web/static/src/views/view_dialogs/select_create_dialog.js +++ b/addons/web/static/src/views/view_dialogs/select_create_dialog.js @@ -21,7 +21,7 @@ export class SelectCreateDialog extends Component { const translatedText = _t("No records found!"); this.busy = false; // flag used to ensure we only call once the onSelected/onUnselect props this.baseViewProps = { - display: { searchPanel: false }, + display: { searchPanel: true }, editable: false, // readonly noBreadcrumbs: true, noContentHelp: markup(`

${escape(translatedText)}

`), diff --git a/addons/web/static/tests/views/calendar/calendar_view_tests.js b/addons/web/static/tests/views/calendar/calendar_view_tests.js index 8534dc20385..c27c4dcc43d 100644 --- a/addons/web/static/tests/views/calendar/calendar_view_tests.js +++ b/addons/web/static/tests/views/calendar/calendar_view_tests.js @@ -939,7 +939,7 @@ QUnit.module("Views", ({ beforeEach }) => { await click(target, ".o_cw_popover_delete"); assert.strictEqual( target.querySelector(".modal-title").textContent, - "Bye-bye, record!", + " ", "should display the confirm message" ); diff --git a/odoo/addons/base/models/ir_rule.py b/odoo/addons/base/models/ir_rule.py index e46d1a663e8..8e6b1711ce0 100644 --- a/odoo/addons/base/models/ir_rule.py +++ b/odoo/addons/base/models/ir_rule.py @@ -212,12 +212,10 @@ class IrRule(models.Model): 'unlink': _("unlink"), } user_description = f"{self.env.user.name} (id={self.env.user.id})" - operation_error = _("Uh-oh! Looks like you have stumbled upon some top-secret records.\n\n" \ - "Sorry, %s doesn't have '%s' access to:", user_description, operations[operation]) + operation_error = "对不起,你没有访问的权限: %s", user_description failing_model = _("- %s (%s)", description, model) - resolution_info = _("If you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies.") - + resolution_info = "" if not self.user_has_groups('base.group_no_one') or not self.env.user.has_group('base.group_user'): records.invalidate_recordset() return AccessError(f"{operation_error}\n{failing_model}\n\n{resolution_info}")