Merge pull request !7000 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-12-12 03:21:00 +00:00
committed by Gitee
8 changed files with 40 additions and 7 deletions
@@ -41,6 +41,9 @@ class YuthonOfficial(models.Model):
related_issues_id = fields.Many2one('issue.library', string="关联议题")
is_official_incoming = fields.Boolean(string="是否收文")
active = fields.Boolean('Active', default=True, tracking=True)
is_chapter = fields.Boolean(string="是否用章")
type_stamp_ids = fields.Many2many('seals.type.setting', string='用章类型')
scope_chapter_ids = fields.Many2many('seals.scope.setting', string='用章范围')
red_suit = fields.Char(string="套红")
official_documents_ids = fields.Many2many('ir.attachment', string="附件")
@@ -29,13 +29,16 @@
invisible="urgency_level != 'urgent'"/>
<widget name="web_ribbon" title="特级" bg_color="text-bg-danger"
invisible="urgency_level != 'emergency'"/>
<group col="4">
<group col="5">
<group>
<field name="code" string="流水号" readonly="1"/>
</group>
<group>
<field name="urgency_level" readonly="1"/>
</group>
<group>
<field name="is_chapter"/>
</group>
<group>
<field name="is_meet"/>
</group>
@@ -79,6 +82,10 @@
<field name="department_id"/>
</group>
</group>
<group>
<field name="type_stamp_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="not is_chapter"/>
<field name="scope_chapter_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="not is_chapter"/>
</group>
<group string="文件内容">
<field name="main_text" string=" "/>
</group>
@@ -99,7 +99,9 @@ class PropertyLeaseContract(models.Model):
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型', compute="_compute_admin_id", store=True)
contract_code = fields.Char(string="合同编号")
display_name = fields.Char(string="合同编号", compute="_compute_display_name", store=True)
is_chapter = fields.Boolean(string="是否用章")
type_stamp_ids = fields.Many2many('seals.type.setting', string='用章类型')
scope_chapter_ids = fields.Many2many('seals.scope.setting', string='用章范围')
contract_date = fields.Date(string="合同签订日期")
is_print = fields.Boolean(string="当月打印", compute ="_compute_is_print", store=True)
property_documents_ids = fields.Many2many(
@@ -46,7 +46,7 @@
<field name="is_split" string="拆分"/>
</group>
<group>
<field name="number" invisible="1"/>
<field name="is_chapter"/>
</group>
<group>
<field name="is_issues"/>
@@ -101,6 +101,8 @@
<field name="is_contract" invisible="1"/>
<field name="contract_source_id" invisible="not is_child_contract"/>
<field name="condition" readonly="1" invisible="1"/>
<field name="type_stamp_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="not is_chapter"/>
<field name="scope_chapter_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="not is_chapter"/>
</group>
</group>
<notebook>
@@ -26,6 +26,8 @@
</field>
</record>
<menuitem
id="menu_property_accounts_receivable_report2"
name="应收账单报表"
@@ -33,5 +35,12 @@
action="action_property_accounts_receivable_report"
sequence="6"
/>
<menuitem
id="menu_property_accounts_receivable1"
name="应收账单"
parent="yuthon_property_approval.property_approval_report_menu"
action="yuthon_property_approval.property_accounts_receivable_action"
sequence="5"
/>
</data>
</odoo>
@@ -22,6 +22,9 @@ class YuthonBusinessApproval(models.Model):
information_categories_ids = fields.Many2many('yuthon.information.categories', string='类型')
reason = fields.Text(string="正文")
document_ids = fields.Many2many('ir.attachment', string="附件")
is_chapter = fields.Boolean(string="是否用章")
type_stamp_ids = fields.Many2many('seals.type.setting', string='用章类型')
scope_chapter_ids = fields.Many2many('seals.scope.setting', string='用章范围')
active = fields.Boolean('Active', default=True, tracking=True)
work_end = fields.Boolean(string="结束")
@@ -21,13 +21,16 @@
invisible="urgency_level != 'urgent'"/>
<widget name="web_ribbon" title="特级" bg_color="text-bg-danger"
invisible="urgency_level != 'emergency'"/>
<group col="4">
<group col="5">
<group>
<field name="code" string="流水号" readonly="1"/>
</group>
<group>
<field name="urgency_level" readonly="1"/>
</group>
<group>
<field name="is_chapter"/>
</group>
<group>
<field name="is_issues"/>
</group>
@@ -44,6 +47,8 @@
<field name="work_end" invisible="1"/>
<field name="name"/>
<field name="users_id"/>
<field name="type_stamp_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="not is_chapter"/>
<field name="scope_chapter_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="not is_chapter"/>
<field name="information_categories_ids" widget="many2many_tags"/>
<field name="reason"/>
<field name="document_ids" widget="preview_many2many"/>
@@ -1,4 +1,5 @@
from odoo import api, fields, models
from datetime import datetime, timedelta, date
class InheritRoomBooking(models.Model):
@@ -17,15 +18,16 @@ class InheritRoomBooking(models.Model):
def get_hour_selection(datetime_obj):
if not datetime_obj:
return None
hour = datetime_obj.hour
minute = datetime_obj.minute
datetime_plus_8h = datetime_obj + timedelta(hours=8)
hour = datetime_plus_8h.hour
minute = datetime_plus_8h.minute
return str(hour) if minute == 0 else f"{hour}.5"
if task_time_ids:
start_datetime = new_record.start_datetime
start_date = start_datetime.date()
request_hour_from = get_hour_selection(new_record.start_datetime)
request_hour_to = get_hour_selection(new_record.stop_datetime)
request_hour_to = get_hour_selection(new_record.end_datetime)
self.env['yuthon.will.task'].sudo().create({
'name': new_record.name,
'users_ids': [(6, 0, new_record.room_users_ids.ids)],