web_direct_print/models/purchase_order.py
2025-10-21 11:39:27 +07:00

18 lines
524 B
Python

from odoo import models, fields, api
class PurchaseOrder(models.Model):
_inherit = 'purchase.order'
def action_direct_print_purchase_order(self):
"""
Direct print action for purchase orders and RFQs
"""
return {
'type': 'ir.actions.client',
'tag': 'direct_print',
'name': 'Direct Print Purchase Order',
'report_name': 'purchase.report_purchaseorder',
'docids': self.ids,
'context': self.env.context,
}