18 lines
524 B
Python
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,
|
|
} |