Merge pull request !8385 from 李鹏宇/dev
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
<menuitem id="yuthon_catering_root_menu" name="餐饮" sequence="1"
|
||||
web_icon="yuthon_catering,static/description/catering.png"
|
||||
>
|
||||
<menuitem id="yuthon_salary_meal_views_menu"
|
||||
name="餐费报表"
|
||||
action="yuthon_salary.view_yuthon_meal_expenses_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="yuthon_catering_conf_root_menu" name="配置" sequence="99"/>
|
||||
</menuitem>
|
||||
</data>
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
'views/official_menus.xml',
|
||||
'report/official_print_action.xml',
|
||||
'report/official_print_template.xml',
|
||||
'report/file_processing_report.xml',
|
||||
'report/file_processing_report_templates.xml',
|
||||
|
||||
|
||||
],
|
||||
|
||||
@@ -249,6 +249,10 @@ class YuthonFileProcessing(models.Model):
|
||||
'default_incoming_normal_id': self.id,
|
||||
},
|
||||
}
|
||||
|
||||
def action_print_file_processing(self):
|
||||
report_ref = self.env.ref('yuthon_official.action_file_processing_report')
|
||||
return report_ref.report_action(self.id)
|
||||
# def button_meet(self):
|
||||
# return {
|
||||
# "name": "会议",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="paperformat_file_processing_small" model="report.paperformat">
|
||||
<field name="name">File Processing Small Top Margin</field>
|
||||
<field name="format">A4</field>
|
||||
<field name="margin_top">5</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
</record>
|
||||
<record id="action_file_processing_report" model="ir.actions.report">
|
||||
<field name="name">文件处理表</field>
|
||||
<field name="paperformat_id" ref="yuthon_official.paperformat_file_processing_small"/>
|
||||
<field name="model">yuthon.file.processing</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">yuthon_official.file_processing_report_document</field>
|
||||
<field name="report_file">yuthon_official.file_processing_report_document</field>
|
||||
<field name="binding_model_id" ref="model_yuthon_file_processing"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="print_report_name">'文件处理表%s_%s_%s' % (object.name or '', object.users_id.name or '', (object.date and object.date.strftime('%Y-%m-%d') or ''))</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<template id="file_processing_report_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.external_layout">
|
||||
<style type="text/css">
|
||||
/* 表格纵向版式:自适应,最大800px 居中 */
|
||||
table { border-collapse: collapse; width: 100%; max-width: 800px; margin: 0 auto; table-layout: fixed; }
|
||||
td { border: 1px solid #000; padding: 6px; text-align: center; vertical-align: middle; }
|
||||
.title {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
.header-cell { font-weight: bold; background-color: #d4e6f1;}
|
||||
|
||||
/* 附件清单左对齐 */
|
||||
.attachment-list { text-align: left; }
|
||||
/* 隐藏意见和审批人之间的竖边框 */
|
||||
.no-right-border { border-right: none !important; }
|
||||
.no-left-border { border-left: none !important; }
|
||||
</style>
|
||||
|
||||
<!-- 流水号:页面左上角,位于标题之上 -->
|
||||
<div style="margin-bottom:8px; text-align:left;">
|
||||
流水号:<span t-esc="doc.code or ''"/>
|
||||
</div>
|
||||
|
||||
<!-- 文件处理表标题 - 不在表格内 -->
|
||||
<div class="title" style="text-align:center; font-weight:bold; font-size:18px; padding:12px 0; margin-bottom:10px;">
|
||||
文件处理表
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width:12%"/>
|
||||
<col style="width:21%"/>
|
||||
<col style="width:12%"/>
|
||||
<col style="width:21%"/>
|
||||
<col style="width:12%"/>
|
||||
<col style="width:22%"/>
|
||||
</colgroup>
|
||||
<!-- 日期行:显示在表格右上角 -->
|
||||
<tr>
|
||||
<td colspan="5" style="border:none;"></td>
|
||||
<td style="text-align:right; border:none;">日期:<span t-esc="doc.date and doc.date.strftime('%Y-%m-%d') or ''"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-cell"><strong>标题</strong></td>
|
||||
<td colspan="5"><span t-esc="doc.name or ''"/></td>
|
||||
</tr>
|
||||
<!-- 发文字号/紧急程度/密级:合并为一行 -->
|
||||
<tr>
|
||||
<td class="header-cell"><strong>发文字号</strong></td>
|
||||
<td>
|
||||
<span t-if="doc.is_cold" t-esc="doc.reference_cold or ''"/>
|
||||
</td>
|
||||
<td class="header-cell"><strong>紧急程度</strong></td>
|
||||
<td>
|
||||
<span t-if="doc.urgency_level == 'normal'">一般</span>
|
||||
<span t-if="doc.urgency_level == 'urgent'">紧急</span>
|
||||
<span t-if="doc.urgency_level == 'extra_urgent'">特急</span>
|
||||
</td>
|
||||
<td class="header-cell"><strong>密级</strong></td>
|
||||
<td>
|
||||
<span t-if="doc.secret_level == 'normal'">一般</span>
|
||||
<span t-if="doc.secret_level == 'urgent'">秘密</span>
|
||||
<span t-if="doc.secret_level == 'secret'">机密</span>
|
||||
<span t-if="doc.secret_level == 'so_secret'">绝密</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-cell"><strong>主送单位</strong></td>
|
||||
<td colspan="5" class="attachment-list">
|
||||
<t t-foreach="doc.main_flats_ids" t-as="main_flat">
|
||||
<span t-esc="main_flat.name"/>
|
||||
<t t-if="not main_flat_last">、</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-cell"><strong>抄送单位</strong></td>
|
||||
<td colspan="5" class="attachment-list">
|
||||
<t t-foreach="doc.copy_flats_ids" t-as="copy_flat">
|
||||
<span t-esc="copy_flat.name"/>
|
||||
<t t-if="not copy_flat_last">、</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 关联议题:仅在is_meet为True时显示 -->
|
||||
<tr t-if="doc.is_meet">
|
||||
<td class="header-cell"><strong>关联议题</strong></td>
|
||||
<td colspan="5" class="attachment-list"><span t-esc="doc.related_issues_id.name or ''"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-cell"><strong>文件内容</strong></td>
|
||||
<td colspan="5" class="attachment-list"><span t-field="doc.main_text"/></td>
|
||||
</tr>
|
||||
<!-- 用章类型:仅在is_chapter为'yes'时显示 -->
|
||||
<tr t-if="doc.is_chapter == 'yes'">
|
||||
<td class="header-cell"><strong>用章类型</strong></td>
|
||||
<td colspan="5" class="attachment-list">
|
||||
<t t-foreach="doc.type_stamp_ids" t-as="stamp">
|
||||
<span t-esc="stamp.name"/>
|
||||
<t t-if="not stamp_last">、</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-cell"><strong>附件</strong></td>
|
||||
<td colspan="5" class="attachment-list">
|
||||
<t t-foreach="doc.official_documents_ids" t-as="att">
|
||||
<div><t t-esc="att.name"/></div>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="background-color: #d4e6f1; text-align: center;"><strong>审批详情</strong></td>
|
||||
</tr>
|
||||
<t t-set="logs_ordered" t-value="doc.log_ids.sorted(lambda x: x.date_create or '')"/>
|
||||
<t t-foreach="logs_ordered" t-as="log">
|
||||
<tr>
|
||||
<td colspan="1"><span t-esc="log.name or '节点'"/></td>
|
||||
<!-- 核心修改:隐藏意见列右侧边框 -->
|
||||
<td class="no-right-border" colspan="4"><span t-esc="log.comment or ''"/></td>
|
||||
<!-- 核心修改:隐藏审批人列左侧边框 -->
|
||||
<td class="no-left-border" colspan="1">
|
||||
<t t-if="log.done_by">
|
||||
<span t-esc="log.done_by.name"/> <span t-esc="log.lase_click_date and log.lase_click_date.strftime('%Y-%m-%d') or ''"/>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -21,6 +21,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<form create="0">
|
||||
<header>
|
||||
<button name="action_print_file_processing"
|
||||
type="object"
|
||||
string="打印"
|
||||
class="btn-primary" invisible="not work_end"/>
|
||||
<!-- <button name="done_publish" string="发布" type="object" class="btn-primary"/>-->
|
||||
<!-- <button name="supervising_button" string="督办" type="object" class="btn-primary" invisible="not is_supervising"/>-->
|
||||
</header>
|
||||
|
||||
@@ -360,16 +360,20 @@
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.action_view_hr_payslip_month_form2"
|
||||
sequence="3"/>
|
||||
<menuitem id="yuthon_salary_meal_views_menu"
|
||||
name="餐费"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.view_yuthon_meal_expenses_action"
|
||||
sequence="4"/>
|
||||
<!-- <menuitem id="yuthon_salary_meal_views_menu"-->
|
||||
<!-- name="餐费"-->
|
||||
<!-- parent="yuthon_catering_root_menu"-->
|
||||
<!-- action="yuthon_salary.view_yuthon_meal_expenses_action"-->
|
||||
<!-- sequence="5"/>-->
|
||||
<menuitem id="yuthon_salary_party_views_menu"
|
||||
name="党建"
|
||||
name="党建工作"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.view_yuthon_salary_party_action"
|
||||
sequence="4"/>
|
||||
<menuitem id="yuthon_salary_party_views_report_menu"
|
||||
name="党费报表"
|
||||
parent="yuthon_salary_party_views_menu"
|
||||
action="yuthon_salary.view_yuthon_salary_party_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="human_welfare_expenses"
|
||||
name="福利费"
|
||||
parent="human_resources_salary_root_board"
|
||||
@@ -758,6 +762,7 @@
|
||||
<menuitem id="menu_soong_workflow_done_record" name="已办流程" action="soong_workflow.soong_workflow_record_done_action" sequence="20"/>
|
||||
<menuitem id="menu_workflow_approval_request_admin" name="流程监控" action="soong_workflow.soong_workflow_record_action_admin" sequence="25"/>
|
||||
<menuitem id="menu_soong_workflow_hr_employee" name="人力资源流程" action="soong_workflow.soong_workflow_hr_employee_action" sequence="30" groups="soong_workflow.group_soong_workflow_hr"/>
|
||||
<menuitem id="yuthon_official_incoming_normal" name="行政收文" action="yuthon_official.yuthon_official_incoming_normal_action" sequence="32"/>
|
||||
<menuitem id="yuthon_file_processing_menu" name="文件处理" action="yuthon_official.yuthon_file_processing_action" sequence="35"/>
|
||||
<menuitem id="yuthon_sub_enterprises" name="文件处理(子企业)" action="yuthon_official.view_yuthon_sub_enterprises_action" sequence="40"/>
|
||||
<menuitem id="yuthon_notice_menu1_board" name="通知公告" action="yuthon_notice.approval_notice_action" sequence="45"/>
|
||||
|
||||
Reference in New Issue
Block a user