!12589 打印按钮

Merge pull request !12589 from 李鹏宇/dev_wang
This commit is contained in:
李鹏宇
2026-08-06 10:24:58 +00:00
committed by Gitee
2 changed files with 14 additions and 0 deletions
@@ -35,6 +35,12 @@ class YuthonSealsApproval(models.Model):
store=True,
)
def action_print_trade_batch(self):
"""按钮触发打印用章审批单"""
self.ensure_one()
report = self.env.ref('yuthon_trade.action_seal_approval_report_report')
return report.report_action(self, config=False)
def _compute_is_company(self):
active_company_ids = self.env.companies
for employee in self:
@@ -19,6 +19,14 @@
<field name="model">yuthon.seals.approval</field>
<field name="arch" type="xml">
<form string="用章审批">
<header>
<button name="action_print_trade_batch"
string="打印"
type="object"
class="btn-primary"
invisible="not work_end"
/>
</header>
<sheet>
<group col="3">
<group>