diff --git a/yuthon_official/__manifest__.py b/yuthon_official/__manifest__.py index 421d9fa34..34af647a3 100644 --- a/yuthon_official/__manifest__.py +++ b/yuthon_official/__manifest__.py @@ -34,6 +34,7 @@ 'views/official_menus.xml', 'report/official_print_action.xml', 'report/official_print_template.xml', + 'report/property_official_print_template.xml', 'report/file_processing_report.xml', 'report/file_processing_report_templates.xml', 'report/sub_enterprises_report.xml', diff --git a/yuthon_official/models/yuthon_official.py b/yuthon_official/models/yuthon_official.py index c464ed763..65850b06c 100644 --- a/yuthon_official/models/yuthon_official.py +++ b/yuthon_official/models/yuthon_official.py @@ -297,7 +297,7 @@ class YuthonOfficial(models.Model): }) def action_print_official(self): - """表单按钮触发打印发文审批单""" + """表单按钮触发打印行政发文审批单""" self.ensure_one() report = self.env.ref('yuthon_official.action_official_print_report') return report.report_action(self) @@ -319,6 +319,7 @@ class YuthonPropertyOfficial(models.Model): _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _rec_name = 'name' + name = fields.Char(string="标题") text = fields.Text(string="标题", compute='_compute_text', store=True) code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('official_code')) @@ -563,9 +564,9 @@ class YuthonPropertyOfficial(models.Model): }) def action_print_official(self): - """表单按钮触发打印发文审批单""" + """表单按钮触发打印物业发文审批单""" self.ensure_one() - report = self.env.ref('yuthon_official.action_official_print_report') + report = self.env.ref('yuthon_official.action_property_official_print_report') return report.report_action(self) def button_transfer(self): diff --git a/yuthon_official/report/official_print_action.xml b/yuthon_official/report/official_print_action.xml index 34dd3ddf9..1f26d3a32 100644 --- a/yuthon_official/report/official_print_action.xml +++ b/yuthon_official/report/official_print_action.xml @@ -18,5 +18,16 @@ report '行政发文%s_%s_%s' % (object.name or '', object.code or '', (object.date and object.date.strftime('%Y-%m-%d') or '')) + + 物业发文 + + yuthon.property.official + qweb-pdf + yuthon_official.property_official_print_template + yuthon_official.property_official_print_template + + report + '物业发文%s_%s_%s' % (object.name or '', object.code or '', (object.date and object.date.strftime('%Y-%m-%d') or '')) + \ No newline at end of file diff --git a/yuthon_official/report/official_print_template.xml b/yuthon_official/report/official_print_template.xml index c43491951..d6e37b191 100644 --- a/yuthon_official/report/official_print_template.xml +++ b/yuthon_official/report/official_print_template.xml @@ -104,7 +104,7 @@ 用章类型 - + 、 diff --git a/yuthon_official/report/property_official_print_template.xml b/yuthon_official/report/property_official_print_template.xml new file mode 100644 index 000000000..bc7289df3 --- /dev/null +++ b/yuthon_official/report/property_official_print_template.xml @@ -0,0 +1,135 @@ + + + +