添加功能
This commit is contained in:
@@ -9,7 +9,7 @@ from datetime import datetime, date, time, timedelta
|
||||
class SoongWorkflowApostilleOKWizard(models.TransientModel):
|
||||
_name = "soong.workflow.apostille.ok.wizard"
|
||||
_description = "加签弹窗"
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string="name")
|
||||
res_model = fields.Char()
|
||||
|
||||
@@ -9,7 +9,7 @@ from datetime import datetime, date, time, timedelta
|
||||
class SoongWorkflowApostilleWizard(models.TransientModel):
|
||||
_name = "soong.workflow.apostille.wizard"
|
||||
_description = "加签弹窗"
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string="name")
|
||||
res_model = fields.Char()
|
||||
|
||||
@@ -10,7 +10,7 @@ from datetime import datetime, date, time, timedelta
|
||||
class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
_name = "soong.workflow.comment.wizard"
|
||||
_description = "Soong Workflow Comment Wizard"
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string="name")
|
||||
res_model = fields.Char()
|
||||
|
||||
@@ -9,7 +9,7 @@ from datetime import datetime, date, time, timedelta
|
||||
class SoongWorkflowRecordDeleteWizard(models.TransientModel):
|
||||
_name = "soong.workflow.record.delete.wizard"
|
||||
_description = "删除弹窗"
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string="")
|
||||
record_id = fields.Many2one(comodel_name="soong.workflow.record")
|
||||
|
||||
@@ -27,12 +27,6 @@
|
||||
<!-- <field name="year_time"/>-->
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="o_attachment_preview"/>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" groups="base.group_user"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -39,8 +39,20 @@ class IssueApproval(models.Model):
|
||||
def _check_issue_approval_ids(self):
|
||||
for rec in self:
|
||||
if rec.issue_approval_ids:
|
||||
self.issue_display ='\n'.join([issue_library.issue_library_id.name for issue_library in self.issue_approval_ids])
|
||||
self.decision_display ='\n'.join([issue_library.approval_decision_sequence for issue_library in self.issue_approval_ids])
|
||||
# 处理 issue_library_id.name(假设为字符串,无需转换)
|
||||
issue_names = [issue_library.issue_library_id.name for issue_library in rec.issue_approval_ids]
|
||||
# 处理 approval_decision_sequence,确保转换为字符串
|
||||
decision_sequences = []
|
||||
for issue_library in rec.issue_approval_ids:
|
||||
# 假设 approval_decision_sequence 是布尔类型,转换为 '是'/‘否’ 或直接转字符串
|
||||
if isinstance(issue_library.approval_decision_sequence, bool):
|
||||
decision_sequences.append('是' if issue_library.approval_decision_sequence else '否')
|
||||
else:
|
||||
# 其他类型(如整数、浮点数)直接转字符串
|
||||
decision_sequences.append(str(issue_library.approval_decision_sequence))
|
||||
# 拼接字符串
|
||||
rec.issue_display = '\n'.join(issue_names)
|
||||
rec.decision_display = '\n'.join(decision_sequences)
|
||||
|
||||
class IssueApprovalLine(models.Model):
|
||||
_name = 'issue.approval.line'
|
||||
|
||||
@@ -9,7 +9,7 @@ _logger = logging.getLogger(__name__)
|
||||
class YuthonNotice(models.Model):
|
||||
_name = "yuthon.notice"
|
||||
_description = '通知公告'
|
||||
_inherit = ['soong.workflow.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_rec_name = 'name'
|
||||
_order = "sequence desc"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
class PropertyElectricReading(models.Model):
|
||||
_name = 'property.electric.reading'
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_description = '抄表'
|
||||
|
||||
code = fields.Char(string='编号')
|
||||
|
||||
@@ -4,7 +4,7 @@ from datetime import datetime, date, time, timedelta
|
||||
|
||||
class PropertyWaterReading(models.Model):
|
||||
_name = 'property.water.reading'
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_description = '水表抄表'
|
||||
|
||||
code = fields.Char(string='编号')
|
||||
|
||||
@@ -6,7 +6,7 @@ from pypinyin import pinyin,lazy_pinyin
|
||||
class YuthonProperty(models.Model):
|
||||
_name = 'yuthon.property'
|
||||
_description = '物业管理'
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_rec_name = 'name'
|
||||
_order = 'first_letter'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from odoo import models, fields, api
|
||||
|
||||
class PropertyClaimApproval(models.Model):
|
||||
_name = 'property.claim.approval'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_description = '业务报销单'
|
||||
|
||||
name = fields.Char(string='名称', required=True)
|
||||
|
||||
@@ -5,6 +5,7 @@ from odoo.exceptions import UserError, ValidationError
|
||||
class PropertyDesignApproval(models.Model):
|
||||
_name = 'property.design.approval'
|
||||
_description = '工程设计合同审批'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="编号",
|
||||
|
||||
@@ -4,6 +4,7 @@ from odoo import models, fields, api
|
||||
class PropertyRentalConditions(models.Model):
|
||||
_name = 'property.rental.conditions'
|
||||
_description = '出租调整表'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
property_id = fields.Many2one('yuthon.property',string='物业名称')
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
|
||||
@@ -5,6 +5,7 @@ from odoo.exceptions import UserError, ValidationError
|
||||
class PropertySupervisingApproval(models.Model):
|
||||
_name = 'property.supervising.approval'
|
||||
_description = '工程设计合同审批'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="编号",
|
||||
|
||||
@@ -11,7 +11,7 @@ class YuthonWillTask(models.Model):
|
||||
_name = 'yuthon.will.task'
|
||||
_description = '日程'
|
||||
_rec_name = 'task_content'
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
request_hour_from = fields.Selection([
|
||||
('0', '0:00'), ('0.5', '0:30'),
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<field name="address"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="employee_ids2" widget="many2many_tags" domain ="[('company_id', '=', company_id) if is_this_company else ('id', 'in', []),('user_role_ids.name', 'in', ['司机'])]" options="{'no_create': True}"/>
|
||||
<field name="employee_ids2" widget="many2many_tags" domain="[('company_id', '=', company_id), ('user_role_ids.name', 'in', ['司机'])] if is_this_company else [('user_role_ids.name', 'in', ['司机'])]" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user